Skip to content

Agent Mode

Agent Mode is Amplify's full-capability conversation mode. It uses the complete agent system prompt — identity, available skills, user memory, user context, project context, and the full tool set including the sandbox. This is the mode that can actually build, edit, and run code.

What agent mode adds

Agent mode turns Amplify from a knowledgeable chat partner into a working agent. Compared to Chat Mode, it restores everything that was trimmed:

CapabilityChat ModeAgent Mode
Full system prompt
All skills (<available_skills>)Reduced setAll
inject_template + sandbox tools
<project_context>✓ (in project chats)
Skill-discovery (list_skills / get_skill)
Planning engine + sub-chat workers

The trade-off is tokens: the agent system prompt is several thousand tokens before you've even said anything. That's the cost of giving the model everything it needs to do real work.

The full agent system prompt

The agent system prompt is assembled by the streaming pipeline (see AI Workflow → System prompt construction). It includes:

  1. Identity — who Amplify is, its capabilities, and how it should behave.
  2. <available_skills> — XML-tagged list of every loaded skill (<skill name="id" description="desc"/>), with an instruction to call list_skills before answering if a relevant skill might exist.
  3. <user_memory> — persisted facts the AI has remembered about you across sessions.
  4. <user_context> — current-session context (uploaded files, prior answers).
  5. <project_context> — the active project's file tree, open files, and runtime state (project chats only).
  6. Tool definitions — the full JSON-schema tool set: list_skills, get_skill, inject_template, sandbox read/write/exec, list_design_systems, get_design_system, web tools, and more.

When a skill matches the task, the AI calls get_skill to load the full SKILL.md and then follows its instructions precisely. This is what makes Amplify's output quality consistent across React, mobile, API design, and other domains — see Built-in Skills.

Switching to agent mode mid-chat (context preserved)

The defining UX feature of agent mode is that you can switch into it mid-chat from chat mode without losing any conversation context.

Here's what actually happens when you toggle the mode during an ongoing conversation:

The key points:

  • Only the system prompt is replaced. The minimal chat-mode system prompt is discarded and the full agent system prompt takes its place at the top of the message array.
  • The message history survives untouched. Every user/assistant turn you already had is still in the array, in order, verbatim. The AI "remembers" everything you discussed — because the messages are literally still there.
  • No re-summarising, no re-sending. Amplify does not compress or re-transmit prior turns. The swap is O(1) extra cost (just the new, larger system prompt); the prior turns were already paid for.
  • It's reversible. You can switch back to chat mode the same way, and the history is still preserved. Each swap only changes which system prompt sits at the front of the array.

This is why the toggle is described as back-to-back conversation without the AI losing current chat context: the conversation is a single continuous thread; only the "instructions header" above it changes.

Planning & sub-chat workers

Agent mode also enables Amplify's planning engine. For complex multi-step requests the agent will:

  1. Plan — break the task into ordered steps.
  2. Delegate — spin up sub-chat workers for individual steps, each with its own focused context.
  3. Verify — run outputs through FlowVerifier to check they meet the task's success criteria before returning them.
  4. Report — stream a summary back to the main chat.

This pipeline is disabled in chat mode (it would be wasted on a quick Q&A) and is part of why agent mode costs more tokens. See AI Workflow for the full pipeline diagram.

When to use agent mode

Start in chat mode, escalate when needed

Because the mid-chat switch preserves context, the token-optimal pattern is: start in Chat Mode, and toggle into agent mode only at the turn where the task actually requires building. You pay the cheap rate for the Q&A, and the full rate only for the build.

Continue to Project Chat