← All tools

Logic Tools

Persistent symbolic memory for AI agents. Store facts, query knowledge, define constraints, and reason over structured data — all with sub-millisecond latency, no LLM required. Facts persist across sessions and are shared across all agents on the same server.

Why this matters

LLMs lose context between sessions. Logic tools give each user a persistent fact space backed by a symbolic reasoning engine. Facts stored today are queryable tomorrow — no re-learning, no context stuffing. Multiple agents on the same server share the same fact space, so knowledge accumulated by one agent is immediately available to all others.

Capabilities

  • logic.remember — Store facts as natural language or structured key-value triples
  • logic.query — Ask questions in natural language or match structured patterns — no AI, instant results
  • logic.constrain — Define rules that actively affect future queries and block or modify workflow execution
  • logic.forget — Retract facts by handle or pattern when information changes
  • logic.reflect — Audit what the system knows about an entity or browse the full fact space
  • logic.hydrate — Goal-driven context assembly: decomposes a goal, queries relevant facts, and returns budget-constrained context

Constraints as guardrails

Constraints aren't just metadata — they actively influence execution. Define a constraint like "never process transactions above $10,000 without approval" and it will be checked by flow.into before executing steps that match. This gives you declarative business rules that apply across all workflows without modifying each one individually.

Example: store and query

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

// Query it later — even in a different session
{ "name": "data-grout@1/logic.query@1",
  "arguments": {
    "question": "Who is the billing contact for Acme?"
  }
}

Composes with

Use constraints to enforce business rules in Flow workflows. Query facts to make routing decisions in flow.route. Track suspicion across turns with Warden sessions. Use Data tools to filter or sort query results.