Agents That Remember.
Reason. Enforce. Persist.
LLMs forget everything between calls. Memory gives agents persistent, queryable knowledge โ facts that survive across sessions, constraints that enforce themselves, and structured reasoning that doesn't hallucinate.
Logic
Persistent Symbolic Memory for AI Agents
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.
Six Tools:
- 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 โ checked by flow.into before executing matching steps, so business rules enforce themselves across all workflows without modifying each one
- 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 โ agents get exactly the right facts without overflowing their context window, even with large fact bases
The Value:
- Facts survive across sessions, conversations, and agent restarts โ no re-learning, no context stuffing
- Multiple agents on the same server share the same fact space โ knowledge accumulated by Agent A is instantly queryable by Agent B with zero synchronization required
- Constraints as workflow enforcement: flow.into checks active constraints before executing matching steps โ define a rule once and it blocks or modifies every workflow that triggers it, automatically
- Isolated namespaces: double isolation per namespace โ application routing + Prolog scoping. Zero cross-talk.
- logic.hydrate: assembles budget-constrained context from the fact base โ semantic retrieval meets symbolic precision without context window overflow
- Export & Import: full fact base portability โ export to Prolog, import from structured sources, tabulate facts into records for seeding from existing data or backup
// Store a fact in natural language
{
"name": "data-grout@1/logic.remember@1",
"arguments": {
"statement": "Acme Corp billing contact is jane@acme.com",
"tag": "contacts"
}
}
// Add a constraint
{
"name": "data-grout@1/logic.constrain@1",
"arguments": {
"rule": "budget for any project must not exceed 50000"
}
}
// Query later โ even in a different session
{
"name": "data-grout@1/logic.query@1",
"arguments": {
"question": "Who is the billing contact for Acme?"
}
}Ephemerals
Managed View Over Active Cached Data
Agents accumulate cache_ref values across a conversation โ every tool call that produces results stores them in an encrypted, time-limited cache. Ephemerals provides a live view over that cache: agents can ask "what data do I have right now?" or "what does this ref actually contain?" before deciding what to do next, without re-running the original call.
Two Tools:
- ephemerals.list โ List all active cached datasets for the current user. Shows cache_ref, source tool, record count, type, and time until expiry.
- ephemerals.inspect โ Detailed stats and preview of a specific cache entry. Returns inferred schema (field names + types), sample rows, record count, expiry info, and source chain โ showing exactly which tool calls produced this data and in what order.
The Value:
- Zero cost โ pure ETS lookups with no LLM, no database, no network call
- Cached results are encrypted at rest with AES-256-GCM, scoped to your user
- Expire after 10 minutes of inactivity (touch-on-access โ each read resets the clock)
- Identical requests from the same user reuse existing references automatically
- When items expire from the cache, they vanish from the list โ ephemerals are working memory, not permanent storage
The Universal cache_ref Pattern
Everything in the system returns a receipt, estimate, and cache_ref. The cache_ref can be used in subsequent calls to treat its output as input โ your agent can filter, sort, group, and chart a dataset through a multi-step pipeline while the data stays server-side. The LLM only sees the final result you choose to return.
// Pull invoices โ filter โ group โ chart โ export // All server-side. LLM sees only the final output. salesforce.get-invoices โ cache_ref: "rc_abc" data.filter(cache_ref: "rc_abc", ...) โ cache_ref: "rc_def" frame.group(cache_ref: "rc_def", ...) โ cache_ref: "rc_ghi" prism.chart(cache_ref: "rc_ghi", type: "bar") prism.export(cache_ref: "rc_ghi", format: "pdf")
What Memory Enables
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, not through prompts.
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.
Agents That Remember What Matters.
Persistent symbolic memory. Zero hallucination. Sub-millisecond latency.
