Agency Class
The Agency class orchestrates a collection of Agent instances based on a defined structure (AgencyChart).Key Attributes
agents
(dict[str, Agent]): Dictionary mapping agent names to their instanceschart
(AgencyChart): Structure defining agents and their communication pathsentry_points
(list[Agent]): Agents designated as entry points for external interactionthread_manager
(ThreadManager): Manager responsible for handling conversation threadspersistence_hooks
(PersistenceHooks | None): Optional hooks for loading/saving thread stateshared_instructions
(str | None): Instructions prepended to every agent’s system promptuser_context
(dict[str, Any]): Shared user-defined context accessible within MasterContextsend_message_tool_class
(type | None): Custom SendMessage tool class for all agents
Key Methods
Deprecated Methods (Backward Compatibility)
Agent Class
The Agent class extends the baseagents.Agent
with capabilities for multi-agent collaboration within an Agency.Key Attributes
files_folder
(str | Path | None): Local folder for file management and vector storestools_folder
(str | Path | None): Directory for automatic tool discovery and loadingdescription
(str | None): Agent role description for dynamic send_message toolsoutput_type
(type[Any] | None): Type of the agent’s final outputsend_message_tool_class
(type | None): Custom SendMessage tool class for inter-agent communication