Module pipeline

Module pipeline 

Source
Expand description

Agent Pipeline - Unified LLM interaction pipeline

This module provides a single entry point for all LLM interactions, regardless of input source (text, voice, delegated tasks). It integrates:

  • Context analysis and reduction
  • Tool filtering based on request
  • Agentic loop for tool execution
  • Optional ERL-inspired reflection, retry, and memory consolidation
  • Streaming and non-streaming responses
  • Token estimation and truncation
  • Fallback to secondary providers
  • Workspace sandboxing for tool execution

Internal organization notes:

  • agent_loop owns the runtime control flow and delegates shared iteration/finalization helpers, tracked-task bookkeeping, narration / status emission, and continuation/closeout logic to sidecar modules.
  • tool_dispatch owns tool execution; its test suite lives in a dedicated sidecar module so the runtime file stays focused on behavior.

Re-exports§

pub use types::*;

Modules§

types
Pipeline types for unified LLM interaction.

Structs§

AgentPipeline
The main agent pipeline for processing requests
RoutingResult
Result of a pre-flight tool routing operation.

Traits§

ToolRouter
Async trait for tool selection strategies.

Functions§

build_tool_router
Build a ToolRouter from a ToolRoutingStrategy and app config.
process_ring_stream
Process a stream of gestures from the ring backend and route each one through the agentic pipeline.