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(agent): rename run_channel_turn_via_graph to run_channel_turn
Steven Enamakelc5ac61ed973c
diff --git a/crates/openhuman-core/src/agent/README.md b/crates/openhuman-core/src/agent/README.mdindex b1dd08cb35..fe0a5dc377 100644--- a/crates/openhuman-core/src/agent/README.md+++ b/crates/openhuman-core/src/agent/README.md@@ -151,7 +151,7 @@ In order:The bus path is shorter. `bus.rs` scopes the origin, sandbox mode and filestate agent id, then calls-`channels::runtime::turn_driver::run_channel_turn_via_graph`+`channels::runtime::turn_driver::run_channel_turn`([`../channels/runtime/turn_driver.rs`](../channels/runtime/turn_driver.rs)),which calls `TurnSpec::run`. There is no TinyAgents `Session`: the caller ownsthe history vector, anddiff --git a/crates/openhuman-core/src/agent/bus.rs b/crates/openhuman-core/src/agent/bus.rsindex cada296d04..dde9831a31 100644--- a/crates/openhuman-core/src/agent/bus.rs+++ b/crates/openhuman-core/src/agent/bus.rs@@ -3,7 +3,7 @@//! The agent domain publishes one native request handler, `agent.run_turn`,//! which executes a single end-to-end agentic turn (LLM call → tool calls →//! loop until final text) on the tinyagents harness via-//! [`run_channel_turn_via_graph`](crate::channels::runtime::turn_driver::run_channel_turn_via_graph)+//! [`run_channel_turn`](crate::channels::runtime::turn_driver::run_channel_turn)//! (issue #4249; the legacy `run_tool_call_loop` was removed).//!//! Consumers call it via [`crate::core::bus::BUS.native().request`]@@ -31,7 +31,7 @@ use tinyagents_session::transcript::TranscriptMessage;use tinytools::Tool;use crate::agent_registry::host_definition::AgentDefinitionRegistry;-use crate::channels::runtime::turn_driver::run_channel_turn_via_graph;+use crate::channels::runtime::turn_driver::run_channel_turn;use tinyagents_definition::SandboxMode;use tinytools_std::file_state::with_file_state_agent_id;@@ -313,7 +313,7 @@ async fn handle_agent_run_turn(req: AgentTurnRequest) -> Result<AgentTurnRespons// `on_delta` (raw Sender<String>) is superseded by// `on_progress` text deltas, so it's intentionally unused.let _ = (&provider_name, silent, &channel_name, on_delta);- run_channel_turn_via_graph(+ run_channel_turn(turn_model_source.clone(),&mut history,tools_registry.clone(),diff --git a/crates/openhuman-core/src/agent/harness/README.md b/crates/openhuman-core/src/agent/harness/README.mdindex c22c4a86e2..4149617bb8 100644--- a/crates/openhuman-core/src/agent/harness/README.md+++ b/crates/openhuman-core/src/agent/harness/README.md@@ -84,8 +84,8 @@ turn lifecycle are in `../session_host/`; `OpenHumanSubagentHost`,- `../session_host/` and `../subagent_host/` build turns from thedefinitions and prompt data this module supplies; parent context types areowned by `../subagent_host/`.-- `agent/bus.rs` serves the `agent.run_turn` native request through the- driver in [`channels/runtime/turn_driver.rs`](../../channels/runtime/turn_driver.rs);+- `agent/bus.rs` serves the `agent.run_turn` native request through+ `run_channel_turn` in [`channels/runtime/turn_driver.rs`](../../channels/runtime/turn_driver.rs);channels reach it through that bus.- [`channels/runtime/dispatch/routing.rs`](../../channels/runtime/dispatch/routing.rs) consults`AgentDefinitionRegistry`/`ToolScope`.diff --git a/crates/openhuman-core/src/channels/runtime/turn_driver.rs b/crates/openhuman-core/src/channels/runtime/turn_driver.rsindex 511dc1168c..baabb3312f 100644--- a/crates/openhuman-core/src/channels/runtime/turn_driver.rs+++ b/crates/openhuman-core/src/channels/runtime/turn_driver.rs@@ -21,7 +21,7 @@//! early-exit tool: it pauses the turn and returns its question as the turn's//! text, which the channel relays as the reply.//!-//! **Summarization.** [`run_channel_turn_via_graph`] resolves the model's+//! **Summarization.** [`run_channel_turn`] resolves the model's//! effective context window before dispatch so the shared seam runs the//! context-window summarization step (`tinyagents::summarize`) ahead of the//! deterministic front-trim.@@ -44,7 +44,7 @@ use tinytools::Tool;/// `on_progress` is `Some`, the run streams and mirrors progress onto/// `AgentProgress`; pass `None` for a fire-and-forget final-text turn.#[allow(clippy::too_many_arguments)]-pub(crate) async fn run_channel_turn_via_graph(+pub(crate) async fn run_channel_turn(source: TurnModelSource,history: &mut Vec<TranscriptMessage>,tools_registry: Arc<Vec<Box<dyn Tool>>>,@@ -139,7 +139,7 @@ pub(crate) async fn run_channel_turn_via_graph(max_iterations,observed = on_progress.is_some(),context_window,- "[channel:graph] routing channel turn through tinyagents harness"+ "[channel:turn] routing channel turn through tinyagents harness");let turn_origin = origin.clone();let mut run_context = crate::agent::tinyagents::host::OpenHumanRunContext::new()diff --git a/crates/openhuman-core/src/channels/runtime/turn_driver_tests.rs b/crates/openhuman-core/src/channels/runtime/turn_driver_tests.rsindex bb6cd8422d..eff0d9bd91 100644--- a/crates/openhuman-core/src/channels/runtime/turn_driver_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/turn_driver_tests.rs@@ -24,7 +24,7 @@ impl Tool for PingTool {}#[tokio::test]-async fn channel_turn_runs_through_the_graph() {+async fn channel_turn_runs_tools_and_returns_final_text() {let registry: Arc<Vec<Box<dyn Tool>>> = Arc::new(vec![Box::new(PingTool)]);let mut history = vec![TranscriptMessage::user("ping please")];let scripted: Arc<dyn ChatModel<()>> = Arc::new(ScriptedModel::new(vec![@@ -50,7 +50,7 @@ async fn channel_turn_runs_through_the_graph() {let mut profile = ModelProfile::default();profile.tool_calling = true;profile.parallel_tool_calls = true;- let text = run_channel_turn_via_graph(+ let text = run_channel_turn(TurnModelSource::from_model_with_profile(scripted, profile),&mut history,registry,@@ -68,7 +68,7 @@ async fn channel_turn_runs_through_the_graph() {Default::default(),).await- .expect("channel graph turn runs");+ .expect("channel turn runs");assert_eq!(text.text, "channel done");assert!(history.iter().any(|m| m.content.contains("pong")));}@@ -114,7 +114,7 @@ async fn channel_turn_pauses_on_ask_user_clarification() {let mut profile = ModelProfile::default();profile.tool_calling = true;profile.parallel_tool_calls = true;- let text = run_channel_turn_via_graph(+ let text = run_channel_turn(TurnModelSource::from_model_with_profile(scripted, profile),&mut history,registry,@@ -132,7 +132,7 @@ async fn channel_turn_pauses_on_ask_user_clarification() {Default::default(),).await- .expect("channel graph turn runs");+ .expect("channel turn runs");assert_eq!(text.text, "Which three sources?",diff --git a/crates/openhuman-core/src/skills/e2e_plumbing_tests.rs b/crates/openhuman-core/src/skills/e2e_plumbing_tests.rsindex 1563063caa..ee3cb2a4dc 100644--- a/crates/openhuman-core/src/skills/e2e_plumbing_tests.rs+++ b/crates/openhuman-core/src/skills/e2e_plumbing_tests.rs@@ -27,7 +27,7 @@ use std::time::Duration;use async_trait::async_trait;use parking_lot::Mutex;-use crate::channels::runtime::turn_driver::run_channel_turn_via_graph;+use crate::channels::runtime::turn_driver::run_channel_turn;use crate::config::{Config, MultimodalConfig, MultimodalFileConfig};use crate::skills::ops_create::{CreateWorkflowParams, WorkflowCreateInputDef, create_workflow_inner,@@ -189,7 +189,7 @@ async fn mock_llm_orchestrator_lists_and_runs_workflows_through_the_loop() {});let mut history = vec![TranscriptMessage::user("Triage my inbox using a workflow.")];- let result = run_channel_turn_via_graph(+ let result = run_channel_turn(crate::agent::tinyagents::TurnModelSource::from_model_with_profile(model,ModelProfile {