Your AI forgets.
Cog remembers.

Persistent memory for AI agents.

The problem

Every session starts from zero.

Your AI assistant is brilliant in the moment. But tomorrow it won't remember why you chose Postgres, that the auth system is mid-refactor, or the edge case that took three hours to debug.

Thousands of decisions, patterns, and hard-won lessons. Gone when the session ends. You explain the same context again. And again.

Context windows are temporary. Knowledge doesn't have to be.

In practice

What a session looks like.

A developer asks their AI to fix a bug. With Cog, the agent recalls prior context before touching code, records what it learns, and consolidates knowledge before signing off. Hover the highlights to see what Cog is doing.

claude - acme-app
> Fix the login bug where sessions expire too early
1. Recall
⚙️ Querying Cog…
cog_recall("session expiration token timeout refresh lifecycle")
Found: Token Refresh Race Condition: known issue with concurrent refresh
2. Work + Record
Investigating auth code… encounters unfamiliar TokenBucket module
⚙️ Mid-work recall: what is TokenBucket?
cog_recall("TokenBucket rate limiting algorithm")
No results. Exploring the code instead
Reads the module, understands it. Records what it learned:
🧠 Recording to Cog…
cog_learn({ term: "TokenBucket Rate Limiter", definition: "Custom rate limiter using token bucket algorithm. Used by auth refresh endpoint." })
Finds the root cause: clock skew between servers.
🧠 Recording root cause…
cog_learn({ term: "Session Expiry Clock Skew", definition: "Auth server clock runs 2-3s ahead of app server.", associations: [{ target: "Token Refresh Race Condition", predicate: "derived_from" }] })
Writes test, implements fix using server-issued timestamps. Tests pass.
3. Reinforce
🧠 Recording the general lesson…
cog_learn({ term: "Server Timestamp Authority", definition: "Never calculate token expiry locally. Always use server-issued timestamps.", associations: [{ target: "Session Expiry Clock Skew", predicate: "generalizes" }] })
4. Consolidate
⚙️ Reviewing short-term memories…
cog_list_short_term() 3 pending
cog_reinforce("TokenBucket Rate Limiter")
cog_reinforce("Session Expiry Clock Skew")
cog_reinforce("Server Timestamp Authority")
⚙️ Cog helped by: Surfaced known race condition, guided investigation to auth timing
🧠 Recorded: 3 new concepts, 2 associations, 1 generalization
Three days later, a different developer…
claude - acme-app teammate's session
> Add refresh token rotation to the auth system
1. Recall
⚙️ Querying Cog…
cog_recall("auth token refresh rotation session management")
Found 4 related concepts:
Server Timestamp Authority : Never calculate token expiry locally
Session Expiry Clock Skew : Auth server clock runs 2-3s ahead
Token Refresh Race Condition : Known concurrent refresh issue
TokenBucket Rate Limiter : Prevents burst retries on refresh
2. Work + Record
The agent already knows about the clock skew gotcha and the rate limiter. It builds the rotation logic using server-issued timestamps from the start. No time wasted re-discovering the same issues.
🧠 Recording new knowledge…
cog_learn({ term: "Refresh Token Rotation", definition: "Each refresh issues a new token and invalidates the old one. Detects token reuse as a breach signal.", associations: [{ target: "Server Timestamp Authority", predicate: "requires" }] })
⚙️ Cog helped by: Surfaced 4 concepts from a teammate's session. Avoided re-discovering clock skew and rate limiter gotchas
🧠 Recorded: 1 new concept linked to existing team knowledge
Core tools

Learn. Recall. Connect.

Three primitives that give your AI a persistent knowledge graph. Concepts link together, connections strengthen with use, and stale knowledge fades naturally.

cog_learn write

Store knowledge

Capture decisions, context, and insights as your AI works. New memories start short-term and consolidate to long-term when validated.

cog_learn({
  term: "Database Choice",
  definition: "PostgreSQL for JSONB
    support and vector extensions"
})
cog_recall read

Search by meaning

Spreading activation finds not just matches but constellations of related knowledge, the way biological memory works.

cog_recall({
  query: "data storage approach"
})
// → Database Choice, Schema Design,
//   Migration Strategy...
cog_associate write

Connect ideas

Build a knowledge graph with typed relationships. Connections strengthen through use and weaken from neglect.

cog_associate({
  source: "Auth System",
  target: "JWT Tokens",
  predicate: "requires"
})
How it works

Memory that behaves like memory.

Cog models biological memory dynamics. Knowledge starts fragile, consolidates through validation, strengthens through use, and fades when neglected.

01

Short-term capture

New knowledge enters as short-term memory. It decays in 24 hours unless reinforced. That's a natural filter for noise.

02

Consolidation

Your agent reviews short-term memories and reinforces what's valuable. Validated knowledge becomes permanent. Mistakes get flushed.

03

Strengthening

Frequently recalled knowledge gets easier to find. Connections used together strengthen through Hebbian learning: fire together, wire together.

04

Decay & pruning

Unused connections weaken over time. Stale relationships degrade through warning, critical, and deprecated stages. The graph stays clean without manual maintenance.

22 tools

A complete memory system.

Beyond the core three, Cog gives your agent a full toolkit for managing, auditing, and maintaining a knowledge graph.

Core

  • cog_learn Store concept
  • cog_recall Search memory
  • cog_get Get by ID
  • cog_update Update concept

Associations

  • cog_associate Link concepts
  • cog_trace Find path
  • cog_unlink Remove link
  • cog_connections List links

Memory lifecycle

  • cog_reinforce Make permanent
  • cog_flush Discard memory
  • cog_list_short_term Pending review
  • cog_verify Confirm link
  • cog_stale Find decay

Graph health

  • cog_stats Brain metrics
  • cog_orphans Unlinked nodes
  • cog_connectivity Cluster analysis
  • cog_list_terms All concepts

Bulk operations

  • cog_bulk_learn Batch store
  • cog_bulk_associate Batch link
  • cog_bulk_recall Batch search

Cross-brain

  • cog_meld Bridge brains
Integration

One line of config.

Cog speaks MCP. Add it to any MCP-compatible coding assistant. No plugins, no SDKs, no workflow changes.

Claude Code Cursor VS Code Windsurf Zed Codex CLI Gemini CLI OpenCode Antigravity
.mcp.json
{
  "mcpServers": {
    "cog": {
      "type": "http",
      "url": "https://trycog.ai/<username>/<brain>/mcp",
      "headers": {
        "Authorization": "Bearer sk-..."
      }
    }
  }
}
Teams

Shared knowledge across agents.

When one developer's agent discovers a gotcha on Monday, every agent on the team can recall it on Tuesday.

Shared brains capture institutional knowledge: architecture decisions, deployment procedures, API quirks. It never lives in just one person's head.

Melds let brains reference each other without merging. Your personal brain can draw from the team brain during recall, automatically.

Get started

Stop repeating yourself.

Give your AI the context it needs.