Skip to main content

Module execution

Module execution 

Source
Expand description

Agent execution service — single place handling conversation history loading, memory injection, tool coordination, observability, usage/cost, token budget, and loop detection.

Structs§

AgentRequest
Request for unified agent execution.
Execute
Unified agent execution service — the single place handling:
ExecutionResult
ModelOverride
Canonical per-request model override used by the LLM interceptor.
Tools
Tenant-aware tool capability.

Enums§

AgentSource
Result of Execute::run including resolution metadata.

Traits§

RunTracker
Trait for tracking active agent runs. Implemented by the root crate’s ActiveRuns and injected into Execute via the Context.

Functions§

request_tenant_ctx
Request-path tenant: open the realm (or isolate) then intercept TenantContext. Background jobs keep using tenant_scope (isolate only, no intercept).
request_user_scope
JWT user: isolate when no tenant is present. Does not invent TenantContext.
tenant_scope
Derive tenant for execute without requiring the postgres-only resolver module. Scope tools and execution to one tenant. Isolate wins over intercept.
user_id_from_ctx
Derive user/tenant scope: Execute isolate label (strip tenant:/user:), then TenantContext intercept, then fallback.