> ## Documentation Index
> Fetch the complete documentation index at: https://docs.formation.texturehq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Turn pipeline

> Follow a message from authenticated intake to a checked outbound reply.

A turn converts an observed message into bounded agent work and, when appropriate,
a reply. Formation records what happened before using it as the basis for later work.

## From message to run

1. **Authenticate and route.** The connector verifies the inbound request and
   identifies its configured agent install.
2. **Normalize and capture.** Connector-specific messages become attributed
   events. Slack, Telegram, and phone connectors commit intake before acknowledging delivery; see
   [durable intake](https://docs.formation.texturehq.com/runtime/durable-intake.md) for the connector-specific guarantees.
3. **Decide whether to engage.** The [addressing gate](https://docs.formation.texturehq.com/runtime/addressing.md)
   distinguishes a message the agent should answer from one it merely observes.
   A name candidate may need bounded classification after durable capture.
4. **Admit work.** The runtime checks current agent/install state, conversation
   ownership, and capacity. Ready triggers can coalesce; their messages remain
   in the conversation record.
5. **Resolve context.** The engine loads this agent's persona, authorized history
   and memories, tools, and applicable continuation state. It applies
   [audience checks](https://docs.formation.texturehq.com/runtime/memory-privacy.md) and [prompt budgets](https://docs.formation.texturehq.com/runtime/prompt-budget.md).
6. **Execute.** The [harness](https://docs.formation.texturehq.com/runtime/agent-harness.md) records model calls and tool
   outcomes, applies live corrections, and advances its durable checkpoints.
7. **Finalize.** The engine saves the completed turn and rechecks the destination
   audience and source permissions before delivery.

Identity-linking and memory-sharing commands are authenticated runtime operations;
a model cannot approve them by interpreting a message as consent.

## From model answer to delivered reply

Model text is canonical content. Connector rendering adapts it for the destination
at send time: for example, Slack formatting and attribution are presentation,
not edits to the canonical answer.

A durable reply boundary prevents recovery from blindly sending the same result
again. The actual connector message ID is available only after sending; Formation then
records the outbound message event and run outcome. A failure between those steps
can leave an uncertain delivery. It must be reconciled, not treated as permission
to repeat inference or send another copy.

Replies retain message, memory, and supported tool-source provenance so later
history retrieval cannot strip the restrictions on their original evidence.

## Work that outlives one request

[Live steering](https://docs.formation.texturehq.com/runtime/live-steering.md) updates an active conversational run.
[Continuation](https://docs.formation.texturehq.com/runtime/task-continuation.md) restores a paused task after a new
requester reply. [Checkpoint recovery](https://docs.formation.texturehq.com/runtime/turn-checkpoints.md) resumes an
interrupted run under its existing durable budget and current authority.
These are different lifecycles; restarting a worker is not new human consent.

[Commitments](https://docs.formation.texturehq.com/runtime/commitments.md) and [schedules](https://docs.formation.texturehq.com/runtime/schedules.md) have their
own durable triggers and authorization. They use the execution boundaries above
without fabricating a new human message. General WorkGraph execution is not
implemented.

Implementation: [`internal/app` (repository)](https://github.com/TextureHQ/formation/tree/main/internal/app),
[`internal/graph` (repository)](https://github.com/TextureHQ/formation/tree/main/internal/graph), and
[`internal/turn` (repository)](https://github.com/TextureHQ/formation/tree/main/internal/turn).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.