Skip to content

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

chore(agent): tidy host agent turn plumbing

Steven Enamakelc35a91b6c093
diff --git a/crates/openhuman-core/src/agent/host_agents.rs b/crates/openhuman-core/src/agent/host_agents.rs
index feb86b9d7d..1cf8550a75 100644
--- a/crates/openhuman-core/src/agent/host_agents.rs
+++ b/crates/openhuman-core/src/agent/host_agents.rs
@@ -114,7 +114,7 @@ impl HostAgent {
turn_deadline: turn_deadline
.map(tinyagents_harness::turn_deadline::TurnDeadline::starting_now),
approval: approval.clone(),
- memory_identity: Some(crate::memory::scope::MemoryIdentity::root().child(agent_id)),
+ memory_identity: Some(crate::memory::scope::MemoryIdentity::root().child(&agent_id)),
..Default::default()
});
self.scope(session.run_single_with_approval(message, Some(origin), approval))
diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/turn.rs b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/turn.rs
index 607ac381e4..023f23a01c 100644
--- a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/turn.rs
+++ b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/turn.rs
@@ -36,7 +36,7 @@ pub(crate) struct HostChannelTurn {
/// Run `turn` as `host`: its definition and host tools, inside its context,
/// under `turn.origin` and the posture that origin calls for.
pub(crate) async fn run_host_agent_turn(
- host: HostAgent,
+ mut host: HostAgent,
turn: HostChannelTurn,
) -> anyhow::Result<AgentTurnResponse> {
let HostChannelTurn {
diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs b/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs
index 6789e719ae..b928912ad1 100644
--- a/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs
+++ b/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs
@@ -15,7 +15,6 @@ use std::sync::Arc;
use std::time::{Duration, Instant};
use tinyagents_harness::progress::AgentProgress;
use tinychannels_bus as traits;
-use tinychannels_runtime::context::ChatMessage;
use tokio_util::sync::CancellationToken;
use tokio_util::task::AbortOnDropHandle;
@@ -436,7 +435,7 @@ pub(crate) async fn process_channel_runtime_message(
}
None => None,
};
- let cancellation = CancellationToken::new();
+ let cancellation = tinyagents_harness::CancellationToken::new();
let agent_call: std::pin::Pin<
Box<dyn std::future::Future<Output = anyhow::Result<AgentTurnResponse>> + Send + '_>,
> = match selected_host {