Skip to main content

Build

Agentmemory Architecture

AgentMemory

How agentmemory is built, the iii engine primitives it runs on, its storage model, ports, and the viewer. Use when reasoning about how memory is stored or retrieved end to end, when extending the system, or when answering how agentmemory works under the hood.

  • New
  • v1.0.3
  • Reviewed Aug 18
  • No reviews yet

Capabilities

  • iii primitives

    Everything is a function, a trigger, or worker state on the iii engine

  • Retrieval model

    Recall combines BM25 keyword search with configured vector similarity…

  • Data boundary

    Captured prompts, tool inputs and outputs, and memories stay in the…

  • Storage and lifecycle

    Memories carry content, concepts, files, importance, and timestamps…

Getting started

Full instructions

Install the skill, then ask your AI tool for the task in plain words. The full SKILL.md below shows what it covers.

Instructions: SKILL.mdv1.0.3

agentmemory is a memory server for coding agents. It runs locally, captures observations, indexes them for hybrid retrieval, and serves them back over REST and MCP. Worker Compose runs the pinned iii engine with AgentMemory and the registry state and http workers. The state worker uses a file-backed KV store by default, with Redis available by configuration; it is not SQLite.

iii primitives

Everything is a function, a trigger, or worker state on the iii engine. There is no separate plugin system; the worker registers functions (mem::*) and HTTP triggers (api::*) and the engine routes calls. agentmemory does not bypass iii; new capability is a new function plus a trigger.

Retrieval model

Recall combines BM25 keyword search with configured vector similarity and graph expansion. A clean installation has no embedding provider and uses BM25 without an API key. Set EMBEDDING_PROVIDER=local to enable on-device embeddings, which download a model once. A remote embedding provider runs only when EMBEDDING_PROVIDER names it. LLM summaries, consolidation and reflection run only when AGENTMEMORY_LLM_PROVIDER selects a provider or AGENTMEMORY_ALLOW_AGENT_SDK=true turns on the Claude Agent SDK fallback; a key in the environment alone does not turn them on. Per-observation LLM compression also needs AGENTMEMORY_AUTO_COMPRESS=true.

Data boundary

Captured prompts, tool inputs and outputs, and memories stay in the local store. They leave the machine only through options the user turns on: a selected LLM provider, the Agent SDK fallback (AGENTMEMORY_ALLOW_AGENT_SDK=true), a remote embedding provider, a Redis state backend, or mesh sync to peer servers the user registers.

Storage and lifecycle

Memories carry content, concepts, files, importance, and timestamps, grouped into sessions and optionally linked to commits. A lifecycle of capture, compress, consolidate, and forget keeps the store useful over time rather than letting it grow unbounded.

Ports

REST defaults to port 3111, the viewer to 3113, and the internal engine WebSocket to 49134. Use --port <N> or --instance <N> to select another local runtime.

Viewer

A real-time web viewer at http://localhost:3113 shows memory building as sessions run, with authenticated SSE updates over the REST port. Useful for demos and for confirming capture is working.

See also

  • agentmemory-mcp-tools and agentmemory-rest-api for the surfaces.
  • agentmemory-hooks for automatic capture.
  • agentmemory-config for ports and feature flags.

Explore more skills

Browse all
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

More from AgentMemory

View source →

Frequently asked questions about agentmemory-architecture

What does the agentmemory-architecture skill do?

How agentmemory is built, the iii engine primitives it runs on, its storage model, ports, and the viewer. Use when reasoning about how memory is stored or retrieved end to end, when extending the system, or when answering how agentmemory works under the hood. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the agentmemory-architecture skill?

Run `npx @skills-hub-ai/cli install agentmemory-architecture` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/agentmemory-architecture/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does agentmemory-architecture work with?

agentmemory-architecture runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the agentmemory-architecture skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use agentmemory-architecture after installing it?

In Claude Code, type `/agentmemory-architecture` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the agentmemory-architecture skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.

Badge for your README

Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.

Install on Skills Hub badge preview
Markdown
[![Install on Skills Hub](https://skills-hub.ai/api/badges/skill/agentmemory-architecture)](https://skills-hub.ai/skills/agentmemory-architecture)
HTML
<a href="https://skills-hub.ai/skills/agentmemory-architecture"><img src="https://skills-hub.ai/api/badges/skill/agentmemory-architecture" alt="Install on Skills Hub"></a>

More options in the badge docs.