Skip to content

[codex] Add on-prem graph memory backend#696

Draft
heikog wants to merge 2 commits into
666ghj:mainfrom
heikog:codex/onprem-graph-memory-main
Draft

[codex] Add on-prem graph memory backend#696
heikog wants to merge 2 commits into
666ghj:mainfrom
heikog:codex/onprem-graph-memory-main

Conversation

@heikog

@heikog heikog commented Jun 13, 2026

Copy link
Copy Markdown

What changed

  • Adds a graph-memory adapter layer with Zep Cloud as the default backend.
  • Adds a Graphiti bridge adapter for on-premise graph memory.
  • Adds a separate Graphiti Bridge service backed by FalkorDB so Graphiti dependencies do not conflict with OASIS.
  • Adds an optional docker compose profile for graphiti-falkordb and graphiti-bridge.
  • Mirrors Reddit OASIS trace rows into reddit/actions.jsonl so run status, timelines, and graph-memory updates receive real simulation activity.
  • Makes report status lookup work consistently by task_id, report_id, or simulation_id, including GET query parameters.
  • Makes interview history sorting robust across mixed SQLite timestamp formats emitted by different simulation platforms.
  • Documents the on-premise graph-memory setup.

Why

Zep Cloud can be expensive for self-hosted deployments. This keeps existing Zep behavior as the default while adding an on-premise path that can be enabled with GRAPH_MEMORY_BACKEND=graphiti_bridge.

The API fixes are included because the full on-premise end-to-end validation exposed two integration issues outside the adapter itself: Reddit simulation activity was not visible to graph-memory updates before trace mirroring, and completed report/interview endpoints had edge cases that made non-GUI verification unreliable.

Validation

  • python3 -m compileall -q backend/app graphiti_bridge backend/scripts/run_reddit_simulation.py
  • python3 -m py_compile backend/app/services/simulation_runner.py backend/app/api/report.py
  • git diff --check
  • Direct adapter smoke test on Paul using GraphitiBridgeGraphMemoryAdapter against graphiti-bridge/FalkorDB.
  • Manual full API end-to-end test on Paul with GRAPH_MEMORY_BACKEND=graphiti_bridge:
    • project proj_40134302015f, graph mirofish_11dcdf61aa4c4eb7, simulation sim_d2b03920d048, report report_33bf2737c50d
    • ontology generation produced 10 entity types and 9 relationship types
    • initial graph build produced 24 nodes and 6 Graphiti/Falkor edges
    • profile preparation produced 16 profiles
    • parallel Reddit + Twitter simulation completed 2/2 rounds with 16 platform actions
    • Reddit and Twitter action logs were both written
    • graph-memory update increased Graphiti/Falkor edges from 6 to 11 after simulation activity
    • interview batch completed and wrote a response file
    • report generation completed with title 2030 Market Debate: How AI Reshapes the Software Developer Market
    • report chat, report retrieval, report sections, report checks, report download, and simulation config download returned successfully
  • Targeted regression checks after the API fixes:
    • POST /api/simulation/interview/history returns HTTP 200 with 20 interview records from the AI developer market simulation
    • GET /api/report/generate/status?report_id=report_33bf2737c50d returns HTTP 200, completed, progress 100
    • POST /api/report/generate/status with report_id returns HTTP 200, completed, progress 100
    • POST /api/report/generate/status with simulation_id returns HTTP 200, completed, progress 100

@heikog heikog force-pushed the codex/onprem-graph-memory-main branch from 311b664 to 15c955f Compare June 13, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant