Skip to content

willmclellarn/organic-memory

Repository files navigation

Organic Memory

An open protocol for personal AI memory - a living, evolving understanding of you that any AI service can query securely.

What is this?

Organic Memory creates a persistent memory layer that learns about you through conversations. Instead of every AI interaction starting from scratch, your preferences, patterns, and personality are captured and made available to any service you authorize.

Memory Model

Organic Memory now tracks two complementary axes:

  • Behavioral facets - worldview, business perspective, goals, affiliations, styles, tendencies, passions, pet peeves
  • Memory dimensions - BUILD, EAT, MOVE, PLAY, THINK, CONNECT

The behavioral facets capture durable identity and taste. The dimensions capture where those signals show up in day-to-day life.

Memory Dimensions

Your memory is also organized into six dimensions:

  • BUILD - How you create (coding patterns, tool preferences, project approaches)
  • EAT - Food and nutrition preferences
  • MOVE - Exercise and fitness patterns
  • PLAY - Leisure and entertainment choices
  • THINK - Problem-solving approaches and mental models
  • CONNECT - Communication style and relationship patterns

Each insight exists at three depth levels: surface (observations), pattern (recurring behaviors), and core (fundamental beliefs).

Features

  • Active Learning - Extracts insights from conversations automatically
  • Crypto Identity - Ed25519 keypairs for secure, verified queries
  • Query API - External services can ask questions about you
  • Access Control - Grant/revoke access per service, per dimension
  • Memory Evolution - Insights age and decay without reinforcement
  • Import Sources - Bootstrap from GitHub, URLs, and other sources
  • Interview Engine - Structured AI interviews that progressively build a behavioral profile
  • Behavioral Profile API - Query worldview, goals, style, and content preferences for downstream agents
  • Terminal UI - Retro terminal aesthetic with color-coded output

Tech Stack

  • Next.js 15 (App Router)
  • TypeScript
  • PostgreSQL + Drizzle ORM
  • Vercel AI SDK + Anthropic
  • Tailwind CSS

Getting Started

# Install dependencies
pnpm install

# Set up environment
cp .env.example .env
# Add your ANTHROPIC_API_KEY and database URL

# Push database schema
pnpm db:push

# Run development server
pnpm dev

Terminal Commands

memory              # Show overview of all dimensions
memory <dimension>  # Show insights for BUILD, EAT, MOVE, etc.
memory export       # Create encrypted JSON backup
memory grant        # Manage access permissions

API Surfaces

  • POST /api/interview starts a behavior-first interview session
  • PATCH /api/interview answers the current question and advances the session
  • GET /api/interview?sessionId=... fetches session state and the next prompt
  • GET /api/profile returns a behavioral profile summary
  • GET /api/profile?view=content returns a content-oriented slice of worldview, goals, style, passions, and pet peeves
  • POST /api/memory/query supports signed natural-language queries with optional dimensions, facets, and contexts filters

SDK

A TypeScript SDK is included for integrating with Organic Memory:

import { OrganicMemoryClient } from './sdk'

const client = new OrganicMemoryClient({
  endpoint: 'http://localhost:3000',
  privateKey: yourPrivateKey
})

const insights = await client.query('how does this user prefer to structure code?')

Protocol

The Organic Memory Protocol (OMPv1) defines:

  • Authentication flow with signed requests
  • Query/response message formats
  • Access control and permission grants
  • Error codes and handling

See /docs for the full protocol specification.

License

MIT

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages