Switch AI agents between government agencies
Workflow purpose
This guide demonstrates how to use Proto's platform to hand a citizen off from one government agency's AI agent to another, with full context, when their issue turns out to belong somewhere else. Citizens shouldn't have to know which agency owns which problem, or repeat themselves once they've found the right one. This workflow uses Proto's AI Agent Network to pass the conversation, and everything already collected, to the receiving agency's agent in one step.
Who can benefit from this guide:
- Multi-agency government platforms where citizens may start in the wrong place
- Central banks and regulators referring citizens to a sister agency
- Digital government teams building "no wrong door" citizen services
- Anti-scam centres referring cases that belong to a different regulator
Switch between government agencies
This workflow confirms which agency actually owns the citizen's issue, then hands the conversation off with its full context attached. See how to switch AI agents between government agencies.
1. Create a trigger
Purpose: Catch the moment a citizen’s issue turns out to belong to a different agency.
- Navigate to the Actions tab in the AI agent settings.
- Click “+ Add Trigger” and select the Message Received trigger type.
- Name the trigger “Cross-agency handoff”.
- Add a description such as “Triggers when the citizen’s request matches another agency’s mandate rather than this one.”
2. Confirm the destination agency
Purpose: Check with the citizen before transferring them anywhere.
- Add a Send message action with quick reply options for each partner agency this agent can hand off to.
- Add a Set chat variable action to store the selection as
destination_agency– quick reply selections aren’t captured automatically, so this step reads_user_inputinto the variable.
3. AI Agent Network handoff
Purpose: Transfer the conversation with everything already collected, so the citizen never repeats themselves.
- Add an AI Agent Network handoff action.
- Enter the destination agency’s AI agent ID, AI agent secret, and Platform domain, then Verify & save.
- Confirm the variables available to the receiving agent include
{_transferred_context.first_name},{_transferred_context.issue_description}, and any other fields already collected in this conversation.
4. Handoff confirmation
Purpose: Tell the citizen what just happened so the transfer doesn’t feel like a dead end.
- Add a Send message action: “I’m transferring you to {destination_agency} with the details you’ve already shared, so they can pick up from here.”
5. Test the flow
Purpose: Confirm the receiving agency actually gets what it needs.
- Run a test conversation, collect a few fields, trigger the handoff, and confirm the receiving agent’s test chat shows the transferred context correctly.
- Test with an agency selection that has no configured handoff credentials, and confirm the flow fails gracefully with a message rather than an error.
- Test declining the handoff to confirm the citizen can still continue with the original agent.