agents.experiments.supervisor.state_models¶
State models for supervisor agents.
This module defines the state schemas and data models used by supervisor agents for managing multi-agent systems.
Classes¶
Metadata for a registered agent. |
|
Extended state model for dynamic supervisors. |
|
Context for agent execution. |
|
Serialized representation of an agent for storage/transfer. |
|
State model for supervisor agents. |
|
Mapping between tools and agents. |
Module Contents¶
- class agents.experiments.supervisor.state_models.AgentMetadata(/, **data)¶
Bases:
pydantic.BaseModel
Metadata for a registered agent.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class agents.experiments.supervisor.state_models.DynamicSupervisorState(/, **data)¶
Bases:
SupervisorState
Extended state model for dynamic supervisors.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- add_agent_template(name, template)¶
Add a template for agent creation.
- get_creation_statistics()¶
Get statistics about agent creation.
- class agents.experiments.supervisor.state_models.ExecutionContext(/, **data)¶
Bases:
pydantic.BaseModel
Context for agent execution.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class agents.experiments.supervisor.state_models.SerializedAgent(/, **data)¶
Bases:
pydantic.BaseModel
Serialized representation of an agent for storage/transfer.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class agents.experiments.supervisor.state_models.SupervisorState(/, **data)¶
Bases:
pydantic.BaseModel
State model for supervisor agents.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- add_execution(agent_name, task, task_id=None)¶
Add a new execution context.
- Parameters:
- Returns:
The created execution context
- Return type:
- complete_execution(task_id, result, error=None)¶
Complete an execution context.
- get_agent_statistics()¶
Get statistics about agents and executions.
- class agents.experiments.supervisor.state_models.ToolMapping(/, **data)¶
Bases:
pydantic.BaseModel
Mapping between tools and agents.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)