Deterministic, auditable, self-consolidating memory for AI agents.
Compliance-grade memory for regulated teams: byte-identical replay, bitemporal audit, and self-hosted sovereignty β not another vector chat log.
Repository: https://github.com/insightitsGit/PrismCortex (public)
π€ AI agent handoff Β· π Whitepaper Β· π Benchmarks Β· πΊοΈ Roadmap Β· ποΈ Design spec
Product page: insightits.com/products/prismcortex
Most agent memory is an append-only chat log or a vector store in someone else's cloud. That breaks in production when:
- Legal asks "what did the agent know on March 3rd?" β and you grep chat logs
- A correction ($40k β $55k) doesn't reliably surface β or erases audit history
- Compliance rejects third-party memory SaaS for data residency
PrismCortex digests each turn into a knowledge graph, consolidates uncertain facts
in the background (sleep()), and recalls by rendering facts once and freezing answers
in a content-addressed cache.
from prismcortex import reference_memory
mem = reference_memory(cache_path=".prismcortex_cache/demo.json")
mem.digest("My production deploy budget is $40,000.")
print(mem.recall("What's my deploy budget?").answer) # β "$40,000"
mem.digest("Correction: my deploy budget is now $55,000.") # fast-tracked (ALERT)
print(mem.recall("What's my deploy budget?").answer) # β "$55,000"
# The $40,000 fact is still on record β time-stamped β for audit / time-travel.| Claim | Result |
|---|---|
| Replay determinism | 24/24 byte-identical replays |
| Corrections + audit | $40k β $55k; superseded fact retained |
| Cost / cache | 99.6% hit rate β 30 Gemini calls / 2,563 recalls |
| Cached replay | ~6 ms vs ~724 ms first render |
| Mixed load (c=20) | 0 errors on 4 vCPU node |
| Server reliability | 0 errors on core path |
| Scale (50k facts, ANN) | 85% hit@8, 74 ms p95 retrieval |
Details: benchmarks/RESULTS.md Β· docs/WHITEPAPER.md
pip install prismcortex # core (MIT)
pip install "prismcortex[gemini]" # + real Gemini extraction/rendering
pip install "prismcortex[prism]" # + full Insight ITS stack (PrismLang, etc.)
pip install "prismcortex[server]" # + FastAPI HTTP service
pip install "prismcortex[gemini,server,prism]" # production stackRequires Python 3.10+.
Best for a single agent embedded in your app:
from prismcortex import reference_memory
mem = reference_memory() # needs GEMINI_API_KEY for real extraction
mem.digest("We use Postgres 16 in us-east-1.")
result = mem.recall("Where is our database hosted?")
print(result.answer, result.cache_hit, result.confidence)Best for platform teams and non-Python clients:
export GEMINI_API_KEY=...
export PRISMCORTEX_API_KEY=your-secret
uvicorn prismcortex.server:app --host 0.0.0.0 --port 8080
# OpenAPI docs: http://localhost:8080/docscurl -X POST http://localhost:8080/digest \
-H "Content-Type: application/json" \
-H "X-API-Key: your-secret" \
-d '{"text": "Our deploy budget is $40,000."}'
curl -X POST http://localhost:8080/recall \
-H "Content-Type: application/json" \
-H "X-API-Key: your-secret" \
-d '{"query": "What is our deploy budget?"}'Docker + Azure deploy: see deploy/run_only.sh.
| Append-only RAG | PrismCortex | |
|---|---|---|
| Storage | every chat turn | graph topology (the gist) |
| Updates | append + hope retrieval ranks it | bitemporal: invalidate old, add new, keep history |
| Determinism | logs + LLM drift | content-addressed cache, replay-identical |
| Cost | re-extract every call | salience-gated writes, cached reads |
| Audit | grep the logs | evidence trail + replay certificate |
| Feature | Endpoint / module |
|---|---|
| Explainability | POST /explain |
| Time-travel recall | POST /recall_at |
| Replay certificate | GET /replay_certificate |
| Conflict surfacing | GET /conflicts, POST /conflicts/resolve |
| GDPR erasure | POST /forget |
| Legal hold | POST /legal_hold |
| Multi-tenant + RBAC | auth.py, tenant.py |
| Audit console | GET /console |
| Metrics / ops | GET /metrics, GET /dashboard |
| 50k+ facts (ANN) | PRISMCORTEX_USE_ANN=1 |
Docs: docs/SLA.md Β· docs/CAPACITY.md Β· docs/SOC2_ROADMAP.md Β· SECURITY.md
digest(text) ββΆ salience gate ββΆ extract gist ββΆ delta in RAM
ββ certain / urgent ββΆ commit (version++)
ββ uncertain ββββββββΆ staging buffer βββΆ sleep() βββΆ commit
recall(query) ββΆ retrieve subgraph ββΆ cache hit? replay (byte-identical)
ββ miss? render once β freeze
| Port | Reference | Production ([prism]) |
|---|---|---|
| Gist projection | hashing embeddings | prismlang |
| Graph store | in-memory bitemporal | prismrag-patch |
| Consolidation | in-process | prismresonance |
| Render cache | JSON file | prismlib |
| Extraction | β | Gemini ([gemini]) |
Full design: DESIGN.md Β· Whitepaper: docs/WHITEPAPER.md
We do not claim "temperature 0 = identical output" for shared API models.
We claim replay determinism: once an answer is rendered for a (query, memory-version)
pair, it is frozen and replayed byte-identically. Facts are extractive from the graph;
prose is frozen after first render. See DESIGN.md Β§2.
git clone https://github.com/insightitsGit/PrismCortex.git
cd PrismCortex
pip install -e ".[dev,gemini,server]"
pytest tests/test_graph_engine.py # no API key
GEMINI_API_KEY=... pytest # full suite
python benchmarks/scale_bench.py --ann # 50k ANN scale test
BACKEND=prism bash deploy/run_only.sh # Azure E2E (needs .env)Publish to PyPI: scripts/publish_pypi.ps1 (requires PYPI_API_TOKEN).
| Doc | Contents |
|---|---|
| AGENTS.md | AI agent handoff β canonical URLs, contacts, processes |
| ai-info.txt | Machine-readable product summary for LLM crawlers |
| docs/WHITEPAPER.md | Product whitepaper β problem, architecture, validation |
| DESIGN.md | Engineering design spec |
| benchmarks/RESULTS.md | Azure benchmark scorecard |
| ROADMAP.md | Enterprise GA plan + honest gaps |
| docs/SLA.md | Reference SLOs + commercial tiers |
| docs/CAPACITY.md | Sizing guide (~20 concurrent clients / 4 vCPU) |
| docs/SCALING.md | Horizontal read scaling story |
| docs/SUPPORT.md | 24Γ7 Enterprise support model |
| docs/SOC2_ROADMAP.md | Compliance readiness |
| SECURITY.md | Security posture |
Open-core (MIT): digest/recall, bitemporal graph, determinism cache β free on PyPI.
Commercial: audit console, advanced governance, scale tiers β offline Ed25519 license key, no phone-home, air-gap friendly. See DESIGN.md Β§7.
Enterprise: info@insightits.com Β· +1 (973) 692-6919 Β· Insight IT Solutions LLC
Address: 39 Aliso Ridge Loop, Mission Viejo, CA 92691, US
PrismCortex orchestrates the Insight ITS stack. Related products:
- PrismRAG β governed enterprise RAG
- PrismLang β deterministic projection
- PrismResonance β wavepacket memory
- CHORUS Fabric β agent mesh protocol