Skip to main content

Module agent

Module agent 

Source
Expand description

Agent definition types and workflow composition.

Agents are defined as data (AgentDefinition + AgentKind) and composed declaratively. The framework handles execution — products only define what the agent knows and can do.

§Example

let agent = AgentDefinition {
    name: "researcher".into(),
    kind: AgentKind::Llm(LlmAgentConfig {
        system_prompt: "You are a research assistant.".into(),
        tools: vec![Arc::new(WebSearch)],
        lens: Lens::new(["research", "papers"]),
        llm_config: LlmConfig::new("openai", "gpt-4"),
        experience_extractor: None,
    }),
};

Structs§

AgentDefinition
Blueprint for creating an agent. Not a running agent — just configuration.
ExtractionContext
Context passed to the experience extractor during the Record phase.
LlmAgentConfig
Configuration for an LLM-powered agent.

Enums§

AgentKind
Determines how an agent executes.
AgentKindTag
Compact tag for agent kind, used in HiveEvent variants.
AgentOutcome
Outcome of an agent’s execution.

Traits§

ExperienceExtractor
Trait for extracting experiences from an agent’s conversation history.