GhostCrab MCP + mindBrain SQLite : structured domain navigation for ADK agents sessions #5786
FrancoisLamotte
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What problem this solves
Google ADK gives developers precise control over sessions, tools, memory, callbacks,
and runners. The architecture is well-designed — and it leaves one slot explicitly
unfilled:
BaseMemoryService.The three native options are
InMemoryMemoryService(keyword match, non-persistent),VertexAiMemoryBankService(LLM-extracted, cloud-only), andVertexAiRagMemoryService(vector similarity). None provides a typed, faceted, self-hosted ontology registry.
Facts extracted by one agent are invisible to the next. Context rebuilt from scratch
at every session. Knowledge scattered and unstructured.
This request adds two complementary components that fill that slot without touching ADK core.
What a domain looks like in practice
A domain is any bounded context where agents need to
reason over structured relationships : not just retrieve text.
mindBrain separates two levels:
Ontology (the model) : the schema of a domain:
entity types, relationship types, constraints, vocabularies.
Defined once, shared across every agent and every session.
Knowledge Graph (the projected instance) : the populated graph:
real entities, real edges, real state : queryable via projections.
Example: multi-agent project delivery
OrchestratorAgent calls
search_memory("what is blocking DevAgent this sprint?")→MindBrain returns the full dependency chain in a single structured query.
No inference cost. No context-window dump. No re-reading session transcripts.
Example: ERP domain
A FinanceAgent resolving a billing anomaly navigates
account structure, approval rules, and GL entry history
without re-injecting spreadsheet data into each session.
The ADK
PreloadMemoryToolinjects the relevant slice automatically before each LLM call.Example: CRM domain
A SalesAgent preparing a renewal call retrieves
account tier, active deal stage, recent interaction sentiment,
and contractual constraints in one faceted query.
No re-reading CRM export. No LLM re-extraction of the same data.
Example: Customer Support domain
A SupportAgent resolving TK-9821 immediately retrieves
the linked incident, the known issue, and its resolution history
via
get_relations("Auth Service", "KnownIssue")—without searching knowledge bases or escalating blindly.
The meta-ontology: where mindBrain becomes strategic
Each domain above is useful alone. The real leverage is connecting them.
A single ADK multi-agent team working on a cross-domain task —
say, an enterprise renewal involving a billing dispute,
an open critical support ticket, and a stalled deal —
can query all four domains from the same structured registry in one pass.
The ADK OrchestratorAgent does not relay natural-language context
between specialized sub-agents. It reads the graph directly.
Relations carry their semantics natively. Context does not degrade across hops.
That is the difference between memory and ontology.
ADK's
search_memory()interface was built for exactly this kind of backend.MindBrain provides the implementation that Vertex AI cannot run on-premises.
Two components, one integration
mindBrain (SQLITE : Personal edition)
The data layer. It organizes domain knowledge into three constructs:
Agents don't search through data. They navigate a structured domain.
Embedding search is available for unstructured recall, but it's the fallback,
not the default.
GhostCrab MCP
The gateway layer. An MCP server that gives ADK agents the tools to:
PreloadMemoryToolbefore each LLM callafter_agent_callbackGhostCrab is a protocol bridge. mindBrain exists and operates independently.
Why this belongs outside ADK core
It should stay external.
ADK already provides the right extension slot:
BaseMemoryService.MindBrain implements that interface — placing GhostCrab exactly where ADK
expects a persistent, queryable context registry, with no modification to ADK itself.
MindBrainMemoryServicereplaces the Vertex lock-in with a self-hosted,air-gap compatible backend. Teams that cannot use
VertexAiMemoryBankServicefor compliance or cost reasons have a structured alternative.
If GhostCrab is absent : ADK behaves exactly as before.
If mindBrain is empty : agents start with a blank namespace and populate it
through normal session events and
after_agent_callbackingestion.Setup
Two integration paths, independently usable and combinable:
Path 1 — MCPToolset via stdio (local, zero infrastructure)
GhostCrab launches as a subprocess.
mindbrain.dbis created on first run.ADK surfaces all GhostCrab MCP tools as native Gemini function calls — no manual declaration.
Path 2 —
BaseMemoryServicebackend (deep integration, cross-session)search_memory()becomes a faceted ontology query.add_session_to_memory()maps session events to typed ontology nodes.PreloadMemoryToolinjects relevant context before each LLM call — proactively,without waiting for the agent to ask.
→ Full configuration, skill files, and tested ADK walkthrough:
https://github.com/mindflight-orchestrator/ghostcrab-personal-mcp/blob/main/ghostcrab-integrations/google-adk/sop-google-adk-ghostcrab-mindbrain.md
https://github.com/mindflight-orchestrator/ghostcrab-personal-mcp/blob/main/ghostcrab-integrations/google-adk/skill_ghostcrab-runtime-adk.md
Differentiation vs native ADK memory options
Scope of this request
google-adk(already available)--memory_service_uripoints to deployed GhostCrab endpoint; no Vertex lock-ingoogle-adkPython SDK,BaseMemoryServiceinterfaceBaseMemoryService+MCPToolset(no core modification)Beta Was this translation helpful? Give feedback.
All reactions