Skip to content

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

chore: pin TinyMemory v1.27.2 and verify harness integration

Steven Enamakel92f1990fc36e
diff --git a/Cargo.lock b/Cargo.lock
index aa91c7be64..058dd6ea49 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -7769,7 +7769,7 @@ dependencies = [
[[package]]
name = "tinymemory-api"
-version = "1.27.1"
+version = "1.27.2"
dependencies = [
"async-trait",
"chrono",
@@ -7782,7 +7782,7 @@ dependencies = [
[[package]]
name = "tinymemory-integrations"
-version = "1.27.1"
+version = "1.27.2"
dependencies = [
"async-trait",
"calamine",
@@ -7809,7 +7809,7 @@ dependencies = [
[[package]]
name = "tinymemory-tools"
-version = "1.27.1"
+version = "1.27.2"
dependencies = [
"chrono",
"futures",
diff --git a/crates/openhuman-core/src/memory/tools_tests.rs b/crates/openhuman-core/src/memory/tools_tests.rs
index e96843df9b..09f1fce501 100644
--- a/crates/openhuman-core/src/memory/tools_tests.rs
+++ b/crates/openhuman-core/src/memory/tools_tests.rs
@@ -74,6 +74,46 @@ async fn the_memory_tool_stops_write_churn_and_recovers_on_the_next_chat_turn()
assert_eq!(stored(&engine, MetaFilter::default()).await.len(), 9);
}
+#[tokio::test]
+async fn harness_runs_have_independent_budgets_and_learning_retries_replay() {
+ use tinyagents_harness::context::{RunConfig, RunContext};
+ use tinyagents_harness::ids::CallId;
+ use tinyagents_harness::tool::ToolExecutionContext;
+ let tmp = tempfile::tempdir().unwrap();
+ let config = config_in(&tmp);
+ let engine = bind_reference(&config);
+ let tool = MemoryTool::new(Arc::new(config));
+ let first: RunContext = RunContext::new(RunConfig::new("first-harness-run"), ());
+ let next: RunContext = RunContext::new(RunConfig::new("next-harness-run"), ());
+ let args = json!({"action":"learn","text":"Prefers tea"});
+ let mut ids = HashSet::new();
+ for i in 0..9 {
+ let context =
+ ToolExecutionContext::from_run_context(&first, CallId::new(format!("call-{i}")));
+ let result = tool
+ .execute_with_context(args.clone(), ToolCallOptions::default(), Some(&context))
+ .await
+ .unwrap();
+ assert_eq!(result.is_error, i == 8);
+ if !result.is_error {
+ let value: Value = serde_json::from_str(&result.text()).unwrap();
+ ids.insert(value["id"].as_str().unwrap().to_string());
+ }
+ }
+ assert_eq!(
+ ids.len(),
+ 1,
+ "invocation IDs must not create duplicate learnings"
+ );
+ let context = ToolExecutionContext::from_run_context(&next, CallId::new("next-call"));
+ let result = tool
+ .execute_with_context(args, ToolCallOptions::default(), Some(&context))
+ .await
+ .unwrap();
+ assert!(!result.is_error, "a new harness run gets a fresh budget");
+ assert_eq!(stored(&engine, MetaFilter::default()).await.len(), 1);
+}
+
#[test]
fn schema_and_permissions_follow_the_action() {
let tool = MemoryTool::new(Arc::new(Config::default()));
diff --git a/vendor/tinymemory b/vendor/tinymemory
index cefb3e9b2e..f30b9bbb73 160000
--- a/vendor/tinymemory
+++ b/vendor/tinymemory
@@ -1 +1 @@
-Subproject commit cefb3e9b2e81b041635725ed116a08d0cf45a261
+Subproject commit f30b9bbb7319a6a7c2fb1aaa3670281f1dc4a9ba