Skip to content

Capabilities

Steven Enamakel edited this page Oct 9, 2026 · 8 revisions

Capabilities

An index of what each TinyAgents crate exposes, with a link to the page that documents it. Start here, find the crate you need, and follow the link.

The workspace has no facade crate: Harness, Graph runtime, Registry, the task and orchestration crates (tinyagents-tasks, tinyagents-orchestration), session, runtime, definition and live are separate crates, plus Providers at the leaves and testkit/conformance helpers for tests. See Architecture for how they depend on each other.

Harness — model calls, tools, control

Capability What it does Where
Agent loop Default model→tool→model loop with run identity + limits Harness
Provider-neutral model calls One ChatModel trait; ModelRequest/ModelResponse across hosts Harness
Model resolution & selection ModelRegistry resolves a call via ModelSelection/capabilities Harness
Typed tools Tool trait with JSON schemas and a ToolRegistry; nested call_tool (off by default) Harness
Middleware hooks before/after hooks around agent, model, and tool calls Harness
Structured output Extract a typed value via a provider-appropriate strategy Harness
Streaming Model-delta and event streaming through the loop Harness
Usage & cost Token accounting and pricing roll-ups across the run tree Harness
Limits, retry, failover Fail-closed caps, backoff, reason-aware failover, rate limiting Harness
Response & prompt cache Local response cache + provider prompt/KV-cache layout Harness
Memory & retrieval Host-supplied AgentMemory, the Retriever contract, embeddings via tinyinference-embeddings Harness
Sub-agents (agents as tools) tinyagents-orchestration: SubagentDriver, spawn admission, job registry, completion routing Harness
Steering Typed runtime control (pause/resume/redirect, opt-in SwitchModel) of a running agent Harness
Summarization Context-window-aware transcript compaction Harness
Events & run status In-memory event spine (TurnStarted/TurnCompleted/MessageAppended, tool progress) + run status + typed TerminalOutcome Harness
Durable observability Journals, status stores, sinks, latency metrics Harness
Testkit Fakes, recorders, trajectory assertions Harness
Loop detection Staged nudge/warn/block/halt on stalled or repeating tool calls Harness

Graph runtime — durable typed workflows

Capability What it does Where
Nodes & edges Named nodes wired by static/conditional edges over typed state Graph Runtime
Dynamic routing Command.goto + routing precedence resolve next targets Graph Runtime
Send fan-out (map-reduce) Schedule nodes with per-invocation args for the map step Graph Runtime
Reducers & channels Merge branch updates deterministically; channel-per-field state Graph Runtime
Parallel fan-out Run multi-node supersteps concurrently, folded in index order Graph Runtime
Checkpoints & durability Persist at superstep boundaries; in-memory/file/SQLite backends Graph Runtime
Time travel Read/fork/update state history against a checkpointer Graph Runtime
Interrupts & resume Human-in-the-loop pause and resume with a payload Graph Runtime
Subgraphs Embed a compiled graph as a node Graph Runtime
Sub-agent nodes (deprecated) Embed a harness agent as a graph node; use SubagentDriver instead Graph Runtime
Recursion policy Bound depth, per-node visits, and total steps for sub-agent/subgraph chains Graph Runtime
Orchestration tools Model-callable child-task supervision (orchestrate_*), task stores, detached-task registry, completion router; now in tinyagents-tasks Graph Runtime
Goals and todos A durable ThreadGoal and a TodoList checklist, exposed as harness tools Goals and Todos
Streaming & events GraphEvents + StreamMode projections Graph Runtime
Durable graph observability Journals, status store, latency metrics Graph Runtime
Topology export JSON/Mermaid export of a graph's structure Graph Runtime
Graph testkit Deterministic node doubles + graph assertions Graph Runtime

Registry — named capability catalog

Capability What it does Where
Component identity ComponentId/ComponentKind/ComponentMetadata describe capabilities Registry
Capability registry Register/resolve models, tools, agent definitions, capability bundles by name Registry
Model catalog Offline pricing, context windows, capability facts Registry
Model router Declarative workload tiers mapped onto registered models with fallback chains Registry

Providers — model backends at the leaves

Capability What it does Where
Offline mock model Deterministic, network-free default build Providers
OpenAI + compatible hosts One adapter for OpenAI and OpenAI-compatible endpoints (Anthropic compat, Ollama, DeepSeek, Groq, xAI, OpenRouter, Together, Mistral) Providers
List available models OpenAiModel::list_models() — runtime model discovery via GET /models Providers
Provider inference Resolve a provider from a model string Providers
Capability profiles Reject impossible requests; pick capability-satisfying fallbacks Providers

Session — durable history

Capability What it does Where
Session and message history SQLite-backed (WAL + FTS5) sessions, messages, tool calls, cost metadata, parent/child lineage tinyagents-session crate docs (crates/tinyagents-session/README.md)
Run ledger Durable state for background agent/workflow execution tinyagents-session crate docs

Testing — testkit & conformance

Capability What it does Where
Harness testkit Scripted models, fake tools, trajectory asserts Harness
Graph testkit Node doubles + fluent graph assertions Graph Runtime
Storage conformance Reusable contracts for task stores and checkpointers Graph Runtime

See also

  • Home — orientation and the crate overview.
  • Examples — runnable end-to-end demonstrations.
  • Architecture — how the crates compose.

TinyAgents

Provider-neutral agent harness and durable state-graph runtime for Rust.

Getting started

Concepts

Modules

Providers

Contributing


Clone this wiki locally