Skip to main content

Module agent

Module agent 

Source
Expand description

Agent runtime — AgentRunner, Orchestrator, workflow agents, guardrails, and supporting types.

Modules§

audit
Agent audit trail — structured records of LLM calls, tool invocations, and completions.
batch
Batch executor for running the same agent on multiple tasks with controlled concurrency.
blackboard
Shared blackboard for inter-agent state exchange in squad-based orchestration.
cache
LLM response caching for deterministic replay and cost reduction.
context
Context management strategy for long-running agent sessions.
dag
DAG (Directed Acyclic Graph) workflow agent.
debate
Debate workflow agent.
evaluator
Evaluator-Optimizer workflow agent.
events
Agent lifecycle events emitted during execution via the OnEvent callback.
guardrail
Guardrail trait and GuardAction — base types for all guardrail implementations.
guardrails
Built-in guardrail implementations — LLM judge, secret scanner, PII detector, content fence, action budget, behavioral monitor, injection classifier, tool policy, and composition helpers.
handoff
Agent handoff runner.
instructions
Dynamic instruction loading from .heartbit/INSTRUCTIONS.md files.
mixture
Mixture-of-Agents (MoA) workflow agent.
observability
Observability mode — controls tracing verbosity and metric emission.
orchestrator
Multi-agent orchestrator for parallel and sequential sub-agent delegation.
permission
Runtime permission rules for tool usage — deny, allow, and learned-via-HITL decisions.
prompts
Built-in system prompt fragments for multi-agent collaboration.
pruner
Session context pruner — trims old messages before LLM calls to control context size.
routing
Dynamic complexity-based agent routing.
tenant_tracker
Per-tenant in-flight token tracker with Arc-owning RAII reservations.
token_estimator
Lightweight token estimation for context budget management.
tool_filter
Dynamic tool filtering based on query classification.
voting
Majority-voting workflow agent.
workflow
Deterministic workflow agent primitives.

Structs§

AgentOutput
Output of a completed agent run.
AgentRunner
Runs an agent loop: LLM call → tool execution → repeat until done.
AgentRunnerBuilder
Builder for AgentRunner.

Type Aliases§

OnInput
Callback for interactive mode. Called when the agent needs more user input (i.e., the LLM returned text without tool calls). Returns Some(message) to continue the conversation, or None to end the session.