State Management
Learn how Agency Swarm manages state across agents and sessions.
Agency Swarm conveniently manages the state of your agents and threads, simplifying the assistant creation and management process on OpenAI’s Assistants API.
Agent State Management
In OpenAI Assistants API, all agents need to be updated before they can be used. Agency Swarm manages this by maintaining a local settings.json
file, and the comparing local settings with the ones stored on OpenAI’s servers. If there are any differences, the Assistants are updated on OpenAI’s servers. This ensures that the agents are only created once, and are only updated when needed.
Thread State Management
Additionally, OpenAI’s Assistants API manages the conversation context through threads. A thread represents a persistent conversation between an assistant and a user, automatically handling the storage and truncation of messages to fit within the model’s context window. This approach offloads the complexity of conversation state management to OpenAI, ensuring efficient and seamless context handling.
Persistent Conversations
Maintains ongoing conversations without manual history management.
Automatic Context Management
Handles message storage and truncation within token limits.