API Reference lemon_router v#0.1.0

View Source

Modules

LemonRouter provides orchestration and routing for agent runs.

Discoverable directory for agent sessions and routing endpoints.

Router-owned typed wrapper for persistent agent endpoint aliases.

Persistent endpoint aliases for agent routing.

BEAM-local inbox API for sending messages to agent sessions.

Agent profile configuration management.

Router-owned subscriber that projects child-run engine_action events directly into the parent task surface's ToolStatusCoalescer.

Canonical conversation key selection for router-owned queue coordination.

Environment variables read by lemon_router — run routing and session orchestration.

Records generated final-answer files into the redacted media job store.

Resolves model + engine selection independently from profile binding.

Router-owned typed wrapper for pending-compaction markers.

Emits router-owned canonical run phase changes on per-run bus topics.

Policy merging for tool execution.

Tiny typed effect surface for reducer-produced queue commands.

Router-owned resume resolution.

Measurable graduation gates for adaptive features.

Main router for handling inbound messages and control plane requests.

Offline evaluation and reporting layer for routing feedback.

SQLite-backed store for routing feedback samples.

Tracks run lifecycle counters via telemetry for the RunOrchestrator.counts/0 API.

Process that owns a single run lifecycle.

Tracks file-like outputs on router run state.

Context-window overflow detection and preemptive compaction triggering.

Zero-answer auto-retry logic for RunProcess.

Idle-run watchdog timer logic for RunProcess.

Starts a prepared router submission under the configured run supervisor.

Router-owned owner of per-conversation queue semantics.

Dynamic supervisor wrapper for per-conversation session coordinators.

Coordinator-owned read model for active session state.

Pure state container for router-owned per-conversation queue semantics.

Classifies task complexity and routes requests to cheap vs primary models.

Thresholds for LemonRouter.SmartRouting.route/4: whether cascade routing is enabled and the character bounds that classify a prompt as simple or complex.

Extracts engine preference from user prompts.

Coalesces streaming deltas for efficient channel output.

Router-owned internal queue contract between orchestration and coordination.

Builds the router-owned submission handed from orchestration to coordination.

Router-owned semantic output façade for RunProcess.

Coalesce tool/action lifecycle events into a single editable "Tool calls" message.

Renders the tool-status text for user-facing transports.

Mix Tasks

Inspect and analyze routing feedback collected from past runs.