The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
refactor: consume TinyTools agent protocols
Steven Enamakelc08026bcf7f1
diff --git a/Cargo.lock b/Cargo.lockindex bbd4449c52..121691b1db 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -6450,10 +6450,10 @@ dependencies = ["serde_json","sha2 0.11.0","thiserror 2.0.20",- "tinyagents-tool-call","tinyagents-tracing","tinyinference","tinytools",+ "tinytools-agent","tokio",]@@ -6490,17 +6490,6 @@ dependencies = ["tinyagents-tracing",]-[[package]]-name = "tinyagents-tool-call"-version = "2.1.2"-dependencies = [- "regex",- "serde",- "serde_json",- "tinyagents-tracing",- "tinyinference",-]-[[package]]name = "tinyagents-tracing"version = "2.1.2"@@ -6848,6 +6837,16 @@ dependencies = ["serde_json",]+[[package]]+name = "tinytools-agent"+version = "0.1.0"+dependencies = [+ "regex",+ "serde",+ "serde_json",+ "tinytools",+]+[[package]]name = "tinyvec"version = "1.12.0"diff --git a/crates/openhuman-core/src/agent/dispatcher.rs b/crates/openhuman-core/src/agent/dispatcher.rsindex cf808a6e2b..c0a2bc6197 100644--- a/crates/openhuman-core/src/agent/dispatcher.rs+++ b/crates/openhuman-core/src/agent/dispatcher.rs@@ -20,7 +20,7 @@//! maps that keep the wire bytes identical while the logic lives upstream.//!//! Second, the **[`Tool`] trait object**. The crate takes-//! [`ToolSchema`](tinyinference::tool::ToolSchema)s, never a host's tool+//! [`tinytools::ToolSpec`] values, never a host's tool//! type, for the reason the parse seam already documents: a crate that depended//! on OpenHuman's `Tool` could not be used by a second host. So//! [`ToolDispatcher::prompt_instructions`] reads names and schemas off the@@ -43,7 +43,7 @@ use tinyagents_harness::tool_calling::dialect::{DialectMessage, DialectResponse, DialectRole, NativeDialect, NativeToolCall, PFormatDialect,ToolDialect, ToolOutcome, ToolResultEntry, TranscriptEntry, XmlDialect,};-use tinyinference::tool::ToolSchema;+use tinytools::ToolSpec as ProtocolToolSpec;/// A parsed tool call representation after being extracted from an LLM response.#[derive(Debug, Clone)]@@ -253,17 +253,25 @@ fn from_dialect_message(message: DialectMessage) -> ChatMessage {}}-fn to_schemas(specs: &[ToolSpec]) -> Vec<ToolSchema> {+fn to_schemas(specs: &[ToolSpec]) -> Vec<ProtocolToolSpec> {specs.iter()- .map(|spec| ToolSchema::new(&spec.name, &spec.description, spec.parameters.clone()))+ .map(|spec| ProtocolToolSpec {+ name: spec.name.clone(),+ description: spec.description.clone(),+ parameters: spec.parameters.clone(),+ }).collect()}-fn schemas_from_tools(tools: &[Box<dyn Tool>]) -> Vec<ToolSchema> {+fn schemas_from_tools(tools: &[Box<dyn Tool>]) -> Vec<ProtocolToolSpec> {tools.iter()- .map(|tool| ToolSchema::new(tool.name(), tool.description(), tool.parameters_schema()))+ .map(|tool| ProtocolToolSpec {+ name: tool.name().to_string(),+ description: tool.description().to_string(),+ parameters: tool.parameters_schema(),+ }).collect()}diff --git a/crates/openhuman-core/src/agent/prompts/sections.rs b/crates/openhuman-core/src/agent/prompts/sections.rsindex 4fcb461b87..ed3fec5014 100644--- a/crates/openhuman-core/src/agent/prompts/sections.rs+++ b/crates/openhuman-core/src/agent/prompts/sections.rs@@ -13,7 +13,7 @@ use super::types::*;use anyhow::Result;use std::fmt::Write;use tinyagents_harness::tool_calling::dialect::render_pformat_catalogue;-use tinyinference::tool::ToolSchema;+use tinytools::ToolSpec;// ─────────────────────────────────────────────────────────────────────────────// Special sections (archetype, dynamic, reflection)@@ -388,7 +388,7 @@ impl PromptSection for ToolsSection {// dispatchers the dispatcher's own `prompt_instructions` block// (appended below) carries whatever schema detail the wire format needs.let has_filter = !ctx.visible_tool_names.is_empty();- let visible: Vec<ToolSchema> = ctx+ let visible: Vec<ToolSpec> = ctx.tools.iter().filter(|tool| !has_filter || ctx.visible_tool_names.contains(tool.name))@@ -407,7 +407,11 @@ impl PromptSection for ToolsSection {},None => serde_json::Value::Null,};- ToolSchema::new(tool.name, tool.description, parameters)+ ToolSpec {+ name: tool.name.to_string(),+ description: tool.description.to_string(),+ parameters,+ }}).collect();let mut out = render_pformat_catalogue(&visible);diff --git a/vendor/tinyagents b/vendor/tinyagentsindex fcd4a83b12..cc64cf7b15 160000--- a/vendor/tinyagents+++ b/vendor/tinyagents@@ -1 +1 @@-Subproject commit fcd4a83b12a6e5a231dc18f825720498bc4b15e0+Subproject commit cc64cf7b1512c1a9d2ec68c9df64f3dc865881d5