Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

refactor(tools): remove agent configuration from tool builders

Steven Enamakeledd50baa7911
diff --git a/crates/openhuman-core/src/agent/session_host/builder/factory.rs b/crates/openhuman-core/src/agent/session_host/builder/factory.rs
index b556ac4e0b..1076aabb0c 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/factory.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/factory.rs
@@ -199,7 +199,6 @@ impl OpenHumanSessionHost {
&tool_config.browser,
&tool_config.http_request,
&tool_config.action_dir,
- &tool_config.agents,
&tool_config,
workspace_descriptor
.as_ref()
diff --git a/crates/openhuman-core/src/tools/native_ops.rs b/crates/openhuman-core/src/tools/native_ops.rs
index 5fed8340e7..b5ba1d0019 100644
--- a/crates/openhuman-core/src/tools/native_ops.rs
+++ b/crates/openhuman-core/src/tools/native_ops.rs
@@ -98,7 +98,6 @@ pub fn build_runtime_tools(config: &Config) -> Result<Vec<Box<dyn Tool>>, String
&config.browser,
&config.http_request,
&config.action_dir,
- &config.agents,
config,
None,
);
diff --git a/crates/openhuman-core/src/tools/ops.rs b/crates/openhuman-core/src/tools/ops.rs
index 9fe098cb9c..481460bbf4 100644
--- a/crates/openhuman-core/src/tools/ops.rs
+++ b/crates/openhuman-core/src/tools/ops.rs
@@ -423,7 +423,6 @@ pub fn all_tools_with_runtime(
browser_config,
http_config,
action_dir,
- agents,
approval_workspace_root,
};
diff --git a/crates/openhuman-core/src/tools/sources.rs b/crates/openhuman-core/src/tools/sources.rs
index 8b0ff901ca..7fc150fdcf 100644
--- a/crates/openhuman-core/src/tools/sources.rs
+++ b/crates/openhuman-core/src/tools/sources.rs
@@ -14,13 +14,12 @@
//!
//! The registry is generic: it knows nothing about what a source builds.
-use std::collections::HashMap;
use std::path::Path;
use std::sync::Arc;
use tinytools::Tool;
-use crate::config::{BrowserConfig, Config, DelegateAgentConfig, HttpRequestConfig};
+use crate::config::{BrowserConfig, Config, HttpRequestConfig};
use crate::core::slots::HookSlot;
use crate::modules::tinybox::host_runtime::RuntimeAdapter;
use crate::security::{AuditLogger, SecurityPolicy};
@@ -39,7 +38,6 @@ pub struct ToolSourceCtx<'a> {
pub http_config: &'a HttpRequestConfig,
/// The agent's permitted read/write root.
pub action_dir: &'a Path,
- pub agents: &'a HashMap<String, DelegateAgentConfig>,
pub approval_workspace_root: Option<&'a Path>,
}
@@ -49,10 +47,8 @@ pub type ToolSourceFactory =
/// Anchor point: right after the search tools, before hosting.
pub const ANCHOR_AFTER_SEARCH: &str = "after_search";
-/// Anchor point: right after the delegation tool, before the Composio tools.
-pub const ANCHOR_AFTER_DELEGATE: &str = "after_delegate";
/// Every anchor `all_tools_with_runtime` splices sources into.
-pub const ANCHORS: [&str; 2] = [ANCHOR_AFTER_SEARCH, ANCHOR_AFTER_DELEGATE];
+pub const ANCHORS: [&str; 1] = [ANCHOR_AFTER_SEARCH];
/// Where in the catalogue a source's tools go.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]