Skip to content

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

chore: files changed crates/openhuman-embed/Cargo.toml,crates/openhuman-embed/src/lib.rs,crates/open

Steven Enamakel3ee31fe6b153
diff --git a/crates/openhuman-embed/Cargo.toml b/crates/openhuman-embed/Cargo.toml
index e14b9934a5..178e54dabd 100644
--- a/crates/openhuman-embed/Cargo.toml
+++ b/crates/openhuman-embed/Cargo.toml
@@ -37,6 +37,10 @@ serde = { version = "1", features = ["derive"] }
serde_json = "1"
tempfile = "3"
thiserror = "2"
+# The memory facade (`memory`) speaks TinyMemory's contract types; same path as
+# the core's so one copy resolves.
+tinymemory-api = { path = "../../vendor/tinymemory/crates/tinymemory-api" }
+tinymemory-tools = { path = "../../vendor/tinymemory/crates/tinymemory-tools" }
# Construct the owned wire config directly; core adds host disclosure policy.
tinymcp-bus = { path = "../../vendor/tinymcp/crates/tinymcp-bus" }
tokio = { version = "1", features = ["macros", "rt-multi-thread", "sync", "time"] }
@@ -45,6 +49,7 @@ uuid = { version = "1", features = ["v4"] }
[dev-dependencies]
async-trait = "0.1"
+tinymemory-api = { path = "../../vendor/tinymemory/crates/tinymemory-api", features = ["conformance"] }
dirs = "6"
env_logger = "0.11"
wiremock = "0.6"
diff --git a/crates/openhuman-embed/src/lib.rs b/crates/openhuman-embed/src/lib.rs
index 1bc93bba16..fa1841572d 100644
--- a/crates/openhuman-embed/src/lib.rs
+++ b/crates/openhuman-embed/src/lib.rs
@@ -92,6 +92,7 @@ mod config;
mod core_agent;
mod error;
mod harness;
+pub mod memory;
mod runtime;
mod turn;
diff --git a/crates/openhuman-embed/src/runtime/mod.rs b/crates/openhuman-embed/src/runtime/mod.rs
index f537fcb87a..f52e1a93c0 100644
--- a/crates/openhuman-embed/src/runtime/mod.rs
+++ b/crates/openhuman-embed/src/runtime/mod.rs
@@ -260,6 +260,19 @@ impl Runtime {
HarnessCore::new(self.core_ref())
}
+ /// One tenant's memory: the agents, items, learnings and brain below the
+ /// layout root `root` (`team:acme`), every call confined to that subtree.
+ /// Bind agents to the same root ([`MemoryBinding::root`](crate::MemoryBinding::root))
+ /// and this is their memory as the operator sees it. See [`crate::memory`].
+ ///
+ /// # Errors
+ ///
+ /// [`MemoryError::InvalidRequest`](crate::memory::MemoryError::InvalidRequest)
+ /// when `root` is not a valid layout root, or is the store root itself.
+ pub fn memory(&self, root: &str) -> crate::memory::MemoryResult<crate::memory::Memory> {
+ crate::memory::Memory::bind(self.base_config.clone(), root)
+ }
+
/// The directory holding `config.toml`, the credential store and, for
/// runtime-owned workspaces, the `workspace/` and `agents/` trees.
pub fn root_dir(&self) -> &Path {