Architecture
Three integration layers
Request flow
1
Client builds invocation request
2
Auth provider validates
The server validates the auth token, extracts the caller identity, and checks authorization rules.
3
Server runs the agent
The target agent executes locally with a Runner, using the invocation request as input.
4
Response returned
Invocation contracts
- Request
- Response
Hosting an A2A service
Expose your agents as an A2A-accessible service:Authentication providers
AFK ships with three auth providers:- AllowAll (dev only)
- API Key
- JWT
Permits all requests without authentication. Never use in production.
Google A2A adapter
For interoperability with Google’s A2A protocol, use the Google adapter:AgentCommunicationProtocol.
Security considerations
Next steps
Task Queues
Async job processing for long-running work.
MCP Server
Expose tools via the Model Context Protocol.