Hippocortex Product Overview

What Is Hippocortex?

Hippocortex is a persistent memory system for AI agents. It captures, compiles, and synthesizes knowledge from agent interactions so that AI agents can learn from experience, retain institutional knowledge, and make better decisions over time.

Think of it as the hippocampus for artificial intelligence: the component that turns short-term interactions into durable, retrievable, actionable memory.

The Problem

Modern AI agents are stateless by default. Every conversation starts fresh. Every deployment forgets everything that came before. This creates critical failures in production:

  • Repeated mistakes: An agent that crashed a deployment last week will attempt the exact same steps again tomorrow.
  • Lost institutional knowledge: Successful procedures, client preferences, and domain-specific rules vanish between sessions.
  • No learning curve: Unlike human team members who improve over time, agents perform at the same level on day 1 and day 1,000.
  • Context window waste: Developers resort to cramming static instructions into prompts, wasting token budgets on information that should be dynamic and contextual.
  • Compliance gaps: There is no audit trail of what an agent knew, when it learned it, and why it made a particular decision.

Core Value Proposition

Hippocortex provides three primitives that solve these problems:

  1. Capture - Record agent interactions as structured events (tool calls, messages, outcomes, file edits, test runs)
  2. Learn - Compile raw events into knowledge artifacts using a deterministic, zero-LLM compiler (no hallucinated knowledge, no inference drift)
  3. Synthesize - Retrieve compressed, token-budget-aware context packs tailored to the agent's current query

These three operations transform any stateless agent into one that remembers, learns, and improves.

How It Fits Into an AI Agent Stack

+------------------------------------------------------------------+
|                        Your AI Agent                              |
|  (OpenAI Agents, LangGraph, CrewAI, AutoGen, OpenClaw, custom)   |
+------------------------------------------------------------------+
        |               |                |
        | capture()     | learn()        | synthesize()
        v               v                v
+------------------------------------------------------------------+
|                    Hippocortex SDK                                |
|        TypeScript (@hippocortex/sdk)  |  Python (hippocortex)    |
+------------------------------------------------------------------+
        |                                       ^
        | Events (HTTPS)                        | Context Packs
        v                                       |
+------------------------------------------------------------------+
|                   Hippocortex Cloud API                           |
|                   api.hippocortex.dev/v1                          |
+------------------------------------------------------------------+
        |               |                |
        v               v                v
+------------------------------------------------------------------+
|  Event Queue    Memory Compiler     Retrieval Engine              |
|  (BullMQ)       (Zero-LLM)         (8-Signal Ranking)            |
+------------------------------------------------------------------+
        |               |                |
        v               v                v
+------------------------------------------------------------------+
|  PostgreSQL                    Redis                              |
|  (Events, Memories,           (Queue, Cache,                     |
|   Artifacts, Vault)            Prefetch)                         |
+------------------------------------------------------------------+

Key Capabilities

1. Event Capture

Hippocortex ingests 13 event types from agent interactions:

Event TypeWhat It Records
messageConversation turns (user and assistant)
tool_callTool invocations with parameters
tool_resultTool outputs and outcomes
file_editFile modifications with before/after
test_runTest execution results
command_execShell command execution and output
browser_actionBrowser automation actions
api_resultExternal API call results
decisionAgent reasoning and decision points
errorErrors and exceptions
feedbackHuman feedback signals
observationEnvironmental observations
outcomeTask completion and success/failure

Events are deduplicated via idempotency keys and content hashing, scored for salience on ingestion, and assigned to memory namespaces for multi-tenant isolation.

2. Zero-LLM Memory Compilation

Unlike RAG systems that rely on embedding models for retrieval, Hippocortex compiles events into knowledge artifacts using a deterministic compiler:

  • No LLM calls during compilation: eliminates hallucination risk, inference cost, and latency
  • Pattern extraction: identifies recurring procedures, failure modes, decision patterns, and causal relationships
  • Confidence scoring: every artifact has a traceable confidence score based on evidence strength and extraction method
  • Incremental compilation: processes only new events since the last run

The compiler produces five artifact types:

Artifact TypeWhat It Contains
Task SchemaLearned procedures and step sequences
Failure PlaybookKnown failure modes with recovery steps
Decision PolicyConditional rules extracted from agent decisions
Causal PatternCause-and-effect relationships between events
Strategy TemplateHigh-level approaches for recurring problem types

3. Context Synthesis

When an agent needs memory, Hippocortex synthesizes a context pack: a compressed, token-budget-aware set of relevant memories and artifacts. Key characteristics:

  • 18ms p50 latency for context retrieval
  • Token budget management: stays within the specified token limit, allocating budget across reasoning sections (procedures, failures, decisions, facts, causal, context)
  • 8-signal composite ranking: salience, recency, keyword overlap, entity overlap, graph connectivity, relation strength, contradiction status, and promotion confidence
  • Provenance tracking: every piece of context traces back to source events with full lineage

4. HMX Protocol (Open Standard)

The Hippocortex Memory Exchange (HMX) Protocol is an open specification for portable agent memory. It includes five specs:

  1. Event Schema - Standardized event format across frameworks
  2. Artifact Schema - Knowledge artifact structure and lifecycle
  3. Context Pack - Compressed context delivery format
  4. Memory Fingerprint - Portable compressed memory state
  5. Transfer Protocol - Cross-agent knowledge portability

5. Enterprise Features

For teams and organizations running multiple agents:

  • Multi-tenant architecture with organization, team, and agent scoping
  • Role-based access control with 6 organization roles and 4 team roles
  • Memory namespaces with sensitivity classification (public, internal, confidential, restricted)
  • Policy engine for fine-grained access control (allow/deny rules with priority evaluation)
  • Encrypted vault for secrets (AES-256-GCM envelope encryption)
  • Automatic secret detection to intercept sensitive data before it enters memory
  • Audit logging for all mutations, access events, and vault reveals
  • Memory lineage for provenance tracking and compliance
  • Lifecycle policies for retention, archival, and data management

Use Cases

Support Automation

A customer support agent processes tickets daily. With Hippocortex:

  • Day 1: Agent handles tickets with base instructions
  • Day 30: Agent has compiled playbooks for the 15 most common issue types, knows which solutions work, and can reference specific past resolutions
  • Day 90: Agent recognizes recurring customer issues before they escalate, applies proven resolution strategies, and maintains consistency across support team members
// After resolving a ticket
await hx.capture({
  type: 'outcome',
  sessionId: ticketId,
  payload: {
    issue: 'Payment processing timeout',
    resolution: 'Retried with exponential backoff',
    success: true,
    customerSatisfaction: 5
  }
});

// Before handling a new ticket
const context = await hx.synthesize(
  'customer reports payment timeout during checkout'
);
// context.entries contains relevant failure playbooks and past resolutions

Engineering Agents

A coding agent that deploys services, runs tests, and fixes bugs:

  • Remembers which deployment sequences work for each service
  • Knows which tests are flaky and how to handle them
  • Builds failure playbooks from past incidents
  • Shares deployment knowledge across team agents

Sales Intelligence

An agent that processes sales calls and manages pipeline:

  • Learns customer preferences and communication patterns
  • Tracks which approaches close deals vs. which stall them
  • Builds decision policies for pricing and negotiation
  • Maintains client context across team members

Compliance and Audit

For regulated industries:

  • Full audit trail of every piece of knowledge an agent used
  • Memory lineage showing how conclusions were derived
  • Vault-encrypted storage for sensitive data
  • Lifecycle policies for data retention and deletion

Comparison to Alternatives

FeatureHippocortexRAG (Vector DB)Custom Solution
Memory compilationDeterministicEmbedding-basedManual
Hallucination riskZero (no LLM)PossibleVaries
Knowledge artifacts5 structured typesRaw chunksCustom schema
Token budget managementBuilt-inManualManual
Multi-agent knowledgeNativePer-collectionCustom
Enterprise RBAC28 permissionsDIYDIY
Secret detectionAutomaticNoneDIY
Audit trailCompleteNoneDIY
Provenance trackingFull lineage graphNoneDIY
Self-tuningAdaptive compilerNoneDIY
Setup time1 line (auto/wrap)DaysWeeks
PricingPer-eventPer-queryInfrastructure

Architecture Overview (High Level)

Hippocortex is built as a monorepo with 25 TypeScript packages, deployed as a cloud service with self-hosted options:

Client Layer

  • TypeScript SDK (@hippocortex/sdk)
  • Python SDK (hippocortex)
  • Framework adapters (OpenAI Agents, LangGraph, CrewAI, AutoGen, OpenClaw)

API Layer

  • Hono-based REST API at api.hippocortex.dev/v1
  • Clerk-based JWT authentication and API key authentication
  • Rate limiting by plan tier

Processing Layer

  • BullMQ job queues for async event processing
  • Zero-LLM Memory Compiler for artifact extraction
  • 8-signal composite ranking engine for retrieval
  • Adaptive compiler for self-tuning parameters
  • Predictive context engine for pre-warming

Storage Layer

  • PostgreSQL for events, memories, artifacts, vault, audit logs
  • Redis for job queues, caching, and prefetch packs

Security Layer

  • AES-256-GCM envelope encryption for vault secrets
  • Automatic secret detection and interception
  • RBAC with organization and team scoping
  • Policy engine for namespace-level access control
  • Full audit logging

Getting Started

Installation

TypeScript

npm install @hippocortex/sdk

Python

pip install hippocortex

Quick Start: Auto-Instrumentation (1 Line)

The fastest way to add memory. One import, zero config.

// TypeScript
import '@hippocortex/sdk/auto'
// Every OpenAI/Anthropic call now has persistent memory.
# Python
import hippocortex.auto
# Every OpenAI/Anthropic call now has persistent memory.

Quick Start: wrap() (Recommended)

Explicit, typed, per-client control.

import { wrap } from '@hippocortex/sdk'
import OpenAI from 'openai'

const openai = wrap(new OpenAI())
// Use exactly as before. Memory is transparent.
from hippocortex import wrap
from openai import OpenAI

client = wrap(OpenAI())
# Use exactly as before. Memory is transparent.

Quick Start: Manual Client (Advanced)

Full control over capture, learn, and synthesize.

import { Hippocortex } from '@hippocortex/sdk';

const hx = new Hippocortex({
  apiKey: 'hx_live_your_key_here'
});

// 1. Capture agent events
await hx.capture({
  type: 'tool_call',
  sessionId: 'session-123',
  payload: {
    tool: 'deploy',
    args: { service: 'api', environment: 'staging' }
  }
});

// 2. Learn from experience
const learning = await hx.learn();
console.log(`Created ${learning.artifacts.created} new artifacts`);

// 3. Synthesize context for current task
const context = await hx.synthesize('deploy api service to production');
// Use context.entries in your LLM prompt

Zero-Config

All integration methods support automatic configuration resolution:

  1. Explicit arguments passed to wrap() or new Hippocortex()
  2. Environment variables: HIPPOCORTEX_API_KEY, HIPPOCORTEX_BASE_URL
  3. Config file: .hippocortex.json (searched from cwd upward)

Plans and Pricing

PlanEvents/MonthRate LimitFeatures
Free50,00060/minCore features, 5 agents
Pro2,000,0001,200/minFull SDK, unlimited agents, vault
Pro500,0003,000/minEnterprise features, 50 agents
EnterpriseUnlimitedUnlimitedSLA, SSO, custom deployment

Links


Hippocortex: Memory infrastructure for AI agents that learn.