ACP Client Sessions
The ACP SDK provides a convenient way to maintain session through thesession()
context manager. When using a session, the SDK automatically handles session ID management, ensuring that all runs within the session share the same ID.
This makes it easy to build stateful conversations where agents can reference previous interactions:
session.py
ACP Server sessions
When building ACP agent, thecontext
argument contains a session instance containing session’s ID, history and latest state from all the previous runs in the same session.
stateful_agent.py