brainwires-inference 0.11.0

LLM-driven workhorses for the Brainwires Agent Framework — chat agent, planner / judge / validator helpers, task agent, cycle orchestrator, summarization, system-prompt registry. Built on brainwires-agent for coordination primitives.
docs.rs failed to build brainwires-inference-0.11.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

brainwires-inference

Crates.io Documentation License

LLM-driven workhorses for the Brainwires Agent Framework.

What this crate is

Everything in the framework that drives an LLM call (chat / completion / structured output) or constructs prompts for one. Extracted from brainwires-agent in 0.11 (Phase 11f) to separate the "what holds agents together" half (brainwires-agent, the coordination crate) from the "what makes them think" half (this crate).

Modules

  • chat_agent — streaming chat completion loop with per-user session management. The everyday workhorse.
  • task_agent — autonomous task execution loop with tool dispatch, validation, and lifecycle hooks
  • runtimeAgentRuntime + run_agent_loop — generic agentic loop driver
  • contextAgentContext config + the AgentLifecycleHooks trait object
  • agent_hooksAgentLifecycleHooks trait (lifecycle interception during a TaskAgent run)
  • poolAgentPool (TaskAgent pool with concurrent spawning + monitoring)
  • task_orchestratorTaskOrchestrator (dependency-aware scheduling across a pool of TaskAgents)
  • cycle_orchestratorCycleOrchestrator (Plan→Work→Judge cycle driver)
  • plan_executorPlanExecutorAgent (executes an LLM-generated plan with approval modes)
  • validation_looprun_validation quality-check gate before agent completion
  • validation_agent — rule-based + LLM-driven validation
  • validator_agent — LLM judge for ad-hoc validation
  • planner_agent — LLM-powered dynamic task planning
  • judge_agent — LLM-powered cycle evaluation
  • summarization — history compaction via LLM
  • system_prompts — registry of agent prompt templates (AgentPromptKind, build_agent_prompt, etc.)

Dependency direction

brainwires-core
  ↑
brainwires-agent       (coordination + patterns + schema)
  ↑
brainwires-inference   (this crate — agent runtime + LLM-driven helpers)

inference depends on agent for coordination types (CommunicationHub, FileLockManager, ResourceChecker, etc.). That's the intended arrow: inference USES coordination.

Features

Flag Default Enables
native yes filesystem + process — needed by validation, sandbox
wasm off wasm-compatible build (drops native features)
otel off OpenTelemetry span export for agent execution traces

Migration from brainwires-agent

# Before
brainwires-agent = "0.10"

# After — pull both
brainwires-agent = "0.11"      # coordination
brainwires-inference = "0.11"  # workhorses

# Or via the umbrella facade (default features include both):
brainwires = { version = "0.11", features = ["full"] }
// Before
use brainwires_agent::{ChatAgent, TaskAgent, AgentRuntime, AgentPool};
use brainwires_agent::system_prompts::AgentPromptKind;

// After
use brainwires_inference::{ChatAgent, TaskAgent, AgentRuntime, AgentPool};
use brainwires_inference::system_prompts::AgentPromptKind;

// Or via the facade — old paths keep working:
use brainwires::agents::{ChatAgent, TaskAgent};
use brainwires::inference::AgentRuntime;

License

MIT OR Apache-2.0