Skip to content

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

docs: add subsystem architecture documentation and driver implementation details

Steven Enamakel57821877df2e
diff --git a/crates/openhuman-core/src/core/README.md b/crates/openhuman-core/src/core/README.md
index 8fd0ab0432..383fbb9238 100644
--- a/crates/openhuman-core/src/core/README.md
+++ b/crates/openhuman-core/src/core/README.md
@@ -56,7 +56,7 @@ logic. Every controller it exposes is implemented by a domain module under
| `http_server_status.rs` | `HTTP_SERVER_COMPILED_IN`: ungated compile-time marker so a listener-less core fails the build instead of shipping silently. |
| `bus_testing.rs` | `isolated_bus()`: a private bus for tests that must observe events without racing the process-global singleton. |
| `runtime/` | `CoreBuilder` → `CoreRuntime` composition API: see [runtime/README.md](runtime/README.md). |
-| `subsystem/` | The subsystem driver registry (`SubsystemRegistry`, `DriverClass`, `DriverHealth`) and the `subsystems` RPC namespace. |
+| `subsystem/` | The `subsystems` status namespace (`SubsystemStatus` row, RPC and CLI table); memory fills its row. |
## Controller registration and `DomainGroup`
@@ -196,15 +196,11 @@ and delegating to a sub-agent nests another one, which overflows tokio's
default 2 MiB worker stack; every multi-thread runtime that can host a turn
(the desktop shell, `openhuman-core run`, `agent_cli`) sets both constants.
-`subsystem/` is the generic half of the subsystem-driver model: `DriverClass`
-and `DriverHealth` describe a bound driver's shape and health without naming
-any specific subsystem's contract crate, and `SubsystemRegistry` holds one
-bound driver per capability slot. The memory adapter
-(`crate::memory::binding`) is the first consumer, converting
-`tinymemory_api::MemoryHealth` into `DriverHealth`; the read-only `status`
-projection backs the `subsystems` RPC namespace and the `openhuman
-subsystems` CLI table. Later subsystems (inference, channels, sandbox) are
-expected to reuse the same registry rather than invent their own.
+`subsystem/` owns the generic `SubsystemStatus` wire row behind the `subsystems`
+RPC namespace and the `openhuman subsystems` CLI table. Memory is the only
+occupant: `crate::memory::status` projects the bound Memory v2 engine into its
+row, and a later subsystem appends its own adapter call in
+`subsystem::schemas::subsystems_status`.
## The controller contract
diff --git a/crates/openhuman-core/src/core/subsystem/driver.rs b/crates/openhuman-core/src/core/subsystem/driver.rs
deleted file mode 100644
index 7bb4d4e526..0000000000
--- a/crates/openhuman-core/src/core/subsystem/driver.rs
+++ /dev/null
@@ -1,295 +0,0 @@
-//! Generic, subsystem-agnostic driver vocabulary for the OpenHuman kernel.
-//!
-//! Specified by `docs/specs/kernel.md` §3.1 (driver classes), §3.3 (degradation
-//! by absence), §3.7 (fallback is never silent), and §6 item 1.
-//!
-//! ## Why this is not imported from `tinycortex-api`
-//!
-//! [`DriverClass`], [`DriverHealth`], and [`DriverCapabilities`] are shared by
-//! every subsystem — memory today, inference / channels / sandbox next
-//! (kernel.md §5). A *memory* crate must not be the source of generic kernel
-//! vocabulary, and a third-party driver must be able to depend on the contract
-//! crate without pulling in the host. The contract crate states both halves of
-//! that rule itself (`vendor/tinymemory/vendor/tinycortex/api/src/lib.rs`,
-//! module docs of `vendor/tinymemory/vendor/tinycortex/api/src/health.rs`).
-//!
-//! So the contract carries `MemoryHealth` / `Capabilities`, this module carries
-//! the kernel's equivalents, and the **memory adapter converts at the
-//! boundary** — never this module. Nothing in this file names `tinycortex_api`;
-//! the only place the two vocabularies meet in this step is a test-only witness
-//! that pins the shapes one-for-one so the future conversion stays a total
-//! three-arm `match`.
-//!
-//! Driver *class* is a host configuration fact about how a driver was bound,
-//! not something a driver reports about itself — which is why the contract
-//! crate deliberately omits it. A driver that self-reported `Embedded` could
-//! skip the egress and trust checks that class gates.
-
-use std::collections::BTreeSet;
-
-use serde::{Deserialize, Serialize};
-
-/// How a driver was bound into a subsystem slot (kernel.md §3.1).
-///
-/// This is a **host configuration fact**, never something the driver reports.
-///
-/// Deliberately not `#[non_exhaustive]`, for the same reason
-/// `tinymemory_api::capabilities::Capability` is not: adding a class must break
-/// every exhaustive `match` in the host, because those matches are where policy
-/// (egress, trust, credential resolution) is decided per class.
-#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
-#[serde(rename_all = "snake_case")]
-pub enum DriverClass {
- /// An in-tree / vendored Rust crate. The default: no network, no extra
- /// process.
- Embedded,
- /// An out-of-process backend reached through a transport adapter over a
- /// documented wire contract.
- External,
- /// A verified native TinyBus module loaded into this process.
- Module,
- /// A stub advertising zero capabilities — what a compiled-out or
- /// unconfigured subsystem binds to.
- Null,
-}
-
-impl DriverClass {
- /// Every class, in declaration order.
- pub const ALL: [DriverClass; 4] = [
- DriverClass::Embedded,
- DriverClass::External,
- DriverClass::Module,
- DriverClass::Null,
- ];
-
- /// Stable snake_case identifier used in config, on the wire, and in logs.
- ///
- /// These are exactly the values documented for
- /// `MemoryDriverConfig::class` in
- /// `crates/openhuman-core/src/config/schema/subsystems.rs`. The serde derive is pinned
- /// against this function by a test.
- pub fn as_str(self) -> &'static str {
- match self {
- Self::Embedded => "embedded",
- Self::External => "external",
- Self::Module => "module",
- Self::Null => "null",
- }
- }
-
- /// Parse back from the config / wire form.
- ///
- /// # Errors
- ///
- /// Returns the unrecognised input in the message, so a typo in
- /// `[subsystems.<slot>.drivers.<id>] class = …` is self-explaining.
- pub fn parse(raw: &str) -> Result<Self, String> {
- Self::ALL
- .iter()
- .copied()
- .find(|class| class.as_str() == raw)
- .ok_or_else(|| format!("unknown driver class: {raw}"))
- }
-}
-
-impl std::fmt::Display for DriverClass {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.write_str(self.as_str())
- }
-}
-
-impl std::str::FromStr for DriverClass {
- type Err = String;
-
- fn from_str(raw: &str) -> Result<Self, Self::Err> {
- Self::parse(raw)
- }
-}
-
-/// Liveness of a bound driver, in the kernel's generic vocabulary.
-///
-/// Shaped one-for-one against `tinymemory_api::health::MemoryHealth` — and
-/// against whatever the next subsystem's contract carries — so the boundary
-/// conversion is a total three-arm `match` that cannot drift. Serializes as an
-/// internally-tagged object with a stable snake_case `status` discriminant:
-///
-/// ```json
-/// { "status": "ready" }
-/// { "status": "degraded", "reason": "vector index rebuilding" }
-/// { "status": "down", "reason": "connection refused" }
-/// ```
-#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
-#[serde(tag = "status", rename_all = "snake_case")]
-pub enum DriverHealth {
- /// Reachable and serving requests normally.
- Ready,
- /// Still serving, but something is wrong and the caller should surface it.
- Degraded {
- /// Operator-facing explanation. Must not contain credentials, tokens,
- /// or user content — this string is logged and shown in status output.
- reason: String,
- },
- /// Cannot serve requests at all.
- Down {
- /// Operator-facing explanation, subject to the same redaction rule as
- /// [`DriverHealth::Degraded::reason`].
- reason: String,
- },
-}
-
-impl DriverHealth {
- /// Convenience constructor for [`DriverHealth::Degraded`].
- pub fn degraded(reason: impl Into<String>) -> Self {
- Self::Degraded {
- reason: reason.into(),
- }
- }
-
- /// Convenience constructor for [`DriverHealth::Down`].
- pub fn down(reason: impl Into<String>) -> Self {
- Self::Down {
- reason: reason.into(),
- }
- }
-
- /// Stable snake_case discriminant, matching the serialized `status` field.
- pub fn as_str(&self) -> &'static str {
- match self {
- Self::Ready => "ready",
- Self::Degraded { .. } => "degraded",
- Self::Down { .. } => "down",
- }
- }
-
- /// The operator-facing reason, when there is one.
- pub fn reason(&self) -> Option<&str> {
- match self {
- Self::Ready => None,
- Self::Degraded { reason } | Self::Down { reason } => Some(reason.as_str()),
- }
- }
-
- /// Whether the kernel should route traffic to this driver. A degraded
- /// driver is still the bound driver.
- pub fn is_usable(&self) -> bool {
- !matches!(self, Self::Down { .. })
- }
-}
-
-impl std::fmt::Display for DriverHealth {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- match self.reason() {
- Some(reason) => write!(f, "{}: {reason}", self.as_str()),
- None => f.write_str(self.as_str()),
- }
- }
-}
-
-/// A bound driver's advertised capability set, in the kernel's generic
-/// vocabulary: an unordered set of **opaque** snake_case strings.
-///
-/// The kernel deliberately does not know any subsystem's family vocabulary —
-/// `"tree"` and `"tool_memory"` mean something to the memory subsystem and
-/// nothing here. Each subsystem's adapter converts its own typed set (for
-/// memory: `tinymemory_api::capabilities::Capabilities`) into this at bind
-/// time, and the kernel only ever asks "does the bound driver advertise this
-/// string?" when deciding whether to register a controller or emit a tool.
-///
-/// Serializes as a JSON array of strings, matching the contract crate's
-/// `Capabilities` wire form exactly, so both sides are interchangeable on the
-/// wire.
-///
-/// **Ordering note:** the backing `BTreeSet` iterates lexicographically,
-/// whereas `Capabilities::iter()` yields contract *declaration* order. A set
-/// has no order, so this is correct — but it does mean a future
-/// `subsystems_status` lists capabilities alphabetically rather than in
-/// contract order. That is intended, not a regression.
-#[derive(Clone, Debug, Default, Eq, PartialEq)]
-pub struct DriverCapabilities {
- families: BTreeSet<String>,
-}
-
-impl DriverCapabilities {
- /// The empty set. Advertised by a `null` driver.
- pub fn empty() -> Self {
- Self::default()
- }
-
- /// Whether `family` is advertised.
- pub fn contains(&self, family: &str) -> bool {
- self.families.contains(family)
- }
-
- /// Whether every family in `other` is advertised here.
- pub fn contains_all(&self, other: &Self) -> bool {
- other.families.is_subset(&self.families)
- }
-
- /// Adds a family in place. Idempotent.
- pub fn insert(&mut self, family: impl Into<String>) {
- self.families.insert(family.into());
- }
-
- /// Removes a family in place. Idempotent.
- pub fn remove(&mut self, family: &str) {
- self.families.remove(family);
- }
-
- /// Builder form of [`Self::insert`].
- pub fn with(mut self, family: impl Into<String>) -> Self {
- self.insert(family);
- self
- }
-
- /// Advertised families, lexicographically ordered.
- pub fn iter(&self) -> impl Iterator<Item = &str> + '_ {
- self.families.iter().map(String::as_str)
- }
-
- /// Number of advertised families.
- pub fn len(&self) -> usize {
- self.families.len()
- }
-
- /// Whether no family is advertised.
- pub fn is_empty(&self) -> bool {
- self.families.is_empty()
- }
-}
-
-impl<S: Into<String>> FromIterator<S> for DriverCapabilities {
- fn from_iter<I: IntoIterator<Item = S>>(iter: I) -> Self {
- Self {
- families: iter.into_iter().map(Into::into).collect(),
- }
- }
-}
-
-impl<S: Into<String>> Extend<S> for DriverCapabilities {
- fn extend<I: IntoIterator<Item = S>>(&mut self, iter: I) {
- self.families.extend(iter.into_iter().map(Into::into));
- }
-}
-
-impl Serialize for DriverCapabilities {
- fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- serializer.collect_seq(self.iter())
- }
-}
-
-impl<'de> Deserialize<'de> for DriverCapabilities {
- fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- let families = Vec::<String>::deserialize(deserializer)?;
- Ok(families.into_iter().collect())
- }
-}
-
-#[cfg(test)]
-#[path = "driver_tests.rs"]
-mod tests;
diff --git a/crates/openhuman-core/src/core/subsystem/driver_tests.rs b/crates/openhuman-core/src/core/subsystem/driver_tests.rs
deleted file mode 100644
index 433cfa4ca3..0000000000
--- a/crates/openhuman-core/src/core/subsystem/driver_tests.rs
+++ /dev/null
@@ -1,148 +0,0 @@
-//! Tests for the generic driver vocabulary.
-//!
-//! Note: this is the **only** file under `crates/openhuman-core/src/core/subsystem/` that may name
-//! `tinycortex_api`, and it does so purely as a drift witness — see
-//! `driver_health_shape_matches_memory_health_one_for_one` and
-//! `every_memory_contract_capability_string_maps_into_driver_capabilities`.
-//! The production modules mention it only in prose; they must never *depend*
-//! on it, which is checkable with:
-//!
-//! ```text
-//! grep -rn '^ *use .*tinycortex_api' crates/openhuman-core/src/core/subsystem/driver.rs \
-//! crates/openhuman-core/src/core/subsystem/registry.rs crates/openhuman-core/src/core/subsystem/mod.rs # no output
-//! ```
-
-use std::str::FromStr;
-
-use serde_json::json;
-
-use super::*;
-
-#[test]
-fn driver_class_as_str_matches_serde_representation() {
- for class in DriverClass::ALL {
- let encoded = serde_json::to_value(class).expect("class serializes");
- assert_eq!(encoded, json!(class.as_str()), "mismatch for {class:?}");
- }
-}
-
-#[test]
-fn driver_class_parse_round_trips_every_variant() {
- for class in DriverClass::ALL {
- assert_eq!(DriverClass::parse(class.as_str()), Ok(class));
- assert_eq!(DriverClass::from_str(class.as_str()), Ok(class));
- assert_eq!(class.to_string(), class.as_str());
- }
-}
-
-#[test]
-fn driver_class_parse_rejects_unknown_with_the_input_in_the_message() {
- let err = DriverClass::parse("sidecar").expect_err("unknown class rejected");
- assert!(
- err.contains("sidecar"),
- "message should name the input: {err}"
- );
-}
-
-#[test]
-fn driver_health_is_usable_is_false_only_when_down() {
- assert!(DriverHealth::Ready.is_usable());
- assert!(DriverHealth::degraded("index rebuilding").is_usable());
- assert!(!DriverHealth::down("connection refused").is_usable());
-}
-
-#[test]
-fn driver_health_serializes_with_a_stable_status_discriminant() {
- assert_eq!(
- serde_json::to_value(DriverHealth::Ready).expect("ready serializes"),
- json!({ "status": "ready" })
- );
- assert_eq!(
- serde_json::to_value(DriverHealth::degraded("slow")).expect("degraded serializes"),
- json!({ "status": "degraded", "reason": "slow" })
- );
- assert_eq!(
- serde_json::to_value(DriverHealth::down("refused")).expect("down serializes"),
- json!({ "status": "down", "reason": "refused" })
- );
-
- let decoded: DriverHealth =
- serde_json::from_value(json!({ "status": "degraded", "reason": "slow" }))
- .expect("degraded deserializes");
- assert_eq!(decoded, DriverHealth::degraded("slow"));
-}
-
-#[test]
-fn driver_health_display_includes_the_reason() {
- assert_eq!(DriverHealth::Ready.to_string(), "ready");
- assert_eq!(DriverHealth::Ready.reason(), None);
- assert_eq!(
- DriverHealth::down("connection refused").to_string(),
- "down: connection refused"
- );
- assert_eq!(
- DriverHealth::degraded("slow").reason(),
- Some("slow"),
- "reason is readable for status output"
- );
-}
-
-#[test]
-fn driver_capabilities_round_trips_through_json() {
- let caps = DriverCapabilities::empty()
- .with("core")
- .with("recall")
- .with("portability");
-
- let encoded = serde_json::to_value(&caps).expect("capabilities serialize");
- let decoded: DriverCapabilities =
- serde_json::from_value(encoded.clone()).expect("capabilities deserialize");
-
- assert_eq!(decoded, caps);
- assert_eq!(encoded, json!(["core", "portability", "recall"]));
-}
-
-#[test]
-fn driver_capabilities_collapses_duplicates() {
- let caps: DriverCapabilities = ["core", "recall", "core"].into_iter().collect();
- assert_eq!(caps.len(), 2);
- assert!(caps.contains("core"));
- assert!(caps.contains("recall"));
- assert!(!caps.contains("tree"));
-
- let mut caps = caps;
- caps.remove("recall");
- assert_eq!(caps.len(), 1);
- caps.remove("recall");
- assert_eq!(caps.len(), 1, "remove is idempotent");
-}
-
-#[test]
-fn driver_capabilities_serializes_as_an_array_of_strings() {
- assert_eq!(
- serde_json::to_value(DriverCapabilities::empty()).expect("empty serializes"),
- json!([])
- );
- assert!(DriverCapabilities::empty().is_empty());
-
- let mut caps = DriverCapabilities::empty();
- caps.extend(["tree", "core"]);
- assert_eq!(
- serde_json::to_value(&caps).expect("serializes"),
- json!(["core", "tree"]),
- "a set has no order; the backing BTreeSet emits lexicographic order"
- );
-}
-
-#[test]
-fn driver_capabilities_contains_all_is_subset_semantics() {
- let advertised: DriverCapabilities = ["core", "recall", "portability", "tree"]
- .into_iter()
- .collect();
- let mandatory: DriverCapabilities = ["core", "recall", "portability"].into_iter().collect();
-
- assert!(advertised.contains_all(&mandatory));
- assert!(!mandatory.contains_all(&advertised));
- assert!(advertised.contains_all(&DriverCapabilities::empty()));
-}
-
diff --git a/crates/openhuman-core/src/core/subsystem/mod.rs b/crates/openhuman-core/src/core/subsystem/mod.rs
index 3f92fcbe83..855bda684f 100644
--- a/crates/openhuman-core/src/core/subsystem/mod.rs
+++ b/crates/openhuman-core/src/core/subsystem/mod.rs
@@ -1,35 +1,21 @@
-//! The subsystem registry — one bound driver per capability slot.
+//! The `subsystems` status namespace: one wire row per capability slot.
//!
-//! `docs/specs/kernel.md` §3 (the model), §3.7 (three runtime axes), §6 item 1.
+//! `docs/specs/kernel.md` §3 (the model) and §6 item 6 (the status projection).
//!
//! ## Scope
//!
-//! This module is the **generic half** of kernel.md §6 item 1: `DriverClass`,
-//! `DriverHealth`, a generic capability set, and `SubsystemRegistry`. It is
-//! deliberately subsystem-agnostic and names no subsystem's contract crate —
-//! whichever subsystem is cut over after memory (inference, channels, sandbox)
-//! uses this same registry, so it must not inherit its vocabulary from a
-//! *memory* crate.
-//!
-//! Since M2b the memory adapter exists in
-//! [`crate::memory::binding`] (it converts
-//! `tinymemory_api::MemoryHealth` into [`DriverHealth`] and the contract's
-//! typed capability set into [`DriverCapabilities`]), and M2c added the
-//! read-only [`status`] projection plus the `subsystems` RPC namespace and the
-//! `openhuman subsystems` CLI table.
-//!
-//! Still to land in later steps, despite being named in the same §6 sentence:
-//! the generic `Driver` trait and the policy `Guard` (§3.4).
+//! This module owns the generic wire shape ([`SubsystemStatus`]) and the
+//! `subsystems.status` RPC plus the `openhuman subsystems` CLI table built on
+//! it. Memory is the only occupant: [`crate::memory::status`] fills its row
+//! from the bound Memory v2 engine, and a future subsystem appends its own
+//! adapter call in [`schemas::subsystems_status`]. There is no in-process
+//! driver registry; each slot reports its own state.
-mod driver;
-mod registry;
pub mod schemas;
mod status;
-pub use driver::{DriverCapabilities, DriverClass, DriverHealth};
-pub use registry::{BoundDriver, SubsystemRegistry, SubsystemSlot};
pub use schemas::{
all_controller_schemas as all_subsystems_controller_schemas,
all_registered_controllers as all_subsystems_registered_controllers, subsystems_status,
};
-pub use status::{format_contract_version, registry_status, SubsystemStatus};
+pub use status::SubsystemStatus;
diff --git a/crates/openhuman-core/src/core/subsystem/registry.rs b/crates/openhuman-core/src/core/subsystem/registry.rs
deleted file mode 100644
index aef4511a91..0000000000
--- a/crates/openhuman-core/src/core/subsystem/registry.rs
+++ /dev/null
@@ -1,239 +0,0 @@
-//! The subsystem registry: one bound driver per capability slot.
-//!
-//! Specified by `docs/specs/kernel.md` §3.1 (exactly one driver per subsystem
-//! per process), §3.7 (a failed bind falls back to the embedded default,
-//! "logged loudly, surfaced in status, never silent"), and §6 items 1 and 6.
-//!
-//! Unlike the process-wide [`crate::core::bus::BUS`], this is a **plain owned
-//! struct** — no `OnceLock`, no global. The registry is constructed once at `CoreBuilder`
-//! time and owned by the core context; a global would be a second, competing
-//! source of truth for which driver answers.
-
-use std::collections::BTreeMap;
-
-use serde::{Deserialize, Serialize};
-
-use super::driver::{DriverCapabilities, DriverClass, DriverHealth};
-
-/// A named capability slot (kernel.md §3.1).
-///
-/// Exactly the seven subsystems the spec names. Declaration order is also
-/// [`SubsystemRegistry`] iteration order, because this type is the `BTreeMap`
-/// key and derives `Ord`.
-#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
-#[serde(rename_all = "snake_case")]
-pub enum SubsystemSlot {
- /// Memory — the pilot subsystem.
- Memory,
- /// Model routing and inference providers.
- Inference,
- /// External messaging providers.
- Channels,
- /// SKILL.md discovery, install, and execution.
- Skills,
- /// Saved automation graphs.
- Flows,
- /// Command execution isolation.
- Sandbox,
- /// Speech to text and text to speech.
- Voice,
-}
-
-impl SubsystemSlot {
- /// Every slot, in declaration order.
- pub const ALL: [SubsystemSlot; 7] = [
- SubsystemSlot::Memory,
- SubsystemSlot::Inference,
- SubsystemSlot::Channels,
- SubsystemSlot::Skills,
- SubsystemSlot::Flows,
- SubsystemSlot::Sandbox,
- SubsystemSlot::Voice,
- ];
-
- /// Stable snake_case identifier used in config (`[subsystems.<slot>]`), on
- /// the wire, and in logs. The serde derive is pinned against this by a
- /// test.
- pub fn as_str(self) -> &'static str {
- match self {
- Self::Memory => "memory",
- Self::Inference => "inference",
- Self::Channels => "channels",
- Self::Skills => "skills",
- Self::Flows => "flows",
- Self::Sandbox => "sandbox",
- Self::Voice => "voice",
- }
- }
-
- /// Parse back from the config / wire form.
- ///
- /// # Errors
- ///
- /// Returns the unrecognised input in the message.
- pub fn parse(raw: &str) -> Result<Self, String> {
- Self::ALL
- .iter()
- .copied()
- .find(|slot| slot.as_str() == raw)
- .ok_or_else(|| format!("unknown subsystem slot: {raw}"))
- }
-}
-
-impl std::fmt::Display for SubsystemSlot {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.write_str(self.as_str())
- }
-}
-
-impl std::str::FromStr for SubsystemSlot {
- type Err = String;
-
- fn from_str(raw: &str) -> Result<Self, Self::Err> {
- Self::parse(raw)
- }
-}
-
-/// What the kernel knows about the driver currently bound to a slot.
-///
-/// This is the record `subsystems_status` renders (kernel.md §6 item 6: slot,
-/// bound driver, class, health, contract version, and capabilities), plus the
-/// fallback provenance §3.7 requires so a fallback is never silent.
-///
-/// `Debug` is derived deliberately: no field here is a secret. The
-/// credential-bearing type is `MemoryDriverConfig`, which carries a manual
-/// redacting `Debug`; a bound driver record holds no credential at all, and
-/// must not gain one.
-#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
-pub struct BoundDriver {
- /// The slot this driver answers for.
- pub slot: SubsystemSlot,
- /// Driver id, e.g. `"tinycortex"`, `"supermemory"`, `"null"`.
- pub id: String,
- /// How the driver was bound. A host fact, not self-reported.
- pub class: DriverClass,
- /// The capability set, asked for **once** at bind time and cached here
- /// (kernel.md §3.2 rule 1).
- pub capabilities: DriverCapabilities,
- /// Latest known liveness.
- pub health: DriverHealth,
- /// The `(major, minor)` contract version this driver speaks.
- pub contract_version: (u16, u16),
- /// The driver id that was *asked for* and failed, when this binding is the
- /// result of a fallback. `None` for a normal bind. kernel.md §3.7 requires
- /// a fallback be surfaced in status rather than silently substituted.
- #[serde(default, skip_serializing_if = "Option::is_none")]
- pub fell_back_from: Option<String>,
-}
-
-impl BoundDriver {
- /// A binding with no capabilities beyond what the caller adds, healthy, and
- /// not the result of a fallback.
- pub fn new(
- slot: SubsystemSlot,
- id: impl Into<String>,
- class: DriverClass,
- capabilities: DriverCapabilities,
- contract_version: (u16, u16),
- ) -> Self {
- Self {
- slot,
- id: id.into(),
- class,
- capabilities,
- health: DriverHealth::Ready,
- contract_version,
- fell_back_from: None,
- }
- }
-
- /// Whether this binding replaced a driver that failed to construct.
- pub fn is_fallback(&self) -> bool {
- self.fell_back_from.is_some()
- }
-}
-
-/// Which driver answers for each subsystem slot in this process.
-///
-/// Exactly one driver per slot (kernel.md §3.1): binding a second driver into
-/// an occupied slot **replaces** the first and warns, because two live drivers
-/// for one subsystem means two truths. Fan-out is expressed as a composite
-/// driver (§3.5), not as a second binding.
-#[derive(Clone, Debug, Default)]
-pub struct SubsystemRegistry {
- slots: BTreeMap<SubsystemSlot, BoundDriver>,
-}
-
-impl SubsystemRegistry {
- /// An empty registry — no slot bound.
- pub fn new() -> Self {
- Self::default()
- }
-
- /// Binds `driver` into its own slot, returning whatever it displaced.
- ///
- /// A rebind is logged at `warn`: outside tests it means either a
- /// misconfiguration or a live driver swap, and both deserve a line in the
- /// log.
- pub fn bind(&mut self, driver: BoundDriver) -> Option<BoundDriver> {
- let slot = driver.slot;
- let previous = self.slots.insert(slot, driver);
- // Re-borrow rather than hold a reference across the insert.
- let bound = &self.slots[&slot];
- match &previous {
- Some(prev) => log::warn!(
- "[subsystem] {slot} rebound from '{}' to '{}' ({})",
- prev.id,
- bound.id,
- bound.class
- ),
- None => log::info!(
- "[subsystem] {slot} bound to '{}' ({})",
- bound.id,
- bound.class
- ),
- }
- previous
- }
-
- /// The driver bound to `slot`, if any.
- pub fn get(&self, slot: SubsystemSlot) -> Option<&BoundDriver> {
- self.slots.get(&slot)
- }
-
- /// Updates the cached health of a bound slot. Returns `false` — and changes
- /// nothing — when the slot is unbound.
- pub fn set_health(&mut self, slot: SubsystemSlot, health: DriverHealth) -> bool {
- match self.slots.get_mut(&slot) {
- Some(driver) => {
- driver.health = health;
- true
- }
- None => false,
- }
- }
-
- /// Every binding, in [`SubsystemSlot`] declaration order.
- pub fn iter(&self) -> impl Iterator<Item = &BoundDriver> + '_ {
- self.slots.values()
- }
-
- /// The bound slots, in declaration order.
- pub fn bound_slots(&self) -> Vec<SubsystemSlot> {
- self.slots.keys().copied().collect()
- }
-
- /// Number of bound slots.
- pub fn len(&self) -> usize {
- self.slots.len()
- }
-
- /// Whether no slot is bound.
- pub fn is_empty(&self) -> bool {
- self.slots.is_empty()
- }
-}
-
-#[cfg(test)]
-#[path = "registry_tests.rs"]
-mod tests;
diff --git a/crates/openhuman-core/src/core/subsystem/registry_tests.rs b/crates/openhuman-core/src/core/subsystem/registry_tests.rs
deleted file mode 100644
index cff7c0e740..0000000000
--- a/crates/openhuman-core/src/core/subsystem/registry_tests.rs
+++ /dev/null
@@ -1,192 +0,0 @@
-//! Tests for the subsystem registry: bind, rebind, fallback-on-failure, and
-//! health updates.
-
-use std::str::FromStr;
-
-use serde_json::json;
-
-use super::*;
-
-const CONTRACT: (u16, u16) = (1, 0);
-
-fn bound(slot: SubsystemSlot, id: &str, class: DriverClass) -> BoundDriver {
- BoundDriver::new(
- slot,
- id,
- class,
- ["core", "recall", "portability"].into_iter().collect(),
- CONTRACT,
- )
-}
-
-#[test]
-fn subsystem_slot_as_str_matches_serde_representation() {
- for slot in SubsystemSlot::ALL {
- let encoded = serde_json::to_value(slot).expect("slot serializes");
- assert_eq!(encoded, json!(slot.as_str()), "mismatch for {slot:?}");
- }
-}
-
-#[test]
-fn subsystem_slot_parse_round_trips_every_variant() {
- for slot in SubsystemSlot::ALL {
- assert_eq!(SubsystemSlot::parse(slot.as_str()), Ok(slot));
- assert_eq!(SubsystemSlot::from_str(slot.as_str()), Ok(slot));
- assert_eq!(slot.to_string(), slot.as_str());
- }
- let err = SubsystemSlot::parse("telepathy").expect_err("unknown slot rejected");
- assert!(
- err.contains("telepathy"),
- "message should name the input: {err}"
- );
-}
-
-#[test]
-fn bind_records_the_driver_in_its_slot() {
- let mut registry = SubsystemRegistry::new();
- assert!(registry.is_empty());
-
- registry.bind(bound(
- SubsystemSlot::Memory,
- "tinycortex",
- DriverClass::Embedded,
- ));
-
- let driver = registry
- .get(SubsystemSlot::Memory)
- .expect("memory slot is bound");
- assert_eq!(driver.id, "tinycortex");
- assert_eq!(driver.class, DriverClass::Embedded);
- assert_eq!(driver.contract_version, CONTRACT);
- assert_eq!(driver.health, DriverHealth::Ready);
- assert!(driver.capabilities.contains("recall"));
- assert!(!driver.is_fallback());
- assert_eq!(registry.len(), 1);
- assert_eq!(registry.bound_slots(), vec![SubsystemSlot::Memory]);
- assert!(registry.get(SubsystemSlot::Voice).is_none());
-}
-
-#[test]
-fn bind_returns_no_previous_driver_for_an_empty_slot() {
- let mut registry = SubsystemRegistry::new();
- let previous = registry.bind(bound(
- SubsystemSlot::Sandbox,
- "landlock",
- DriverClass::Embedded,
- ));
- assert!(previous.is_none());
-}
-
-#[test]
-fn rebind_replaces_and_returns_the_previous_driver() {
- let mut registry = SubsystemRegistry::new();
- registry.bind(bound(
- SubsystemSlot::Memory,
- "tinycortex",
- DriverClass::Embedded,
- ));
-
- let previous = registry
- .bind(bound(
- SubsystemSlot::Memory,
- "supermemory",
- DriverClass::External,
- ))
- .expect("rebind returns the displaced driver");
-
- assert_eq!(previous.id, "tinycortex");
- assert_eq!(
- registry.get(SubsystemSlot::Memory).expect("still bound").id,
- "supermemory",
- "exactly one driver per slot — the second replaces the first"
- );
- assert_eq!(registry.len(), 1, "a rebind does not add a slot");
-}
-
-#[test]
-fn rebind_does_not_disturb_other_slots() {
- let mut registry = SubsystemRegistry::new();
- registry.bind(bound(
- SubsystemSlot::Memory,
- "tinycortex",
- DriverClass::Embedded,
- ));
- registry.bind(bound(
- SubsystemSlot::Voice,
- "whisper",
- DriverClass::Embedded,
- ));
- registry.bind(bound(
- SubsystemSlot::Memory,
- "supermemory",
- DriverClass::External,
- ));
-
- assert_eq!(
- registry.get(SubsystemSlot::Voice).expect("bound").id,
- "whisper"
- );
- assert_eq!(registry.len(), 2);
-}
-
-#[test]
-fn set_health_updates_only_the_named_slot() {
- let mut registry = SubsystemRegistry::new();
- registry.bind(bound(
- SubsystemSlot::Memory,
- "tinycortex",
- DriverClass::Embedded,
- ));
- registry.bind(bound(
- SubsystemSlot::Voice,
- "whisper",
- DriverClass::Embedded,
- ));
-
- assert!(registry.set_health(
- SubsystemSlot::Memory,
- DriverHealth::degraded("index rebuilding")
- ));
-
- assert_eq!(
- registry.get(SubsystemSlot::Memory).expect("bound").health,
- DriverHealth::degraded("index rebuilding")
- );
- assert_eq!(
- registry.get(SubsystemSlot::Voice).expect("bound").health,
- DriverHealth::Ready
- );
-}
-
-#[test]
-fn set_health_returns_false_for_an_unbound_slot() {
- let mut registry = SubsystemRegistry::new();
- assert!(!registry.set_health(SubsystemSlot::Flows, DriverHealth::down("gone")));
- assert!(registry.is_empty());
-}
-
-#[test]
-fn registry_iterates_in_slot_declaration_order() {
- let mut registry = SubsystemRegistry::new();
- // Bind out of declaration order on purpose.
- for slot in [
- SubsystemSlot::Voice,
- SubsystemSlot::Memory,
- SubsystemSlot::Flows,
- SubsystemSlot::Inference,
- ] {
- registry.bind(bound(slot, "null", DriverClass::Null));
- }
-
- let order: Vec<SubsystemSlot> = registry.iter().map(|driver| driver.slot).collect();
- assert_eq!(
- order,
- vec![
- SubsystemSlot::Memory,
- SubsystemSlot::Inference,
- SubsystemSlot::Flows,
- SubsystemSlot::Voice,
- ]
- );
- assert_eq!(registry.bound_slots(), order);
-}
diff --git a/crates/openhuman-core/src/core/subsystem/status.rs b/crates/openhuman-core/src/core/subsystem/status.rs
index b4bd9048f7..f34a5948cf 100644
--- a/crates/openhuman-core/src/core/subsystem/status.rs
+++ b/crates/openhuman-core/src/core/subsystem/status.rs
@@ -1,32 +1,19 @@
-//! The read-only status projection over a bound driver
-//! (`docs/specs/kernel.md` §6 item 6, `docs/specs/plan-memory.md` §5).
-//!
-//! [`BoundDriver`] is the kernel's *internal* record. This module is the
-//! *wire* shape rendered by `subsystems.status` and `memory.provider_status`.
-//! They are deliberately two types rather than one `Serialize` derive on
-//! `BoundDriver`, for one reason worth stating plainly:
+//! The wire row rendered by `subsystems.status` and the `openhuman subsystems`
+//! table (`docs/specs/kernel.md` §6 item 6).
//!
//! ## Capabilities cross the wire as opaque strings, never as a typed set
//!
-//! A memory driver's typed set (`tinymemory_api::capabilities::Capabilities`)
-//! is a `u16` bitset whose `Deserialize` rejects the **whole** array on a
-//! single unrecognised family string. A driver speaking a newer minor contract
-//! may legitimately advertise a family this build has never heard of, and
-//! status must be able to *report* what it saw even though this kernel would
-//! never call it. So the status payload carries `Vec<String>`, sourced from
-//! [`DriverCapabilities`] — which is already opaque strings — and this type
+//! A driver speaking a newer minor contract may legitimately advertise an
+//! operation this build has never heard of, and status must be able to
+//! *report* what it saw. So the payload carries `Vec<String>` and this type
//! derives `Serialize` **only**. Do not add `Deserialize`, and do not retype
-//! `capabilities` as a contract type: either change reintroduces the hazard.
+//! `capabilities` as a contract type.
//!
-//! Health is flattened to a `status` discriminant plus an optional reason for
-//! the same reason: a status consumer should be able to render an unfamiliar
-//! driver without a total `match`.
+//! Health is flattened to a `health` discriminant plus an optional reason so
+//! a status consumer can render an unfamiliar driver without a total `match`.
use serde::Serialize;
-use super::driver::DriverHealth;
-use super::registry::{BoundDriver, SubsystemRegistry};
-
/// One subsystem slot's status, as rendered on the wire.
///
/// `Serialize` only — see the module docs.
@@ -34,7 +21,7 @@ use super::registry::{BoundDriver, SubsystemRegistry};
pub struct SubsystemStatus {
/// The slot name: `"memory"`, `"inference"`, …
pub slot: String,
- /// The bound driver id, e.g. `"tinycortex"`, `"supermemory"`, `"null"`.
+ /// The bound driver id, e.g. `"tinyhumans"`, `"cortexdb"`, `"null"`.
pub driver: String,
/// How the host bound it: `"embedded"` | `"external"` | `"null"`.
pub class: String,
@@ -58,52 +45,6 @@ pub struct SubsystemStatus {
pub last_error: Option<String>,
}
-impl SubsystemStatus {
- /// Project a bound driver, using the health cached on the record.
- pub fn from_bound(driver: &BoundDriver) -> Self {
- Self::from_bound_with_health(driver, driver.health.clone())
- }
-
- /// Project a bound driver, overriding the cached health with one just
- /// probed live. `subsystems.status` and `memory.provider_status` both do
- /// this: the cached value is whatever the last bind or `set_health` wrote,
- /// and a status call is exactly the moment to ask again.
- pub fn from_bound_with_health(driver: &BoundDriver, health: DriverHealth) -> Self {
- Self {
- slot: driver.slot.as_str().to_string(),
- driver: driver.id.clone(),
- class: driver.class.as_str().to_string(),
- health: health.as_str().to_string(),
- health_reason: health.reason().map(str::to_string),
- contract_version: format_contract_version(driver.contract_version),
- capabilities: driver.capabilities.iter().map(str::to_string).collect(),
- fell_back_from: driver.fell_back_from.clone(),
- last_error: None,
- }
- }
-
- /// Attach an operator-facing last-error string. Builder form so callers
- /// that have no error do not have to name the field.
- pub fn with_last_error(mut self, last_error: Option<String>) -> Self {
- self.last_error = last_error;
- self
- }
-}
-
-/// `"<major>.<minor>"`.
-pub fn format_contract_version(version: (u16, u16)) -> String {
- format!("{}.{}", version.0, version.1)
-}
-
-/// Project every binding in a registry, in slot declaration order.
-///
-/// Uses each record's cached health — this is the pure, I/O-free projection.
-/// A caller that wants live health probes the driver itself and uses
-/// [`SubsystemStatus::from_bound_with_health`].
-pub fn registry_status(registry: &SubsystemRegistry) -> Vec<SubsystemStatus> {
- registry.iter().map(SubsystemStatus::from_bound).collect()
-}
-
#[cfg(test)]
#[path = "status_tests.rs"]
mod tests;
diff --git a/crates/openhuman-core/src/core/subsystem/status_tests.rs b/crates/openhuman-core/src/core/subsystem/status_tests.rs
index 658dbaf3ef..2e7526ebbc 100644
--- a/crates/openhuman-core/src/core/subsystem/status_tests.rs
+++ b/crates/openhuman-core/src/core/subsystem/status_tests.rs
@@ -1,109 +1,28 @@
-//! Tests for the wire projection over a bound driver.
+//! Tests for the subsystem status wire row.
use super::*;
-use crate::core::subsystem::driver::{DriverCapabilities, DriverClass};
-use crate::core::subsystem::registry::{BoundDriver, SubsystemRegistry, SubsystemSlot};
-
-fn embedded_memory() -> BoundDriver {
- BoundDriver::new(
- SubsystemSlot::Memory,
- "tinycortex",
- DriverClass::Embedded,
- DriverCapabilities::empty()
- .with("core")
- .with("recall")
- .with("portability"),
- (1, 0),
- )
-}
#[test]
-fn projection_reports_slot_driver_class_and_contract_version() {
- let status = SubsystemStatus::from_bound(&embedded_memory());
- assert_eq!(status.slot, "memory");
- assert_eq!(status.driver, "tinycortex");
- assert_eq!(status.class, "embedded");
- assert_eq!(status.contract_version, "1.0");
- assert_eq!(status.health, "ready");
- assert_eq!(status.health_reason, None);
- assert_eq!(status.fell_back_from, None);
- assert_eq!(status.last_error, None);
-}
-
-#[test]
-fn projection_reports_the_advertised_capability_list() {
- let status = SubsystemStatus::from_bound(&embedded_memory());
- // `DriverCapabilities` is a set, so ordering is lexicographic, not the
- // contract's declaration order. Asserted explicitly so a future switch to
- // declaration order is a deliberate change, not a silent one.
- assert_eq!(status.capabilities, vec!["core", "portability", "recall"]);
-}
-
-#[test]
-fn live_health_overrides_the_cached_record() {
- let status = SubsystemStatus::from_bound_with_health(
- &embedded_memory(),
- DriverHealth::degraded("vector index rebuilding"),
- );
- assert_eq!(status.health, "degraded");
+fn row_serializes_every_field_with_opaque_capabilities() {
+ let row = SubsystemStatus {
+ slot: "memory".to_string(),
+ driver: "tinyhumans".to_string(),
+ class: "external".to_string(),
+ health: "ready".to_string(),
+ health_reason: None,
+ contract_version: "2.0".to_string(),
+ capabilities: vec!["recall".to_string(), "some_future_op".to_string()],
+ fell_back_from: None,
+ last_error: None,
+ };
+ let value = serde_json::to_value(&row).expect("serializes");
+ assert_eq!(value["slot"], "memory");
+ assert_eq!(value["driver"], "tinyhumans");
+ assert_eq!(value["contract_version"], "2.0");
assert_eq!(
- status.health_reason.as_deref(),
- Some("vector index rebuilding")
- );
-}
-
-#[test]
-fn a_fallback_binding_surfaces_the_driver_it_replaced() {
- let mut driver = BoundDriver::new(
- SubsystemSlot::Memory,
- "null",
- DriverClass::Null,
- DriverCapabilities::empty(),
- (1, 0),
+ value["capabilities"],
+ serde_json::json!(["recall", "some_future_op"])
);
- driver.fell_back_from = Some("supermemory".to_string());
- let status = SubsystemStatus::from_bound(&driver)
- .with_last_error(Some("external driver is untrusted".to_string()));
- assert_eq!(status.fell_back_from.as_deref(), Some("supermemory"));
- assert_eq!(
- status.last_error.as_deref(),
- Some("external driver is untrusted")
- );
- assert!(status.capabilities.is_empty());
- assert_eq!(status.class, "null");
-}
-
-#[test]
-fn capabilities_serialize_as_a_flat_array_of_strings() {
- let value = serde_json::to_value(SubsystemStatus::from_bound(&embedded_memory()))
- .expect("status serializes");
- let caps = value["capabilities"].as_array().expect("array");
- assert!(caps.iter().all(serde_json::Value::is_string));
- assert_eq!(value["class"], "embedded");
- assert_eq!(value["health"], "ready");
- // Health is flattened, never nested under a `status` discriminant object.
- assert!(value["health"].is_string());
-}
-
-#[test]
-fn registry_projection_follows_slot_declaration_order() {
- let mut registry = SubsystemRegistry::new();
- registry.bind(BoundDriver::new(
- SubsystemSlot::Inference,
- "openai",
- DriverClass::External,
- DriverCapabilities::empty(),
- (1, 0),
- ));
- registry.bind(embedded_memory());
-
- let rows = registry_status(&registry);
- assert_eq!(rows.len(), 2);
- assert_eq!(rows[0].slot, "memory");
- assert_eq!(rows[1].slot, "inference");
-}
-
-#[test]
-fn contract_version_formats_as_major_dot_minor() {
- assert_eq!(format_contract_version((2, 7)), "2.7");
+ assert!(value["health_reason"].is_null());
+ assert!(value["last_error"].is_null());
}
diff --git a/gitbooks/developing/architecture/agent-harness.md b/gitbooks/developing/architecture/agent-harness.md
index e79ac95a07..6683c63638 100644
--- a/gitbooks/developing/architecture/agent-harness.md
+++ b/gitbooks/developing/architecture/agent-harness.md
@@ -196,7 +196,7 @@ A **session** is the live conversation an `Agent` instance is running. The `Agen
1. **Resumes the session transcript** if this is a fresh process - re-loading the exact provider messages from disk so the inference backend's KV-cache prefix still hits.
2. **Builds the system prompt** (only on the first turn). This pulls in identity, soul, profile, memory, connected integrations, available tools, safety preamble - assembled by the prompt section builder.
-3. **Injects memory context** for the new user message via the memory loader: relevant chunks from the [Memory Tree](../../features/memory.md), with citations attached so the UI can show provenance.
+3. **Injects memory context** for the new user message via the memory loader: relevant chunks from the [Memory](../../features/memory.md), with citations attached so the UI can show provenance.
4. **Enters the tool-call loop** (next section).
5. **Spawns post-turn hooks** in the background - the user gets their answer before archivist / learning / cost logging finishes.
@@ -520,7 +520,7 @@ Post-turn hooks fire **after** the turn completes, in the background. They get a
- **Archivist** - distills which facts from the turn are worth persisting to long-term memory.
- **Learning** - feeds reflection, tool-tracker, and user-profile updates.
- **Cost log** - final per-turn cost line.
-- **Episodic memory indexing** - writes the turn into the [Memory Tree](../../features/memory.md) as a chunk for future recall.
+- **Episodic memory indexing** - writes the turn into the [Memory](../../features/memory.md) as a chunk for future recall.
Hooks run via `tokio::spawn`, so the user gets their answer before any of them finish.
@@ -757,6 +757,6 @@ Goals and todos are crate-backed outright, with no shadow: thread goals live in
## See also
- [Architecture overview](README.md) - where the harness sits in the bigger picture.
-- [Memory Tree](../../features/memory.md) - what the memory loader reads from and post-turn hooks write to.
+- [Memory](../../features/memory.md) - what the memory loader reads from and post-turn hooks write to.
- [Automatic Model Routing](../../features/model-routing/) - how `model: "hint:reasoning"` resolves to a concrete provider+model.
- [Native Tools - Agent Coordination](../../features/native-tools/agent-coordination.md) - the user-facing surface for `spawn_subagent`, `delegate_*`, `todo`.
diff --git a/gitbooks/features/goals-and-todos.md b/gitbooks/features/goals-and-todos.md
index 07aabd6b78..0b544b630a 100644
--- a/gitbooks/features/goals-and-todos.md
+++ b/gitbooks/features/goals-and-todos.md
@@ -46,4 +46,4 @@ goal on screen for the many turns after the one that set it.
## See also
-- [Memory Tree](memory.md): what goal reflection reads from.
+- [Memory](memory.md): what goal reflection reads from.
diff --git a/gitbooks/features/integrations/README.md b/gitbooks/features/integrations/README.md
index db96a8df5b..5701beb9da 100644
--- a/gitbooks/features/integrations/README.md
+++ b/gitbooks/features/integrations/README.md
@@ -14,7 +14,7 @@ Under the hood, the connector layer is powered by [Composio](https://composio.de
Once a service is connected, it shows up in four places at once:
1. As an **agent tool**, the model can call it directly.
-2. As a **memory source**, [auto-fetch](../memory.md) syncs it into the [Memory Tree](../memory.md) every twenty minutes.
+2. As a **memory source**, [auto-fetch](../memory.md) syncs it into the [Memory](../memory.md) every twenty minutes.
3. As a **profile signal**, your activity across services feeds your personalization.
4. As a **trigger source**, live events (a new email, a new charge, an inbound DM) flow into the [Triggers](triggers.md) pipeline and can fire off agent actions automatically.
@@ -86,5 +86,5 @@ See [Privacy & Security](../privacy-and-security.md) for the full boundary.
## See also
- [Triggers](triggers.md), live events from connected integrations and how they fire agent actions.
-- [Auto-fetch from Integrations](../memory.md)
-- [Memory Tree](../memory.md)
+- [Memory sources](../memory.md)
+- [Memory](../memory.md)
diff --git a/gitbooks/features/integrations/triggers.md b/gitbooks/features/integrations/triggers.md
index 312f89731b..68518c53de 100644
--- a/gitbooks/features/integrations/triggers.md
+++ b/gitbooks/features/integrations/triggers.md
@@ -133,4 +133,4 @@ Triggers follow the same boundary as the rest of the product (see [Privacy & Sec
## See also
- [Third-party Integrations](README.md), the catalog of services triggers come from.
-- [Auto-fetch from Integrations](../memory.md), the polling counterpart, periodic ingest of source data into the Memory Tree.
+- [Memory sources](../memory.md), the polling counterpart, periodic ingest of source data into the Memory Tree.
diff --git a/gitbooks/features/native-tools/README.md b/gitbooks/features/native-tools/README.md
index e7485a12d8..1b23258aa1 100644
--- a/gitbooks/features/native-tools/README.md
+++ b/gitbooks/features/native-tools/README.md
@@ -31,7 +31,7 @@ A plugin-only model means tools live in different processes, behind RPC, with th
| [Browser & Computer Control](browser-and-computer.md) | Open URLs, inspect DOM snapshots, click, type, move the mouse. |
| [Cron & Scheduling](cron.md) | Recurring jobs, one-off reminders, scheduled agent runs. |
| [Voice](voice.md) | Speech-to-text in, text-to-speech out, live Google Meet agent. |
-| [Memory Tools](memory-tools.md) | Recall, store, forget, and search the [Memory Tree](../memory.md). |
+| [Memory Tools](memory-tools.md) | Recall, store, forget, and search the [Memory](../memory.md). |
| [Third-party Integrations](../integrations/README.md) | The agent's view of the [118+ connected services](../integrations/README.md). |
| [Agent Coordination](agent-coordination.md) | Spawn subagents, delegate to skills, plan, ask the user. |
| [System & Utilities](system-and-utilities.md) | Shell, node, SQL, current time, push notifications, LSP. |
diff --git a/gitbooks/features/native-tools/cron.md b/gitbooks/features/native-tools/cron.md
index 029d81242f..ff32626e92 100644
--- a/gitbooks/features/native-tools/cron.md
+++ b/gitbooks/features/native-tools/cron.md
@@ -31,7 +31,7 @@ Agent jobs run a full model turn every time they fire, so they must be scheduled
## How it ties back to the rest
-Every cron run is just a normal agent invocation, so it can use any other tool - search the web, query the [Memory Tree](../memory.md), call a [third-party integration](../integrations/README.md), send a message. Run history is recorded so you can see what each tick produced.
+Every cron run is just a normal agent invocation, so it can use any other tool - search the web, query the [Memory](../memory.md), call a [third-party integration](../integrations/README.md), send a message. Run history is recorded so you can see what each tick produced.
## See also
diff --git a/gitbooks/features/native-tools/integrations.md b/gitbooks/features/native-tools/integrations.md
index d4a49c31e5..da63dab845 100644
--- a/gitbooks/features/native-tools/integrations.md
+++ b/gitbooks/features/native-tools/integrations.md
@@ -20,7 +20,7 @@ A few examples of what becomes available:
## Native vs proxied
-Some services have **native providers** - Rust modules that know how to ingest the service into the [Memory Tree](../memory.md) directly (e.g. Gmail's native ingest path). Others are exposed as **proxied tools** only: the agent can call them, but there's no automatic ingest yet. New native providers are added as features land.
+Some services have **native providers** - Rust modules that know how to ingest the service into the [Memory](../memory.md) directly (e.g. Gmail's native ingest path). Others are exposed as **proxied tools** only: the agent can call them, but there's no automatic ingest yet. New native providers are added as features land.
Lark / Feishu currently has two surfaces: a native real-time channel for message send/receive, and a Composio-proxied workspace toolkit entry for chat, docs, wiki, and meeting actions when the backend allowlist exposes it. Historical chat/doc backfill into the Memory Tree is not yet a native provider; track that separately from the live channel connector.
diff --git a/gitbooks/features/native-tools/voice.md b/gitbooks/features/native-tools/voice.md
index 0cf68bdc2b..f8612bf099 100644
--- a/gitbooks/features/native-tools/voice.md
+++ b/gitbooks/features/native-tools/voice.md
@@ -28,7 +28,7 @@ Reply speech routes through a hosted TTS model. The agent's responses can be spo
OpenHuman's flagship voice integration:
- Joins a Google Meet via the embedded webview.
-- Streams audio out to STT in real time, transcribes everyone in the call, and writes structured notes into the [Memory Tree](../memory.md) as the meeting progresses.
+- Streams audio out to STT in real time, transcribes everyone in the call, and writes structured notes into the [Memory](../memory.md) as the meeting progresses.
- When you ask it to speak (or it decides it has something useful to add), it generates audio through the TTS model and **plays it back into the meeting as an outbound camera/mic stream**, so other participants actually hear it.
## Privacy
@@ -39,5 +39,5 @@ OpenHuman's flagship voice integration:
## See also
-- [Memory Tree](../memory.md) - where Meet transcripts and notes live.
+- [Memory](../memory.md) - where Meet transcripts and notes live.
- [Automatic Model Routing](../model-routing/) - Meet's brain uses `hint:fast` for low-latency conversational turns.
diff --git a/gitbooks/features/personalization.md b/gitbooks/features/personalization.md
index 1aea3b7241..678ad223af 100644
--- a/gitbooks/features/personalization.md
+++ b/gitbooks/features/personalization.md
@@ -118,6 +118,6 @@ Everything learned is inspectable and reversible:
## See also
-- [Memory Tree](memory.md), where recurring people, topics, and threads live and are recalled per-turn.
+- [Memory](memory.md), where recurring people, topics, and threads live and are recalled per-turn.
- [Goals & To-dos](goals-and-todos.md), the goal-tracking surface that pairs with learned `goal/*` facets.
- [Cron & Scheduling](native-tools/cron.md), the scheduled runs that keep working your workspace between turns.
diff --git a/gitbooks/guides/personal-assistant.md b/gitbooks/guides/personal-assistant.md
index 7db643b5ac..06aad1c459 100644
--- a/gitbooks/guides/personal-assistant.md
+++ b/gitbooks/guides/personal-assistant.md
@@ -49,7 +49,7 @@ If you're not sure, pick **Cloud**. You can change any of this later in **Settin
An assistant with no memory is just a chatbot. Connect at least one source so it has context to draw on:
- Open **Settings** and connect an integration (Gmail is the common starting point). Each connection is a one-click OAuth approval.
-- Once connected, [auto-fetch](../features/memory.md) starts pulling data into your [Memory Tree](../features/memory.md) on a schedule (the first Gmail tick lands within about twenty minutes).
+- Once connected, [auto-fetch](../features/memory.md) starts pulling data into your [Memory](../features/memory.md) on a schedule (the first Gmail tick lands within about twenty minutes).
### 4. Set your boundaries