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ΒΆ

SimpleAgentConfig

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:

SimpleAgentConfig

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:

SimpleAgentConfig

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:

SimpleAgentConfig