# <FollowUp />

Stage an ordered later input in the same provider-owned Agent session.
Canonical: https://agent-markup-language.com/docs/reference/primitives/follow-up/
Documentation index: https://agent-markup-language.com/docs/
Complete documentation: https://agent-markup-language.com/docs/llms.txt

`<FollowUp />` adds one later turn to its nearest containing [`<Agent />`](https://agent-markup-language.com/docs/reference/primitives/agent/). AML resolves every follow-up before opening the provider session, then the provider sends the initial prompt and follow-ups through one shared session history.

```tsx
import { Agent, AmlRuntime, FollowUp } from "@aml-jsx/sdk"
import { DeterministicAgentProvider } from "@aml-jsx/sdk/testing"

const provider = new DeterministicAgentProvider({
  respond: request => ({ text: [request.prompt, ...(request.followUps ?? [])].join(" | ") }),
})

const runtime = new AmlRuntime({ agentProvider: provider })
const result = await runtime.evaluate(
  <Agent>
    Draft the migration plan.
    <FollowUp>Estimate the risk of each step.</FollowUp>
    <FollowUp>Finish with a three-bullet executive summary.</FollowUp>
  </Agent>
)
```

## Props

| Prop       | Type            | Default | Meaning                                                         |
| ---------- | --------------- | ------- | --------------------------------------------------------------- |
| `children` | `AmlRenderable` | empty   | Content for one later input; it must resolve to non-empty text. |

## Session semantics

- `<FollowUp />` components are flat. One `<FollowUp />` cannot contain another.
- Authored order is preserved.
- Every turn counts toward `maxTurnsPerAgent`; the default budget is 16 turns including the initial prompt.
- The same Agent-scoped Tools, MCP servers, model, permissions, Sandbox view, and provider session apply to every turn.
- When structured output is requested through the Agent `schema` prop or `evaluate(value, schema)`, the schema applies only to the final authored turn. If that turn omits the result Tool, built-in ACP providers send one schema-bearing repair prompt afterward.

With tracing enabled, AML starts and ends each `agent.turn` around actual execution. A later follow-up cannot appear as started before the preceding turn ends. The initial turn has `kind="initial"`; later turns have `kind="follow-up"`, and all carry a one-based `index`. ACP messages, Tool updates, plans, and usage emitted during that prompt stay ordered inside its turn. See [Observability](https://agent-markup-language.com/docs/observability/#agent-lifecycle-events).

`<FollowUp />` is appropriate when later instructions depend on the model's own session history. Use separate `<Agent />` components and ordinary TypeScript data flow when work needs independent providers, models, capabilities, failure handling, or concurrency.

See the [editorial passes recipe](https://agent-markup-language.com/docs/cookbook/follow-up-editorial-passes/) for a complete session and [Runtime and evaluation](https://agent-markup-language.com/docs/reference/runtime/) for turn budgets.
