What TinyAgents Crates Does OpenHuman Depend On?
OpenHuman's Rust core depends on four primary TinyAgents crates—tinyagents, tinyagents_harness, tinyagents_graph, and tinyagents_session—to provide agent harnessing, tool execution pipelines, planning graph structures, and persistent run-ledger storage.
OpenHuman is an open-source AI agent framework built in Rust that leverages the TinyAgents ecosystem for its core runtime capabilities. Understanding which TinyAgents crates OpenHuman depends on reveals how the system handles autonomous agent behavior, tool orchestration, and workflow persistence. This analysis examines the specific crate dependencies declared in the repository's Cargo.toml and their implementation throughout the codebase.
Core TinyAgents Crates That OpenHuman Depends On
tinyagents — The Core Agent Harness
The tinyagents crate provides the fundamental agent harness and runtime that drives each conversation turn. It exposes the Harness builder and high-level APIs like run and turn that coordinate agent execution. In OpenHuman, this dependency is declared in the root Cargo.toml with a vendored path:
tinyagents = { path = "vendor/tinyagents", version = "…" }
tinyagents_harness — Tool Execution Pipeline
The tinyagents_harness crate implements the tool-execution pipeline, including policies, timeouts, and sandboxing mechanisms. It defines the Tool trait and ToolExecutionContext used throughout OpenHuman's tool system. According to the source analysis, this crate appears in Cargo.toml as:
tinyagents_harness = { path = "vendor/tinyagents_harness", version = "…" }
tinyagents_graph — Planning and Workflow DAGs
For planning graphs and workflow management, OpenHuman depends on tinyagents_graph. This crate supplies data structures for the agent's todo/goal graph and workflow DAGs, including the "todos" sub-graph used for task management. The dependency resides at the vendored path vendor/tinyagents_graph and is declared in the root Cargo.toml.
tinyagents_session — Persistent Run-Ledger
The tinyagents_session crate handles persistent storage of agent runs, workflow executions, and telemetry data. It powers the UI's run history display and provides observability hooks for the core system. OpenHuman declares this in Cargo.toml with the path vendor/tinyagents_session.
Secondary and Transitive Dependencies
tinyagents_tool — Low-Level Tool Definitions
While not directly listed in Cargo.toml, tinyagents_tool appears as a transitive dependency through tinyagents_harness. It provides low-level definitions for tool schemas, result types, and error handling that underpin the tool execution system.
tinyagents_graph::todos — Task Management Facade
OpenHuman includes a compatibility façade for the legacy tinyagents_graph::todos module in src/openhuman/threads/todos/mod.rs. This module powers the "Todos" UI by re-exporting and extending the base graph functionality for task management.
Where OpenHuman Declares TinyAgents Dependencies
The dependency declarations live in the root Cargo.toml, where each TinyAgents crate is vendored under the vendor/ directory structure. The source files for these dependencies are located at:
vendor/tinyagents/Cargo.toml— Core runtime sourcevendor/tinyagents_harness/Cargo.toml— Tool execution implementationvendor/tinyagents_graph/Cargo.toml— Graph algorithm implementationsvendor/tinyagents_session/Cargo.toml— Persistent storage layer
Key integration points in the OpenHuman source include:
src/openhuman/agent/tinyagents/mod.rs— Entry point that re-exports coretinyagentstypessrc/openhuman/tools/traits.rs— Re-exports tool traits from the harness layersrc/openhuman/threads/todos/mod.rs— Compatibility layer for the todos graph modulesrc/openhuman/web_chat/run_task.rs— UI layer integration with harness execution and telemetry
Code Examples: Using TinyAgents Crates in OpenHuman
Initializing the Agent Harness
The Harness builder from tinyagents creates the runtime environment for agent execution:
use openhuman_core::openhuman::agent::tinyagents::Harness;
let harness = Harness::builder()
.provider(openhuman_core::provider::openai_compatible("https://api.openai.com", "my‑key"))
.workspace(openhuman_core::workspace::Ephemeral)
.access(openhuman_core::access::full())
.build()
.await?;
Executing Tools with Context
Tool execution utilizes ToolExecutionContext from tinyagents_harness:
use tinyagents_harness::tool::ToolExecutionContext;
let ctx = ToolExecutionContext::new(&run_config);
let result = ctx.execute_tool("search_web", json!({ "query": "rust async" })).await?;
Working with Planning Graphs
The planning system uses tinyagents_graph types to validate workflow DAGs:
use tinyagents_graph::graph::Plan;
let plan = Plan::from_json(&json_plan)?;
plan.validate()?; // ensures the DAG is well‑formed
Persisting Run History
Run ledger operations use tinyagents_session to store telemetry:
use tinyagents_session::run_ledger::{upsert_agent_run, RunTelemetry};
let upsert = upsert_agent_run(
&config.workspace_dir,
tinyagents_session::run_ledger::AgentRunUpsert {
run_id: run_id.clone(),
status: tinyagents_session::run_ledger::AgentRunStatus::Running,
..Default::default()
},
)?;
let telemetry = RunTelemetry { duration_ms: 123, ..Default::default() };
upsert_run_telemetry(&config.workspace_dir, telemetry)?;
Managing Todo Graphs
The todos module interface works with the graph façade:
use openhuman::threads::todos::{crate_runs, CardPatch};
let runs = crate_runs(&workspace_dir)?;
let patch = CardPatch::from_diff(&old_board, &new_board);
Summary
- Four core crates: OpenHuman depends on
tinyagents,tinyagents_harness,tinyagents_graph, andtinyagents_sessionfor its complete agent stack. - Vendored dependencies: All TinyAgents crates are vendored under
vendor/and declared in the rootCargo.tomlwith explicit path dependencies. - Tool execution: The
tinyagents_harnesscrate provides theToolExecutionContextandTooltrait definitions used insrc/openhuman/tools/traits.rs. - Planning graphs:
tinyagents_graphhandles DAG validation and workflow structures, with a compatibility layer insrc/openhuman/threads/todos/mod.rs. - Persistence:
tinyagents_sessionmanages run history and telemetry storage for UI observability. - Transitive dependencies:
tinyagents_toolis pulled in throughtinyagents_harnessfor low-level tool schemas and error types.
Frequently Asked Questions
What is the primary TinyAgents crate for agent runtime in OpenHuman?
The tinyagents crate provides the core agent harness and runtime, exposing the Harness builder and high-level run/turn APIs that coordinate agent execution cycles. It is declared in the root Cargo.toml with the path vendor/tinyagents.
How does OpenHuman persist agent run history?
OpenHuman uses the tinyagents_session crate to maintain a run-ledger that stores every agent run, workflow execution, and telemetry data. This enables the UI layer to display historical run information and supports system observability through functions like upsert_agent_run() and upsert_run_telemetry().
Where are the TinyAgents dependencies declared in the OpenHuman repository?
All TinyAgents crate dependencies are declared in the root Cargo.toml using vendored paths (e.g., path = "vendor/tinyagents"), with corresponding source code located in vendor/tinyagents/Cargo.toml, vendor/tinyagents_harness/Cargo.toml, vendor/tinyagents_graph/Cargo.toml, and vendor/tinyagents_session/Cargo.toml.
Does OpenHuman use any TinyAgents crates transitively?
Yes, OpenHuman transitively depends on tinyagents_tool through tinyagents_harness, which provides low-level tool schema definitions and error types. While not directly listed in Cargo.toml, it appears in the compiled dependency graph and is used for tool result handling and validation.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →