Skip to content

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

feat(agent): add run context to tinyagents host

Steven Enamakel95cae3765259
diff --git a/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs b/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs
index 5031ff4fe1..5d41f61844 100644
--- a/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs
@@ -307,9 +307,8 @@ pub struct OpenHumanRunContext {
pub parent: Option<ParentExecutionContext>,
/// Context-preparation sources already consumed in this turn.
pub prepared_context_sources: Arc<Vec<AgentContextPreparedSource>>,
- /// Who this run acts as on memory (agent definition and team): set by the
- /// entry point, narrowed with `child(id)` per sub-agent, read by the memory
- /// tool and hooks. `None` is the root identity.
+ /// Who the run acts as on memory (agent and team), narrowed with `child(id)`
+ /// per sub-agent; `None` is the root identity.
pub memory_identity: Option<crate::memory::scope::MemoryIdentity>,
/// File-state identity used to detect stale parent reads after child writes.
pub file_state_agent_id: Option<String>,
diff --git a/crates/openhuman-core/src/memory/tools_agent_tests.rs b/crates/openhuman-core/src/memory/tools_agent_tests.rs
index 49a022c2c1..bf1f097600 100644
--- a/crates/openhuman-core/src/memory/tools_agent_tests.rs
+++ b/crates/openhuman-core/src/memory/tools_agent_tests.rs
@@ -72,7 +72,9 @@ fn tool_context_acting_as(
#[test]
fn gather_acts_as_the_identity_the_run_carries() {
let config = Config::default();
- let context = tool_context_acting_as(crate::memory::scope::MemoryIdentity::team_member("acme", "scout"));
+ let context = tool_context_acting_as(crate::memory::scope::MemoryIdentity::team_member(
+ "acme", "scout",
+ ));
let facts = CallFacts::gather(&config, Some(&context));
assert_eq!(facts.agent_id.as_deref(), Some("scout"));
assert_eq!(facts.reach, Reach::subtree("team:acme".parse().unwrap()));