Skip to content

unbody-io/adapt

Repository files navigation

Adapt

Adapt — a memory layer that grows and reshapes over time

npm license GitHub stars

A memory layer that learns. Instead of storing and retrieving, Adapt observes incoming data, builds understanding, and reshapes its own structure over time. It answers questions that databases and RAG pipelines can't — the ones that require paying attention as data flows in.

Documentation · Changelog · Releases · npm · Issues


Install

npm install @unbody-io/adapt

Adapt uses the Vercel AI SDK for LLM access. Install a provider:

npm install @ai-sdk/openai    # or @ai-sdk/anthropic, @ai-sdk/google, etc.

Quick start

import { Brain } from '@unbody-io/adapt'
import { openai } from '@ai-sdk/openai'

const brain = await Brain.create({
  prompt: 'Track my coding patterns and development philosophy.',
  model: openai('gpt-4o'),
})

await brain.inject([
  { type: 'commit', message: 'refactor: extract validation into pure functions' },
  { type: 'review', comment: 'Too heavy — factory functions work fine for our scale.' },
])

const result = await brain.ask('What is my coding philosophy?')
console.log(result.insight)

Features

  • Self-evolving — creates, merges, splits, and removes Neurons based on usage
  • Any LLM — AI SDK by default, BYO runtime via the AdaptLLMPlugin contract
  • Pluggable stores — in-memory or SQLite
  • Modular — use the Brain orchestrator or TextNeuron / ListNeuron standalone
  • PersistentBrain.restore(path) rehydrates from SQLite; same for standalone neurons
  • Runs anywhere — Node, Bun, and Electron (ESM + CJS builds)

Limitations

  • Requires models with structured output and tool calling support
  • Local model support (Ollama, LMStudio) not fully tested yet
  • Not a database — builds understanding, doesn't store raw data
  • Experimental (0.0.x) — expect breaking changes

Contributing

Found a bug or have an idea? Open an issue. PRs welcome.


MIT — Unbody

Packages

 
 
 

Contributors

Languages