LLMRequest (what you send) and LLMResponse (what you get back). These contracts normalize the differences between providers so your agent code never touches provider-specific types.
The flow
The adapter translates between AFK’s normalized contracts and the provider’s native format.LLMRequest
- Fields
- Example
LLMResponse
- Fields
- Example
Structured output
Request structured JSON output with a Pydantic model:Message types
Next steps
Adapters
Built-in providers and custom adapters.
Control & Session
Retry, caching, rate limiting, and circuit breaking.