Skip to content

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

fix(config): remove unused memory schema module

Steven Enamakel7599f1c60885
diff --git a/crates/openhuman-core/src/config/schema/memory.rs b/crates/openhuman-core/src/config/schema/memory.rs
index 5d045433c2..7e88520973 100644
--- a/crates/openhuman-core/src/config/schema/memory.rs
+++ b/crates/openhuman-core/src/config/schema/memory.rs
@@ -32,6 +32,11 @@
//! ([`deserialize_sources`]) so a single entry this build does not understand
//! is dropped with a warning instead of failing the whole config.
//!
+//! The `embedding_*` keys also live here. They are not memory v2 settings —
+//! v2 engines embed server-side — but the embedding host (tool discovery,
+//! voice, the `embeddings` RPC) has always read them from `[memory]`, and
+//! moving them would silently reset every user's embedding choice.
+//!
//! The config holds no credential. The CortexDB key lives in the keychain under
//! [`MEMORY_CORTEXDB_KEY_NAME`]; the TinyHumans engine borrows the host's
//! backend credential.
@@ -78,8 +83,28 @@ pub struct MemoryConfig {
skip_serializing_if = "Vec::is_empty"
)]
pub sources: Vec<MemorySourceConfig>,
+ /// Embedding provider of the embedding host (`cloud`, `ollama`, …).
+ pub embedding_provider: String,
+ /// Embedding model id.
+ pub embedding_model: String,
+ /// Embedding dimensions.
+ pub embedding_dimensions: usize,
+ /// Outbound embedding requests per minute for cloud providers; `0`
+ /// disables throttling. Env override: `OPENHUMAN_MEMORY_EMBED_RATE_LIMIT`.
+ pub embedding_rate_limit_per_min: u32,
}
+/// Default `embedding_provider`: the OpenHuman backend (Voyage-backed).
+pub const DEFAULT_EMBEDDING_PROVIDER: &str = "cloud";
+/// Default `embedding_model`; keep in sync with
+/// `embeddings::cloud::DEFAULT_CLOUD_EMBEDDING_MODEL`.
+pub const DEFAULT_EMBEDDING_MODEL: &str = "embedding-v1";
+/// Default `embedding_dimensions`; keep in sync with
+/// `embeddings::cloud::DEFAULT_CLOUD_EMBEDDING_DIMENSIONS`.
+pub const DEFAULT_EMBEDDING_DIMENSIONS: usize = 1024;
+/// Default `embedding_rate_limit_per_min` (cloud backends cap ~60/min).
+pub const DEFAULT_EMBEDDING_RATE_LIMIT_PER_MIN: u32 = 60;
+
impl Default for MemoryConfig {
fn default() -> Self {
Self {
@@ -88,6 +113,10 @@ impl Default for MemoryConfig {
conversations: MemoryConversationsConfig::default(),
context: MemoryContextConfig::default(),
sources: Vec::new(),
+ embedding_provider: DEFAULT_EMBEDDING_PROVIDER.to_string(),
+ embedding_model: DEFAULT_EMBEDDING_MODEL.to_string(),
+ embedding_dimensions: DEFAULT_EMBEDDING_DIMENSIONS,
+ embedding_rate_limit_per_min: DEFAULT_EMBEDDING_RATE_LIMIT_PER_MIN,
}
}
}
diff --git a/crates/openhuman-core/src/config/schema/mod.rs b/crates/openhuman-core/src/config/schema/mod.rs
index 815ab3170f..292aefc3f0 100644
--- a/crates/openhuman-core/src/config/schema/mod.rs
+++ b/crates/openhuman-core/src/config/schema/mod.rs
@@ -30,7 +30,6 @@ pub use hooks::HooksConfig;
pub mod hosting;
pub use hosting::HostingConfig;
mod identity_cost;
-mod learning;
mod load;
pub use load::{
action_dir_env_override, active_user_marker_path, active_workspace_dir,
@@ -55,6 +54,7 @@ pub(crate) use load::CONFIG_OWNER_MISMATCH_MARKER;
pub mod claude_agent_sdk;
pub use claude_agent_sdk::ClaudeAgentSdkConfig;
mod local_ai;
+mod memory;
mod modules;
mod node;
mod observability;
@@ -65,8 +65,6 @@ mod runtime;
mod runtime_pool;
mod runtime_python;
mod scheduler_gate;
-mod storage_memory;
-mod subsystems;
mod task_sources;
mod tokenjuice;
mod tools;
@@ -91,7 +89,6 @@ pub use cron::CronConfig;
pub use dashboard::{DashboardConfig, DiagramViewerConfig, EventStreamConfig, ModelHealthConfig};
pub use dictation::{DictationActivationMode, DictationConfig};
pub use identity_cost::{CostConfig, ModelPricing};
-pub use learning::{LearningConfig, ReflectionSource};
pub use local_ai::{LocalAiConfig, LocalAiUsage};
pub use modules::{ModuleOverride, ModulesConfig};
pub use node::NodeConfig;
@@ -108,14 +105,11 @@ pub use runtime::{
};
pub use runtime_pool::{RuntimePoolConfig, RuntimePoolLangConfig};
pub use runtime_python::RuntimePythonConfig;
-pub use scheduler_gate::{SchedulerGateConfig, SchedulerGateMode};
-pub use storage_memory::{
- LlmBackend, MemoryConfig, MemoryTreeConfig, StorageConfig, StorageProviderConfig,
- StorageProviderSection, DEFAULT_CLOUD_LLM_MODEL,
-};
-pub use subsystems::{
- MemoryDriverConfig, MemoryHooksConfig, MemorySubsystemConfig, SubsystemsConfig,
+pub use memory::{
+ migrate_legacy_source, MemoryConfig, MemoryContextConfig, MemoryConversationsConfig,
+ MemoryEngineSettings, MemorySourceConfig, MemorySourceKind, MEMORY_CORTEXDB_KEY_NAME,
};
+pub use scheduler_gate::{PauseReason, Policy, SchedulerGateConfig, SchedulerGateMode};
pub use task_sources::TaskSourcesConfig;
pub use tokenjuice::TokenjuiceConfig;
pub use tools::{