---
id: 10007
title: 'Memory Core: Bypass Database Initialization in Unified Mode'
state: CLOSED
labels:
  - enhancement
  - ai
  - architecture
assignees:
  - tobiu
createdAt: '2026-04-14T15:18:10Z'
updatedAt: '2026-04-20T13:40:03Z'
githubUrl: 'https://github.com/neomjs/neo/issues/10007'
author: tobiu
commentsCount: 0
parentIssue: 10015
subIssues: []
subIssuesCompleted: 0
subIssuesTotal: 0
blockedBy:
  - '[x] 10001 Dynamic Topology: Unified vs. Federated Routing'
blocking:
  - '[ ] 10008 Playwright Test Coverage: Unified Monolithic Topology'
closedAt: '2026-04-20T13:40:03Z'
---
# Memory Core: Bypass Database Initialization in Unified Mode

## Objective
When the `NEO_CHROMA_UNIFIED` flag is `true`, the Memory Core must act strictly as a downstream client of the Knowledge Base's DB, preventing collision or redundant container instantiation.

## Tasks
1. Refactor `ai/mcp/server/memory-core/services/DatabaseService.mjs` (and the `manage_database` tool) to assess `NEO_CHROMA_UNIFIED`.
2. If `true`, the Memory Core MUST NOT attempt to start its own ChromaDB python instance/container. It should simply instantiate a `ChromaClient` pointing to `localhost:8000` (the KB instance) and assume it is already active.
3. If `false`, it resumes its standard behavior of creating a private instance on `8001`.

## Timeline

- 2026-04-14T15:18:11Z @tobiu added the `enhancement` label
- 2026-04-14T15:18:12Z @tobiu added the `ai` label
- 2026-04-14T15:18:12Z @tobiu added the `architecture` label
- 2026-04-14T15:18:28Z @tobiu added parent issue #9999
- 2026-04-14T16:43:35Z @tobiu cross-referenced by #10015
- 2026-04-14T16:44:12Z @tobiu removed parent issue #9999
- 2026-04-14T16:44:13Z @tobiu added parent issue #10015
- 2026-04-14T16:44:37Z @tobiu marked this issue as being blocked by #10001
- 2026-04-14T16:44:38Z @tobiu marked this issue as blocking #10008
- 2026-04-20T10:40:37Z @tobiu cross-referenced by PR #10121
- 2026-04-20T11:13:56Z @tobiu cross-referenced by #9748
- 2026-04-20T11:19:03Z @tobiu cross-referenced by PR #10122
- 2026-04-20T13:02:37Z @tobiu assigned to @tobiu
- 2026-04-20T13:05:29Z @tobiu referenced in commit `4ae5641` - "feat(ai): skip MC ChromaDB spawn in unified mode (#10007)"
- 2026-04-20T13:06:56Z @tobiu cross-referenced by PR #10123
- 2026-04-20T13:15:41Z @tobiu cross-referenced by PR #10124
- 2026-04-20T13:36:43Z @tobiu referenced in commit `8d88d81` - "test(ai): add initAsync short-circuit coverage + document manageDatabase passthrough (#10007)"
- 2026-04-20T13:40:03Z @tobiu referenced in commit `4cec696` - "feat(ai): skip MC ChromaDB spawn in unified mode (#10007) (#10123)

* feat(ai): skip MC ChromaDB spawn in unified mode (#10007)

* test(ai): add initAsync short-circuit coverage + document manageDatabase passthrough (#10007)"
- 2026-04-20T13:40:03Z @tobiu closed this issue
- 2026-04-20T13:53:15Z @tobiu cross-referenced by #10127
- 2026-04-20T14:12:33Z @tobiu cross-referenced by PR #10128
- 2026-04-20T15:04:06Z @tobiu cross-referenced by #10129
- 2026-04-20T15:26:36Z @tobiu cross-referenced by PR #10130
- 2026-04-20T18:26:55Z @tobiu cross-referenced by PR #10131
- 2026-04-23T22:22:29Z @neo-opus-ada cross-referenced by #9999
- 2026-04-23T22:46:18Z @neo-opus-ada cross-referenced by PR #10268
- 2026-04-23T23:32:13Z @tobiu referenced in commit `f70c48f` - "feat(memory-core): surface effective chromadb topology in /health (#10127) (#10268)

Extends HealthService.healthcheck() with a database.topology observability
block exposing mode (unified|federated), coordinates ({host, port}), and
resolvedVia (the config key path the resolver read). Closes the in-band
observability gap for sub-epic #10015: operators can now verify
NEO_CHROMA_UNIFIED=true took effect from a single healthcheck call,
instead of inspecting logs or re-running config through node -e.

- Add module-scope buildTopologyBlock(cfg) as a pure projection, mirroring
  the buildIdentityBlock precedent from #10176. Delegates coordinate
  resolution to ChromaManager.resolveChromaCoordinates (extracted in #10001
  specifically for this kind of aggregation) and computes resolvedVia
  from chromaUnified. Defensive try/catch keeps healthcheck resilient when
  the resolver throws on missing engines.kb.chroma — surfaces misconfig as
  observable data (coordinates: null, error: <message>), per PR #10227's
  surface-don't-obscure principle.
- Wire buildTopologyBlock(aiConfig) into #performHealthCheck's payload
  under database.topology, before connectivity checks so operators still
  see target coordinates when status is unhealthy.
- Extend HealthService.spec.mjs with three topology tests covering
  federated mode, unified mode, and unified-with-missing-kb-chroma misconfig.
- Document the full healthcheck response shape in learn/agentos/MemoryCore.md,
  folding in the deferred doc pass from #10001 + #10007 and covering the
  #10176 identity and #10017 migration observability blocks.

Resolves #10127

Co-authored-by: tobiu <tobiasuhlig78@gmail.com>"
- 2026-05-04T13:21:56Z @neo-gpt cross-referenced by #10691
- 2026-05-04T13:24:45Z @neo-gpt cross-referenced by #10694
- 2026-05-04T20:45:45Z @neo-opus-ada cross-referenced by PR #10716
- 2026-05-04T21:24:12Z @tobiu referenced in commit `e2210a8` - "docs(agentos): document shared KB/MC team deployment profile (#10694) (#10716)

* docs(agentos): document shared KB/MC team deployment profile (#10694)

Adds learn/agentos/SharedDeployment.md as the canonical operator-facing profile
for the shared-team MVP topology under #10691. Indexes the new doc in
learn/tree.json under the AgentOS top-level surface, alongside KnowledgeBase /
MemoryCore / GitHubWorkflow / CodeExecution.

The doc establishes three independent boundaries (one Chroma process, separate
collections, two MCP servers), pins NEO_CHROMA_UNIFIED as the single
operator-facing flag, cross-links the existing healthcheck topology block from
MemoryCore.md (#10127), and documents migration from per-developer local mode.

#10008 is named as the canonical validation path (Playwright unified-mode test
coverage); #10009 receives an explicit demoted-to-non-default-diagnostic
disposition recommendation per epic-review structural amendments. No code paths
change — the unified topology and healthcheck shipped via #10001/#10007/#10127.

* docs(agentos): clarify per-server healthcheck shape + smoke-test surfaces (#10694)

Addresses Cycle 1 review (PRR_kwDODSospM77vMjD) on PR #10716. Two doc-contract
corrections in the Migration section:

- Step 4 (healthcheck verification): split per-server proof shape — Memory
  Core's healthcheck surfaces `database.topology` (canonical topology proof
  per #10127), Knowledge Base's healthcheck proves connectivity + collection
  availability without a topology block. Cross-server consistency is the
  end-to-end verification primitive.
- Step 5 (first-session smoke test): distinguish memory-visibility proof
  (`query_summaries` against Memory Core) from KB-sharing validation
  (`ask_knowledge_base` against Knowledge Base). The two surfaces are
  separate retrieval contracts; conflating them obscured what each query
  actually proves.

No content/scope changes — purely doc-precision corrections per @neo-gpt's
review.

---------

Co-authored-by: tobiu <tobiasuhlig78@gmail.com>"

