Chat: it serves a messages-style task as an A2A endpoint, so any A2A client - including another LLM using it as a tool - can hold a conversation with your environment.
A Chat is HUD’s multi-turn conversation object, and it is protocol-agnostic (see Chat). The A2A layer is a reference server kept outside the SDK on purpose, so you copy and adapt it from cookbooks/a2a-chat.
The pieces
The environment
A chat-style task takes the running conversation as amessages parameter and yields it as the prompt:
chat_env.py
Run it
Fromcookbooks/a2a-chat (uv resolves the dependencies on first run):
/.well-known/agent-card.json and accepts A2A messages at the root endpoint. Each A2A context gets its own Chat, so concurrent conversations stay independent.
You configure the server through environment variables: