You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(mcp): mempalace_walk_palace — agent walks the palace via AGE Cypher
Phase 6 of /goal: AGE integration. The "agent walks into the palace
finding wings, rooms, drawers" metaphor becomes a real MCP tool over
the unified palace+entity graph (Wing → Room → Drawer → MENTIONS →
Entity) built in Phases 1-4.
Three traversal modes, exactly one anchor required:
start_wing="memorypalace" → walks DOWN the structure
depth=1: rooms in this wing
depth=2: + drawers in those rooms
depth=3: + entities those drawers mention
start_room="problems" → walks DOWN from a room (across all wings)
depth=1: drawers in this room (any wing)
depth=2: + entities mentioned
start_entity="pgvector" → walks UP from an entity (inverse walk)
depth=1: drawers that mention this entity
depth=2: + the rooms+wings containing those drawers
Returns:
{
"start": {"wing": ..., "room": ..., "entity": ...},
"depth": N,
"walk": [{wing, room, drawer, entity}, ...],
"stats": {wings_touched, rooms_touched, drawers_touched, entities_touched}
}
Requires MEMPALACE_BACKEND=postgres and the AGE graph populated via
mempalace.kg_writethrough or mempalace.backfill_age.
Smoke-tested on sme_lme_bench:
- walk_palace(start_entity='pgvector', depth=2) returns the 3 drawers
mentioning it (postgres.py, CHANGELOG.md, BENCHMARKS.md), plus their
containing rooms+wings (postgres+code, CHANGELOG+docs, BENCHMARKS+docs)
- walk_palace(start_room='postgres', depth=2) returns the postgres.py
drawer plus its 3 mentioned entities (pgvector, hnsw, Apache AGE)
- walk_palace(start_wing='docs', depth=3) walks into the docs wing's
rooms, drawers, and entity layer
This completes the 6-phase plan that started from today's spike result
(+9pp R@5 from AGE entity-overlap fused with vector). The metaphor of
the AI walking the palace is now real Cypher traversal — anyone with
the MCP tool can ask "where does pgvector get discussed?" or "what's
in the memorypalace wing?" and get a structured answer.
0 commit comments