Skip to main content
Back to how-to guides Use this pattern when you must pick between full, last_n, summary_only, auto, and none for a handoff route.

Concept

Each strategy trades context for risk. More history helps the target understand the customer. It also costs more tokens, and it can expose data the target does not need. Start from what the target must know to do its job. Then give it the least history that covers that need. full is the default when you omit HISTORY. Choose a strategy on purpose for each route. How to decide:
  1. Can PASS fields replace the history? If yes, use none.
  2. Is a short brief enough? If yes, write a SUMMARY and use summary_only.
  3. Does the target need the latest exchange? If yes, use last_n.
  4. Does the target need the customer’s exact words, or must it audit the whole conversation? If yes, use full.
  5. Do you want the platform to choose between the summary and recent messages? Use auto. State in your tests which one you expect.
For the syntax and edge cases of each value, see Pass full, recent, or no conversation history. For the summary, see Pass a conversation summary during handoff.

Minimal working example

A care router has four specialists. Each route uses the strategy that fits its target. The specialists are short stand-ins in the same project. Replace them with your real agents. agents/care-hub.agent.abl
agents/fraud-agent.agent.abl
Loan_Agent, Complaint_Agent, and Address_Agent are the same file with a different AGENT and GOAL. Replace them with your real agents. Variable sources:
  • customer_ref is a GATHER field of the router. Each route passes it.
  • detail is gathered by each specialist.

How it works

The runtime resolves the strategy once, when it creates the target thread.
  1. If the route sets HISTORY, the runtime uses it.
  2. If not, the runtime uses the project-level default, when your deployment sets one.
  3. If neither exists, the runtime uses full.
For auto, the runtime then decides:
  • It sends the summary only when the route has a non-empty SUMMARY and the target runs on a model.
  • Otherwise it sends the last 5 messages.
  • When a pipeline short-circuit triggers the handoff, it sends the last 5 messages even if a summary exists.
The strategy also applies to remote agents and to the return trip of a returnable child. See Preserve context when calling remote agents.

Common variations

Pair a short window with a summary

Use last_5 with a SUMMARY when the target needs the brief and the latest exchange.
This is a section snippet. It needs the router GATHER field from the minimal example.

Raise the strictness for regulated data

Move a route from full to none or summary_only when earlier messages can hold personal or payment data. See Minimize context for privacy and compliance.

Delegates have no history setting

A DELEGATE has no HISTORY. The sub-agent receives no conversation messages. It receives the INPUT fields and a few automatic session values. If a delegate needs context, map it in INPUT. See Delegate and map the result.

Verification

  1. Run the validator on all five files. Expect no errors and no warnings.
  2. For each route, send a request after two unrelated messages.
  3. Fraud: expect the specialist to know the brief and nothing the customer typed earlier.
  4. Loan: expect the specialist to know the brief. Expect it not to know earlier messages.
  5. Complaint: expect the specialist to restate your earlier messages.
  6. Address change: expect the specialist to know only the customer reference.
  7. Check each handoff trace event for the right to agent.

Production readiness checklist

  • Each route states a strategy.
  • Each strategy appears in a table of decisions that your team reviewed.
  • Each summary_only and auto route has a SUMMARY.
  • Each target passes its tests with exactly the history it receives.
  • Routes that handle personal or payment data do not use full without a documented reason.
  • Tests cover a long conversation for every route.

Common mistakes

Troubleshooting

Related articles: