Neuro-Symbolic AI

Logic

Persistent symbolic memory that gives your AI agents the ability to remember, reason, and enforce constraints — backed by Prolog, accessed through natural language. All facts encrypted at rest.

LLMs forget everything between calls

Every conversation starts from zero. Your agent discovers a critical business rule, then promptly forgets it. Logic gives agents a persistent, queryable knowledge base — facts that survive across sessions, constraints that enforce themselves, and structured reasoning that doesn't hallucinate. All stored facts are encrypted at rest using AES-256-GCM.


How It Works

Agent Conversation

logic.remember

"Acme Corp billing contact is jane@acme.com"

NLP → Prolog fact

Prolog Knowledge Base

fact(contact, acme, jane@acme)
constraint(budget, <, 10000)
Persists across sessions

logic.query

"Who is the billing contact for Acme?"
→ jane@acme.com

Logic automatically translates natural language into Prolog facts and queries. The knowledge base persists across sessions and supports custom namespaces for completely isolated fact spaces, so your agent builds up institutional knowledge over time without cross-contamination. All facts are encrypted at rest. Constraints are checked on every new fact — violations are caught immediately.


Capabilities

Natural Language Facts

Store knowledge in plain English with logic.remember. Logic handles canonicalization and Prolog translation automatically — no query language to learn.

Direct Prolog Interface

For power users: logic.assert stores typed facts directly at zero LLM cost. logic.query(prolog: "...") executes raw Prolog goals with variable bindings returned as structured JSON — full precision, 1 credit, no translation step.

Native Graph Traversal

Built-in predicates for graph operations over relation facts: path finds multi-hop routes, reachable enumerates all connected nodes, and neighbors returns one-hop adjacency. Optimized at the engine level — no recursive rule derivation needed.

Persistent Memory

Facts survive across sessions, conversations, and agent restarts. Your agent never forgets what it learned. All facts are encrypted at rest.

Constraint Enforcement

Define business rules as constraints. When a new fact violates a constraint, Logic catches it immediately and explains why.

Isolated Namespaces

Every tool accepts a namespace parameter. Each namespace gets its own logic cell with double isolation — the application routes to a dedicated cell, and Prolog independently scopes all facts to that namespace's key. Two layers, zero cross-talk. Use one per project, per customer, or per workflow. List all active namespaces with logic.worlds.

Goal-Driven Hydration

logic.hydrate assembles relevant context for a specific goal from across all your fact spaces — semantic retrieval meets symbolic precision.

Export & Import

Full fact base portability. Export to Prolog, import from structured sources, and tabulate facts into records for downstream processing.


See It In Action

// Store facts in natural language
{
  "name": "data-grout@1/logic.remember@1",
  "arguments": {
    "statement": "Acme Corp billing contact is jane@acme.com",
    "tag": "contacts"
  }
}

// Or assert typed facts directly — zero LLM cost
{
  "name": "data-grout@1/logic.assert@1",
  "arguments": {
    "facts": [
      { "type": "entity", "name": "Acme Corp" },
      { "type": "metric", "entity": "Acme Corp", "metric": "arr", "value": 2500000 }
    ]
  }
}

// Query with natural language, patterns, or raw Prolog
{
  "name": "data-grout@1/logic.query@1",
  "arguments": {
    "prolog": "metric(E, \"arr\", V), V > 1000000"
  }
}

Natural language for convenience, raw Prolog for precision. logic.assert stores typed facts at zero LLM cost. logic.query(prolog: "...") gives you full control with structured JSON bindings — 1 credit, no translation step. Both paths lead to the same deterministic reasoning engine.


Use Cases

Institutional Memory

Build up organizational knowledge across hundreds of agent sessions. Customer preferences, business rules, compliance requirements — all queryable by any agent.

Policy Enforcement

Define constraints that prevent violations before they happen. Budget limits, approval workflows, data handling rules — all enforced symbolically.

Knowledge Graphs

Build and traverse typed relation graphs with logic.assert. Use native graph predicates to find paths, enumerate reachable nodes, and query neighborhood structure — all at engine-level speed.

Context Assembly

Use logic.hydrate to assemble exactly the right context for a task — no more stuffing entire databases into prompts. Semantic retrieval meets symbolic precision.


Composes With

Prism orient and horizon tools persist navigation facts directly into Logic cells — query, traverse, and reason over latent space exploration results. Logic facts automatically enrich Governor sessions for continuous awareness. Warden uses Logic-backed rules for adversarial adjudication. Flow workflows can branch on Logic queries for data-driven routing.