ACT-R Inspired Memory API
setup.md
A RESTful API for Developers
Achiral Memory API
Deploy secure production-class Emergent Memory for AI-powered applications.
Terminal
# 1. install the SDK$ npm install @achiral/chiro# 2. set an acm_ token$ export ACHIRAL_API_KEY=acm_...# 3. call /v1/memory/retrieve$ export ACHIRAL_BASE_URL=https://your-org.achiral.ai/v1# 4. write back what mattered$ await memory.encode({ content: "...", source: "product-event" })app/api/memory/route.ts
// 3. call /v1/memory/retrieve through the SDK
import { Chiro } from "@achiral/chiro";
// Use the acm_ token from your environment
const memory = new Chiro({
apiKey: process.env.ACHIRAL_API_KEY,
baseURL: process.env.ACHIRAL_BASE_URL,
});
// Return retrieved context before your model answers
export async function POST() {
return Response.json(await memory.retrieve({
query: "What should this app remember?",
includeContext: true,
}));
}Summary capsule
Achiral Memory API lets applications remember useful facts, events, and decisions. Use it to recall context before a model answers, write back what mattered, and inspect where memories came from.
Scoped API permissions
memory:read
recall context
memory:write
encode facts and events
memory:control
reinforce and suppress
memory:delete
tombstone records
State of the art
Memory Benchmarking with Cognoscenti
Measuring memory coherence and usefulness over time.
Achiral’s ACT-R–inspired memory consistently outperformed plain RAG and other storage primitives on standardized agent-memory and organization-scoped reference workloads.
Test results
Date: Aug 2, 2026
Top-1 Accuracy
Top-1 accuracy measures the accuracy of the first memory returned by the system. Read more about the Cognoscenti benchmarks on GitHub.
Achiral Memory API reference
Reference baseline
91.67%
Vanilla RAG primitive
Retrieval baseline
50.00%
Explore the benchmark page for methodology, historical data, underlying assumptions, and in-depth analysis.
See test detailsACT-R inspired memory primitives
Reliable memory loop
Built for applications that need experience-driven memory at scale. Achiral Memory API allows activated retrieval, encoding, event ingestion, reinforcement, suppression, and provenance to keep the context moving forward across users, workflows, and time.
Activated Retrieval
Activate useful context with ranking signals for relevance, recency, salience, and prior reinforcement.
Memory Encoding
Persist decisions, preferences, product facts, and outcomes through retry-safe writes.
Event Ingestion
Turn deploys, incidents, CI runs, PRs, support tickets, and product events into memory evidence.
Provenance Controls
Reinforce what helped, suppress stale records, tombstone records, and inspect provenance before trusting retrieval.
How it works
From product events to adaptive context
01
Capture useful information
Distill facts from developer events: preferences, outcomes, incidents, resolutions, and decisions.
02
Retrieve scoped context
Ask for memories by namespace, intent, user, or agent and receive context ranked for the current request.
03
Run any model
Use the returned memories or assembled context block with your OpenAI-compatible model endpoint.
04
Write back outcomes
Fold experiences back into memory with useful outcomes, reinforced facts, and stale records suppressed.
How to choose the right memory surface
Achiral Memory API
Your app needs stateful memory
Use Achiral Memory API to give your application production-ready memory that can remember, update, learn, forget, and track where information came from. Connect the dots between product workflows and operational context safely.
Available through @achiral/chiro and the /v1/memory endpoint API.
Shelby Memory Agents
Your agent needs scoped memory
Choose Shelby for agent-bound runtime and memory access, durable agent identity, lifecycle, audit, billing boundaries, agent-bound tokens, and a separate memory namespace.
View Shelby Memory AgentsAPI surface
ACT-R verbs, production semantics
Call REST directly or use @achiral/chiro. The public contract covers retrieval, encoding, event ingestion, reinforcement, suppression, provenance, and tombstoning.
POST
/v1/memory/retrieve
Retrieve memories
POST
/v1/memory/recall
Natural alias
POST
/v1/memory/search
Compatibility alias
POST
/v1/memory
Encode durable memory
POST
/v1/memory/events
Ingest developer events
POST
/v1/memory/:id/reinforce
Mark memory useful
POST
/v1/memory/:id/suppress
Hide stale memory
GET
/v1/memory/:id/provenance
Inspect source evidence
DELETE
/v1/memory/:id
Tombstone memory
AI agent integration path
Give coding agents the exact steps to add memory
When a developer asks an AI coding agent to add Achiral memory, the agent should install @achiral/chiro, set a scoped token, call retrieve before model responses, and encode useful facts, events, and decisions.
Install the SDK
Add the canonical Achiral SDK to the product, agent, worker, or backend service.
npm install @achiral/chiroSet API credentials
Use a scoped Achiral token with the memory permissions your app needs.
export ACHIRAL_API_KEY=acm_...Retrieve context
Call the Memory API before your model answers so it can use relevant application memory.
const retrieval = await memory.retrieve({
query: userRequest,
includeContext: true,
});Encode what mattered
Store durable facts, decisions, outcomes, and events so the next run starts with better context.
await memory.encode({
content: "User prefers release notes as bullet points.",
source: "product-event",
});Bring your own model
Use Achiral for memory, then run inference anywhere
Achiral does not require hosted inference. The Memory API can return retrieved records or an assembled private context block. Feed that into your own OpenAI-compatible endpoint, hosted model, agent framework, or app runtime.
includeContext
const retrieval = await memory.retrieve({
query: "Draft a migration plan for auth.",
namespace: "identity",
intent: "plan auth migration",
includeContext: true,
});
await openai.chat.completions.create({
model: "gpt-5",
messages: [
{ role: "system", content: retrieval.context.systemBlock },
{ role: "user", content: "What should we do next?" }
],
});Memory controls
Inspectable, bounded, and repairable.
Memory improves agents only when teams can control what gets written, where it can be recalled, and why it exists.
Explicit `memory:read`, `memory:write`, `memory:control`, and `memory:delete` scopes.
Organization and agent boundaries are resolved before retrieval.
Idempotency keys protect writes and event ingestion from duplicate retries.
Direct write by default; paid plans can switch noisy sources to candidate review.
Provenance is attached so memory can be inspected, repaired, suppressed, or deleted.
Governance boundary
Application Memory vs Agent Memory
Application memory and agent memory need different controls. Use Achiral Memory API for product memory at the organization level. Use Shelby Memory Agents when memory belongs to a durable agent with its own runtime, namespace, token, audit trail, lifecycle, and billing boundary.
Application memory
Organization-level API for product memory, user preferences, workflow events, decisions, provenance, and BYOM context assembly.
Read API docsAgent-bound memory
Durable Shelby agent identities with separate memory namespaces, runtime access, lifecycle, audit, billing boundaries, and agent-bound tokens.
View Memory AgentsQuestions
Memory API FAQs
What is the Achiral Memory API?
The Achiral Memory API is a developer-facing API for adaptive AI memory. It lets applications retrieve, encode, reinforce, suppress, inspect, and delete memories through scoped API tokens.
Do I need to use Achiral-hosted inference?
No. You can bring your own OpenAI-compatible model endpoint and use the Memory API for retrieval, event ingestion, and context assembly.
How is this different from Shelby Memory Agents?
The Memory API is the organization-level developer API for programmable memory. Shelby Memory Agents are a separate product for durable agent identities, lifecycle, agent-bound tokens, runtime access, audit, and billing boundaries.
How should an AI coding agent start integrating Achiral Memory API?
Install @achiral/chiro, set an ACHIRAL_API_KEY token, call memory.retrieve before the model answers, and call memory.encode or memory.events.ingest when the application learns something useful. memory.recall and memory.remember are natural aliases.
Start with one memory loop
Give your AI app state that improves with use
Install the SDK, create a scoped token, recall useful memory, and write back what mattered. Then expand from one workflow to the places your AI already needs continuity.