agents.simple.configΒΆ
Configuration for SimpleAgent with comprehensive schema handling.
This module defines the configuration class for SimpleAgent with explicit input/output schema support, schema composition integration, and improved mapping capabilities.
ClassesΒΆ
Configuration for a simple single-node agent with comprehensive schema handling. |
Module ContentsΒΆ
- class agents.simple.config.SimpleAgentConfigΒΆ
Bases:
haive.core.engine.agent.agent.AgentConfig
Configuration for a simple single-node agent with comprehensive schema handling.
This config supports: - Explicit input/output schemas - Auto-derived state schema - Structured output models - Intelligent input/output mappings
- classmethod from_aug_llm(aug_llm, name=None, id=None, input_schema=None, output_schema=None, state_schema=None, **kwargs)ΒΆ
Create a SimpleAgentConfig from an existing AugLLMConfig.
- Parameters:
aug_llm (haive.core.engine.aug_llm.AugLLMConfig) β Existing AugLLMConfig to use
name (str | None) β Optional agent name
id (str | None) β Optional unique identifier
input_schema (type[pydantic.BaseModel] | None) β Optional explicit input schema
output_schema (type[pydantic.BaseModel] | None) β Optional explicit output schema
state_schema (type[haive.core.schema.state_schema.StateSchema] | None) β Optional explicit state schema
**kwargs β Additional kwargs for the config
- Returns:
SimpleAgentConfig instance
- Return type:
- classmethod from_scratch(system_prompt='You are a helpful assistant.', model='gpt-4o', temperature=0.7, structured_output_model=None, name=None, id=None, input_schema=None, output_schema=None, state_schema=None, **kwargs)ΒΆ
Create a SimpleAgentConfig from scratch with a new AugLLMConfig.
- Parameters:
system_prompt (str) β System prompt for the LLM
model (str) β Model identifier to use
temperature (float) β Generation temperature
structured_output_model (type[pydantic.BaseModel] | None) β Optional model for structured outputs
name (str | None) β Optional agent name
id (str | None) β Optional unique identifier
input_schema (type[pydantic.BaseModel] | None) β Optional explicit input schema
output_schema (type[pydantic.BaseModel] | None) β Optional explicit output schema
state_schema (type[haive.core.schema.state_schema.StateSchema] | None) β Optional explicit state schema
**kwargs β Additional kwargs for the config
- Returns:
SimpleAgentConfig instance
- Return type:
- classmethod validate_engine(v)ΒΆ
Ensure engine is an AugLLMConfig instance.
- Return type:
Any
- classmethod validate_mappings(v, info)ΒΆ
Validate mappings if provided.
- Return type:
Any
- classmethod with_structured_output(output_model, system_prompt=None, model='gpt-4o', temperature=0.2, name=None, **kwargs)ΒΆ
Create a SimpleAgentConfig with structured output capabilities.
- Parameters:
output_model (type[pydantic.BaseModel]) β Pydantic model for structured output
system_prompt (str | None) β Optional system prompt (default derived from model)
model (str) β Model identifier
temperature (float) β Generation temperature (lower for structured outputs)
name (str | None) β Optional agent name
**kwargs β Additional kwargs for the config
- Returns:
SimpleAgentConfig with structured output capability
- Return type: