FOAAP Engine
Provides authenticated persistence using a Supabase Postgres deployment, with a documented schema for engine model and event contracts. Supports conflict detection for concurrent writes via row locks and caller-supplied base versions.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@FOAAP EngineRecord our launch date as Aug 1 and show any conflicts it creates"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
FOAAP Engine
A stateful context engine for AI applications.
An application sends claims, decisions and evidence. The engine maintains a typed model of the situation: what is believed, what conflicts, what changed, and which action follows. A new answer does not silently replace the reasoning that came before it.
This is a public source reference extracted from FOAAP Engine. It includes the core model, HTTP adapter, MCP client, persistence contracts and executable tests. It runs independently of the private FOAAP deployment.
Start with a working example
Requires Node.js 22 or later. The first two commands need no dependencies, credentials, database or model provider.
npm run demo
npm run test:core
# Include the MCP contract test:
npm ci --ignore-scripts --prefix mcp
npm testThe demo adds two conflicting launch commitments, records an explicit verdict, surfaces the conflict as the next action, and records the replacement in the claim's lineage. All example data is fictional. See examples/state-walkthrough.mjs.
Related MCP server: Recommend Agentic Trust Layer
Decisions worth inspecting
Problem | Implementation | Evidence |
A later answer obscures an earlier commitment | Claims, decisions and contradictions are separate objects; a resolution records a supersession edge. | |
Extraction quietly drops inconvenient input | Every source atom must be projected into structure or retained as an explicit residual. | |
A model returns only part of a comparison batch | The judge processes every candidate pair and rejects partial verdict sets. | |
New evidence erases the history of disagreement | Semantic bonds retain support, opposition, predictions and observed outcomes separately. Their current interpretation can change. | |
Two clients save conflicting versions | A row lock and caller-supplied base version turn stale writes into explicit conflicts. | |
An agent depends on undocumented API behavior | An MCP client speaks to an isolated mock API through the SDK transport. |
The current suite has 29 tests: 20 original core tests, seven message-persistence regression tests, one portfolio-walkthrough test and one MCP contract test containing multiple request/response assertions. The contract test exercises the client against a mock API; it is not a deployment or database integration test.
The flow
flowchart LR
A[Input and evidence] --> B[Source atoms]
B --> C[Claims and decisions]
B --> R[Explicit residuals]
C --> D[Contradiction verdicts]
D --> E[Versioned model]
E --> F[Lineage and semantic evidence]
F --> G[Context and next action]The ontology is data: axes, workstreams and prerequisites live in engine/ontology.js and lib/. Model providers can propose extraction and verdicts; deterministic code owns the shapes, confidence gates and state transitions. Those checks do not establish that a model's interpretation is true.
API and MCP
api/v1.js is a Request/Response adapter for spaces, context, events, verdicts, evidence, exports and keys. server.js hosts it locally, bound to loopback, with an in-memory rate limiter. The public adapter serves this README instead of the private console.
npm run dev
curl http://localhost:8787/The pure core and tests work without setup. Authenticated persistence needs your own Supabase deployment and server-side configuration; see .env.example. The SQL files document the model and event contracts and assume existing workspace/auth tables. They are not a complete empty-database bootstrap.
The MCP client defaults to http://localhost:8787/api/v1. Set FOAAP_BASE_URL, FOAAP_API_KEY and optionally FOAAP_SPACE for your own deployment. No command here uses FOAAP's production credentials or connects to its production account by default.
Boundaries
Production secrets, account identifiers, deployment metadata, internal handoffs and historical logs are excluded. This repository begins with a separate publication history.
The reference retains the original core algorithms. Publication changes remove a production workspace exemption and hosted-service defaults, and replace private development pages with this README.
SQL migrations, managed-model integrations, production authorization and distributed quotas are not certified by the local test suite. The API adapter is source for review, not a promise of production readiness.
No performance or model-quality benchmark is claimed. The examples and tests use synthetic data.
Built by Paulo Villalobos. Portfolio.
Product reliability repair
The message record adapter in reliability/conversation-records.js is the same module used by the accompanying FOAAP app repair. It retains message identity, terminal status, timestamps and tool metadata. Replayed writes with the same message ID and session replace the record instead of appending a duplicate. Legacy records remain readable.
Regression tests exercise persistence/reload, replay and session boundaries. The integration patch shows the wiring into the private app. The private app build and a storage-adapter integration test passed locally; this public suite does not run the full app or certify its production deployment. This is a local persistence repair, not a solution for distributed retries or remote sync failures.
The read-only portfolio demo uses snapshots generated by examples/portfolio-walkthrough.mjs. Its verdicts and project data are synthetic; the state transitions run the actual public engine.
This server cannot be deployed
Maintenance
Related MCP Connectors
AI document intelligence: extract, summarize, claim-check, notarize, and signed action receipts.
Tamper-evident proof creation and verification for AI agents via MCP, A2A, and REST.
Append-only decisions with provenance, supersession, retrieval, and audited MCP actions.
Deterministic contextual decision arbitration and action routing for autonomous software. Takes current state, context, or intent plus caller-supplied candidate actions, state transitions, routes, refusals, escalations, tools, or models and returns a deterministic ordered candidate field. Also provides persistent machine representations for memory, retrieval, indexing, and downstream coherence measurement.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables submitting claims and receiving Ed25519-signed, hash-chained verdicts resolved against real external ground truth, supporting resolvers like GitHub PRs, on-chain transactions, URL JSON, HTTP status, and Kalshi markets.5352 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables agents to verify claims with evidence-based truth scores and confidence levels by running a deterministic pipeline of evidence lanes and adversarial checks.26MIT
- AlicenseAqualityBmaintenanceProvides a compiled knowledge substrate, extracting atomic claims from an append-only capture log and querying a bitemporal claim graph over MCP. Read-only by default, with opt-in writes for trusted sources.4MIT
- AlicenseAqualityBmaintenanceEnables AI agents to record, recall, correct, and forget evidence-backed factual claims with temporal history, while explaining whether remembered information is current, historical, or contested.5Apache 2.0