Logo vun FlowScript

FlowScript

Communautéit
phillipclapham

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.

Editeurphillipclapham
Repositoryflowscript
SproochTypeScript
Forks
2
Stären
10
Disponibel Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    FlowScript stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    10 Stären an 2 Forks aus dem verlinkte Repository.


Evolution note: FlowScript explored typed reasoning representation for AI agents — compression-as-cognition, temporal graduation, citation-validated patterns, immune system. These core concepts evolved into anneal-memory, a two-layer memory system for AI agents. The notation remains in active daily use for reasoning compression and knowledge encoding. This repo is maintained as a reference implementation and notation playground.


The Notation

FlowScript is a 21-marker semantic notation that both humans and AI parse natively. It sits between natural language (ambiguous, verbose) and formal logic (precise, unreadable). Start with three markers — ->, ><, { } — and add more as you need them.

{database_decision:
  ? which_database_for_sessions
  || Redis -> sub-ms reads, proven at scale
  || PostgreSQL -> rich queries, $15/month, ACID

  speed ><[performance vs cost] infrastructure budget

  [decided(rationale: "budget constraint eliminated Redis", on: "2026-03-30")]
  ! [blocked(reason: "data export tool needed", since: "2026-03-28")]
}

Every marker has computational semantics. ? creates a question node. || creates alternatives. >< creates a tension with a named axis. [decided] records a commitment with rationale and date. The parser turns this into the same IR that the query engine traverses.

Learn the full notation: flowscript.org/learn | Formal spec: spec/ directory (757 lines, v2.1)


What This Repo Contains

TypeScript SDK (flowscript-core on npm)

779 tests. Memory class with typed node construction, six graph traversal queries, 15 agent tools in OpenAI function calling format, hash-chained audit trail, and four token budgeting strategies.

typescript
import { Memory } from 'flowscript-core';

const mem = Memory.loadOrCreate('./agent-memory.json');

// Build reasoning — typed nodes with explicit relationships
const q = mem.question("Which database for agent memory?");
mem.alternative(q, "Redis").decide({ rationale: "speed critical" });
mem.alternative(q, "SQLite").block({ reason: "no concurrent writes" });
mem.tension(mem.thought("sub-ms reads"), mem.thought("$200/mo cluster"), "performance vs cost");

// Six typed queries over the reasoning graph
mem.query.tensions();             // tradeoffs with named axes
mem.query.blocked();              // what's stuck + downstream impact
mem.query.why(nodeId);            // causal chain backward
mem.query.whatIf(nodeId);         // what breaks if this changes
mem.query.alternatives(nodeId);   // what was considered + decided
mem.query.counterfactual(nodeId); // what would need to change

// Human-readable serialization
console.log(mem.toFlowScript());

Sub-millisecond graph traversal. No embeddings, no LLM calls, no network dependency.

Web Editor (flowscript.org)

  • CodeMirror 6 with custom FlowScript language mode and syntax highlighting
  • D3 force-directed graph visualization of reasoning nodes and relationships
  • Live query panel — run tensions(), blocked(), why() against your graph in the browser
  • WCAG AA accessible, responsive design

Source code in web/.

Notation Spec

The full FlowScript v2.1 specification in spec/:

  • semantics.md — all 21 markers formally defined
  • grammar.md — EBNF formal grammar
  • ir.schema.json — JSON schema for the intermediate representation
  • linter-rules.md — semantic validation rules (6 errors, 3 warnings)

Teaching Materials


What Evolved into anneal-memory

Through building FlowScript, we discovered that the core insights were more powerful than the syntax:

FlowScript exploredanneal-memory delivers
Temporal graduation (1x → 2x → 3x → proven)Citation-validated graduation with immune system
Compression-as-cognitionEpisodes compress into identity through consolidation
Hash-chained audit trailTamper-evident compliance layer (EU AI Act)
Anti-inbreeding defenseGraduation gate + principle demotion through citation decay
Transport-layer wrapperCompliance proxy vision (MCP transport interception)
Six typed reasoning queriesPlanned for anneal-memory CLI

The notation barrier was real — developers won't learn a new syntax for memory. anneal-memory delivers the same cognitive architecture as a zero-dependency MCP server where agents use natural language.

anneal-memory on GitHub | anneal-memory on PyPI


Related


Installatioun

TypingMind
Viraussetzungen:

Node.js 18+

{
  "mcpServers": {
    "phillipclapham-flowscript": {
      "command": "npx",
      "args": [
        "-y",
        "flowscript-core"
      ]
    }
  }
}

FlowScript MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal FlowScript verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

FlowScript als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu FlowScript an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "phillipclapham-flowscript": {
      "command": "npx",
      "args": [
        "-y",
        "flowscript-core"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu FlowScript. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu FlowScript.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat FlowScript?
FlowScript
Jo. Ech hunn et gelies.
Dat hunn ech mat FlowScript fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server FlowScript benotzt?

FlowScript ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech FlowScript MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir FlowScript mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat FlowScript MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann FlowScript verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech FlowScript MCP mat TypingMind?

FlowScript leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt FlowScript MCP an TypingMind zur Verfügung?

FlowScript stellt MCP-Funktiounen zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir FlowScript MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann FlowScript eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇