Skip to content

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

feat(tinyagents): register tools for tinyagents

Steven Enamakel8fcb69db78bc
diff --git a/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs b/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs
index 4def8d84fb..1428ea2233 100644
--- a/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs
@@ -107,7 +107,10 @@ impl ToolExecScope for TurnOriginScope {
.and_then(|extension| extension.downcast_ref::<ToolExecutionContext>())
.and_then(|context| context.state::<HostOperationContext>())
.and_then(|context| context.origin.clone());
- match (origin, CoreContext::current()) {
+ match (
+ origin,
+ super::host::operation_context::dispatch_ctx_for_tool(context).into_core(),
+ ) {
(Some(origin), Some(core_context)) => Box::pin(CoreContext::scope_with_turn_origin(
core_context,
Some(origin),