Back to browse
GitHub Repository

Queryable reasoning memory for AI agents. Six typed queries (why, tensions, blocked, whatIf, alternatives, counterfactual) over reasoning graphs. Vector stores remember what. FlowScript remembers why. TypeScript SDK + MCP server.

11 starsTypeScript

FlowScript – Agent memory where contradictions are features

by phillipclapham·Mar 25, 2026·2 points·1 comment

AI Analysis

●●●BangerBig BrainZero to OneWizardry

Five queries vector stores can't answer: why(), tensions(), blocked(), whatIf(), alternatives().

Strengths
  • Typed primitives (thoughts, decisions, blockers) instead of flat vector embeddings
  • Hash-chained audit trail with sub-ms local traversal
  • MCP server + 9 framework adapters for immediate integration
Weaknesses
  • Only 7 stars on GitHub—early adoption risk
  • No mention of scaling beyond project-scale graphs
Target Audience

AI developers building agent systems, ML engineers

Similar To

LangGraph · Mem0 · Google Memory Bank

Post Description

There is a shortfall to our current approach to agent memory. Right now, we are just collecting flat facts across a flat memory surface and creating vectorized chains of ambiguity, then wondering why when we ask an agent why it did something the best answer we can get is a probabilistic half-hallucinated half-answer that does not address the actual details of the issue, because it is simply pattern matching to find untyped similarities.

So I built FlowScript.

FlowScript is a typed reasoning graph that your agent builds through tool calls during your everyday work. It is NOT a graph database. What it is is a small set of unique opinionated primitives: things like thoughts, questions, decisions, blockers, and each of those have typed relationships between them. Your agent calls the tools as it works and it builds this typed graph, and then afterwards you can query that structure to get actual deterministic answers using five queries: tensions, blocked, why, whatIf, alternatives.

What does this look like in practice? Here's an agent that has been reasoning about database choices for a few sessions:

> mem.query.why("node_postgres_decision")

PostgreSQL chosen ← "Need ACID for payment processing" ← "Original requirement: handle refunds atomically" ← "Stripe webhook failures in staging revealed race condition"

> mem.query.tensions()

><[performance vs cost] "Redis: sub-ms reads critical for UX" vs "Redis cluster: $200/mo for 3 nodes"

The why chain traces back to the original constraint and the tension preserves the actual tradeoff being made. These are things no vector store can do, because they are NOT just flat facts, but are relationships and reasoning chains that are being captured in a deterministic way. Meaning you can actually go back and audit the actual reasoning of your agent, how it evolved over time, and see the actual tensions that were being balanced. No more opaque reasoning that is lost as soon as the polished answer is generated. Try that in any other memory system, I'll wait.

Other memory systems, when they come across a tension or a contradiction, for the most part they are just simply deleting that. And that is wrong because that tension is new knowledge. Knowledge that we need to actually keep for auditing and because it tells us about the evolution of the system and its cognition over time. So instead of deleting contradictions, we relate and create named relationships for them. Relationships you can query.

Every decision, every tension, every piece of reasoning is being deterministically captured into an audit trail and hash-encoded. Now, not only do you have a deterministic reasoning chain, but that reasoning chain is auditable. You can go back to any point within the time that you have audit logs for and deterministically review and understand the actual reasoning chain that your model was using. Something that no other system can offer. The EU AI Act is going to require exactly this kind of transparency by August 2026, and as far as I can tell, FlowScript is the first open source agent memory system that is designed to meet that bar.

Try it NOW: Our MCP server in Claude Code or Cursor. Install and check our Get Started guide so you can add one JSON block to your editor config and drop a snippet into your project CLAUDE.md file, then restart. Your AI assistant gets a full set of reasoning tools that actually trace causality.

pip install flowscript-agents openai

See flowscript.org for full setup instructions: <https://flowscript.org/get-started>

Or grab the TypeScript SDK for programmatic use:

npm install flowscript-core

There are drop-in adapters for LangGraph, CrewAI, Google ADK, and more Python agent frameworks. MIT licensed. Open source.

Repo: <https://github.com/phillipclapham/flowscript> Docs: <https://flowscript.org> Python SDK: <https://github.com/phillipclapham/flowscript-agents>

Similar Projects

AI/ML●●●Banger

Cairn – Event-sourced reasoning graphs for AI memory

Tracks what you decided, not just what you said — propositions with confidence scores and lifecycle status.

Big BrainWizardry
smcady
202mo ago
AI/ML●●Solid

Kremis – Deterministic memory graph for AI agents (Rust)

Deterministic graph memory vs. embeddings is clever, but fragmentation of AI memory ecosystems is already painful.

Big BrainWizardry
M2Dr3g0n
103mo ago
AI/ML●●●Banger

YantrikDB – persistent memory for AI agents

Bundled 7MB embedder means zero network calls or model downloads for agent memory.

Zero to OneWizardrySolve My Problem
pranabsarkar
111mo ago
AI/ML●●●Banger

A memory database that forgets, consolidates, and detects contradiction

Vector DBs store memories; this one forgets, consolidates, and flags contradictions like human memory.

Big BrainZero to OneWizardry
pranabsarkar
48331mo ago