Skip to content

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

refactor(profile, bench): remove obsolete memory-tree and noop-memory references

Steven Enamakelc25a78f2b4af
diff --git a/crates/openhuman-cli/src/bin/library_profile/harness.rs b/crates/openhuman-cli/src/bin/library_profile/harness.rs
index 304d2019f9..3d8b10936b 100644
--- a/crates/openhuman-cli/src/bin/library_profile/harness.rs
+++ b/crates/openhuman-cli/src/bin/library_profile/harness.rs
@@ -152,7 +152,7 @@ impl Drop for EnvGuard {
}
/// A hermetic config rooted in a throwaway temp workspace. Local inference,
-/// Python, spaCy, and embeddings are all disabled so runs are offline.
+/// Python and embeddings are all disabled so runs are offline.
pub struct Fixture {
pub config: Config,
_workspace_env: EnvGuard,
@@ -186,19 +186,16 @@ runtime_enabled = false
[runtime_python]
enabled = false
-
-[memory_tree]
-spacy_enabled = false
"#
.to_string();
if std::env::var_os("OPENHUMAN_PROFILE_DISABLE_MEMORY_WRITES").is_some() {
config_toml.push_str(
r#"
-[memory]
-auto_save = false
+[memory.conversations]
+enabled = false
-[learning]
-episodic_capture_enabled = false
+[memory.context]
+enabled = false
"#,
);
}
@@ -222,9 +219,6 @@ level = "full"
let mut config: Config = toml::from_str(&config_toml)?;
config.workspace_dir = workspace;
config.action_dir = action_dir;
- config.memory_tree.embedding_endpoint = None;
- config.memory_tree.embedding_model = None;
- config.memory_tree.embedding_strict = false;
Ok(Fixture {
config,
diff --git a/crates/openhuman-cli/src/bin/rss_bench.rs b/crates/openhuman-cli/src/bin/rss_bench.rs
index cb444f346d..735de31562 100644
--- a/crates/openhuman-cli/src/bin/rss_bench.rs
+++ b/crates/openhuman-cli/src/bin/rss_bench.rs
@@ -3,8 +3,7 @@
//!
//! Mirrors the OpenCompany embedding contract: a bare [`OpenHumanSessionHost`] built directly
//! via [`OpenHumanSessionHost::builder`] (no `CoreBuilder`, no RPC, no background services)
-//! with an injected mock model, an in-process `"none"` memory backend, and a
-//! per-agent temp workspace. Builds a 1-agent and an 8-agent roster, runs one
+//! with an injected mock model and a per-agent temp workspace. Builds a 1-agent and an 8-agent roster, runs one
//! deterministic warm-up turn per agent to fault in lazy allocations, settles,
//! then samples `/proc/self/{status,smaps_rollup}`.
//!
@@ -27,7 +26,6 @@
use anyhow::{Context, Result};
use async_trait::async_trait;
use openhuman_core::agent::OpenHumanSessionHost;
-use openhuman_core::memory::{Memory, MemoryCategory, MemoryEntry, NamespaceSummary, RecallOpts};
use openhuman_core::platform::proc_metrics::{
self, BenchReport, ProcSample, RosterResult, REPORT_SCHEMA_VERSION, RSS_BUDGET_KIB,
RSS_HARD_CAP_KIB,
@@ -91,65 +89,6 @@ impl Tool for EchoTool {
}
}
-/// Zero-allocation no-op `Memory` for the fixture.
-///
-/// The benchmark measures a bare agent under the OpenCompany embedding contract
-/// (host supplies its own `Memory` over its context store), *not* a memory
-/// store. `create_memory(MemoryConfig{ backend: "none", .. })` does **not**
-/// select a no-op backend — it always builds a `UnifiedMemory` (SQLite + the
-/// default cloud embedder), which would inflate the measured RSS with
-/// memory-store setup. Injecting a real no-op keeps the reading on the agent
-/// harness itself.
-struct NoopMemory;
-
-#[async_trait]
-impl Memory for NoopMemory {
- fn name(&self) -> &str {
- "noop"
- }
- async fn store(
- &self,
- _namespace: &str,
- _key: &str,
- _content: &str,
- _category: MemoryCategory,
- _session_id: Option<&str>,
- ) -> Result<()> {
- Ok(())
- }
- async fn recall(
- &self,
- _query: &str,
- _limit: usize,
- _opts: RecallOpts<'_>,
- ) -> Result<Vec<MemoryEntry>> {
- Ok(Vec::new())
- }
- async fn get(&self, _namespace: &str, _key: &str) -> Result<Option<MemoryEntry>> {
- Ok(None)
- }
- async fn list(
- &self,
- _namespace: Option<&str>,
- _category: Option<&MemoryCategory>,
- _session_id: Option<&str>,
- ) -> Result<Vec<MemoryEntry>> {
- Ok(Vec::new())
- }
- async fn forget(&self, _namespace: &str, _key: &str) -> Result<bool> {
- Ok(false)
- }
- async fn namespace_summaries(&self) -> Result<Vec<NamespaceSummary>> {
- Ok(Vec::new())
- }
- async fn count(&self) -> Result<usize> {
- Ok(0)
- }
- async fn health_check(&self) -> bool {
- true
- }
-}
-
/// A built roster plus the temp workspaces that must outlive it — dropping the
/// `TempDir`s would delete the agents' workspaces mid-measurement.
struct Roster {
@@ -172,12 +111,9 @@ fn build_roster(n: usize) -> Result<Roster> {
let workspace = TempDir::new().context("create temp workspace")?;
let path = workspace.path().to_path_buf();
- let memory: Arc<dyn Memory> = Arc::new(NoopMemory);
-
let agent = OpenHumanSessionHost::builder()
.chat_model(Arc::new(MockModel))
.tools(vec![Box::new(EchoTool)])
- .memory(memory)
.tool_dispatcher(Box::new(NativeDialect))
.model_name("bench-mock".into())
// Use a real built-in id because the hosted invocation resolves
@@ -185,7 +121,6 @@ fn build_roster(n: usize) -> Result<Roster> {
.agent_definition_name("orchestrator")
.workspace_dir(path.clone())
.action_dir(path)
- .auto_save(false)
.build()
.context("build bench agent")?;
agents.push(agent);