← All courses

EDGE FDE

Intermediate

Run an agent with a state machine

Make agent behavior predictable so product and support can trust what the app will do next.

Deterministic orchestrator with Dynamic Profiles (one active Profile at a time), no LangChain.

Own the loop yourself. One Dynamic Profile is active at a time. Tools change state. The app decides the next step. iOS 27 and macOS 27 only.

Lessons

  1. Why agents need a state machine
  2. Keep one active Dynamic Profile
  3. Treat tools as named transitions
  4. Build the orchestrator
  5. Debug and ship the loop

Key concepts

Takeaways

Agent briefs

Related courses

Route work to the right Apple model · Build a context packer for on-device AI · Test AI behavior before you ship · Pause and resume long AI jobs