How memodb-io/acontext works
Acontext is an open-source skill-memory layer for AI agents: it captures session activity, learns from task outcomes, and exposes editable Markdown skills for later agent use. The README describes the learning and recall stages; the tree also shows SDKs, a Go API, a dashboard, and Claude Code/OpenClaw integrations. Dashboard and hook excerpts establish selected UI-to-action and hook-to-helper calls. Core learning internals and some integrations were not sampled, so those connections are documented or marked unverified rather than inferred as direct calls.
Main entry points: actions.ts Dashboard actions · router.go Acontext API · hook-handler.ts Claude Code hook · core Distillation
Components 23
Capture and learn
- Session messages
- Task outcome
- Distillation
src/server/core - Skill agent
src/server/core - Markdown skills
src/server/core
API and SDKs
- Learning spaces
src/client/acontext-py/src/acontext/resources/learning_spaces.py - Python and TS SDKs
src/client/acontext-py/src/acontext/client.py - Acontext API
src/server/api/go/internal/router/router.go - API persistence
src/server/api/go/internal/infra/db/gorm.go
Project dashboard
- Project dashboard
dashboard/app/project/[id]/project-page-client.tsx - Session management
dashboard/app/project/[id]/session/session-page-client.tsx - Learning-space UI
dashboard/app/project/[id]/learning-spaces/learning-spaces-page-client.tsx - Agent skills UI
dashboard/app/project/[id]/agent-skills/agent-skills-page-client.tsx - Disk and artifacts
dashboard/app/project/[id]/disk/disk-page-client.tsx - Trace logs
dashboard/app/project/[id]/logs/logs-page-client.tsx - Dashboard actions
dashboard/app/project/[id]/actions.ts - Dashboard API client
dashboard/lib/acontext/server.ts
Agent integrations
- Claude Code hook
src/packages/claude-code/src/hook-handler.ts - Acontext bridge
src/packages/claude-code/src/bridge.ts - OpenClaw integration
src/packages/openclaw/index.ts
Product content
- Product and guides
landingpage/src/app/(frontend)/page.tsx
Other components
- Agent
- Developer
Connections 23
- Agent → Session messages: sends messages
README.md - Session messages → Task outcome: informs outcome
README.md - Task outcome → Distillation: triggers learning
README.md - Distillation → Skill agent: provides findings
README.md - Skill agent → Markdown skills: updates skills
README.md - Python and TS SDKs → Learning spaces: offers operations
- Developer → Python and TS SDKs: uses
README.md - Learning spaces → Acontext API: calls API
- Acontext API → API persistence: persists data
- Developer → Project dashboard: manages project
- Project dashboard → Dashboard actions: loads statistics
dashboard/app/project/[id]/project-page-client.tsx - Session management → Dashboard actions: creates sessions
dashboard/app/project/[id]/session/session-page-client.tsx - Learning-space UI → Dashboard actions: loads users
dashboard/app/project/[id]/learning-spaces/learning-spaces-page-client.tsx - Agent skills UI → Dashboard actions: uses project actions
dashboard/app/project/[id]/agent-skills/agent-skills-page-client.tsx - Disk and artifacts → Dashboard actions: uses project actions
dashboard/app/project/[id]/disk/disk-page-client.tsx - Trace logs → Dashboard actions: fetches traces
dashboard/app/project/[id]/logs/logs-page-client.tsx - Dashboard actions → Dashboard API client: requests data
dashboard/app/project/[id]/actions.ts - Dashboard API client → Acontext API: sends API requests
dashboard/lib/acontext/server.ts - Claude Code hook → Acontext bridge: records activity
src/packages/claude-code/src/hook-handler.ts - Claude Code hook → Agent: captures transcript
- OpenClaw integration → Acontext API: integrates with
- Product and guides → Developer: explains product
- Markdown skills → Agent: provides recall tools
README.md