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
npm install @unbody-io/adaptAdapt uses the Vercel AI SDK for LLM access. Install a provider:
npm install @ai-sdk/openai # or @ai-sdk/anthropic, @ai-sdk/google, etc.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)- Self-evolving — creates, merges, splits, and removes Neurons based on usage
- Any LLM — AI SDK by default, BYO runtime via the
AdaptLLMPlugincontract - Pluggable stores — in-memory or SQLite
- Modular — use the
Brainorchestrator orTextNeuron/ListNeuronstandalone - Persistent —
Brain.restore(path)rehydrates from SQLite; same for standalone neurons - Runs anywhere — Node, Bun, and Electron (ESM + CJS builds)
- 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
Found a bug or have an idea? Open an issue. PRs welcome.
MIT — Unbody
