Travel Agent
The maintained travel showcase is examples/pydantic/travel_agent.py.
It is the main example for:
Hookscapability introspection rendered throughHookProjectionMap- approval-gated read/write diff projection in a local workspace
- prompt-model override behavior for image and audio prompts
- a direct module-level
Agent(...)plusAdapterConfig(...)surface without example-only factories
Run It
uv run python -m examples.pydantic.travel_agent
Without MODEL_NAME, the example uses TestModel so the demo remains credential-free. Set
MODEL_NAME and optionally ACP_TRAVEL_MEDIA_MODEL when you want live-model behavior.
Key Patterns
- the module exports plain
agent,config, andmainsymbols without factory wrappers HookProjectionMaprelabels and hides selected hook lifecycle eventsTravelPromptModelProvidershows how a host can supply an explicit media-model override- generated trip files keep the example self-contained instead of relying on tracked demo fixtures
FileSystemProjectionMapturns travel file reads and writes into ACP-visible diffs