Skip to content

Latest commit

 

History

1,297 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ZenAI

The AI OS that remembers. Self-hosted. Open source.

60 AI tools. 12,000+ tests. 440K+ LOC. 7-layer neuroscience-inspired memory. Built on ZenBrain.

Built on ZenBrain License TypeScript


📌 This repository is a snapshot, not the living tree

The application code here was synced from the development tree on 8 May 2026; only documentation and CLI packaging changed after that, up to 25 May 2026. It is a faithful copy of what ZenAI was on that date — readable, citable and runnable — but it is not the current state of development, and it does not receive fixes.

The CI pipeline is set to manual dispatch for the same reason: it tests files that the development tree has since removed, so an automatic run reported a failure that nobody here could act on. That says nothing about the snapshot itself.

What is current: the memory library ZenBrain is actively developed and released to npm, and the research record behind both is kept up to date at zensation.ai/en/publikationen. The one part of this repository that is still published is the terminal agent in cli/, released as @zensation/cli.

Questions about the state of ZenAI: open-source@zensation.ai


What is ZenAI?

ZenAI is a self-hosted AI platform with neuroscience-inspired memory. Unlike ChatGPT or Claude, ZenAI remembers your conversations, learns from your preferences, and improves over time — using the same mechanisms your brain uses.

Key Features

  • 60 AI Tools across 14 categories (memory, web search, code execution, GitHub, maps, email, documents, and more)
  • 7-Layer Memory (Working, Short-Term, Episodic, Semantic, Procedural, Core, Cross-Context) powered by ZenBrain
  • FSRS Spaced Repetition — your AI never forgets what matters
  • 4 Context Isolation — separate memory for personal, work, learning, and creative
  • Multi-Agent System — researcher, writer, reviewer, coder agents with debate protocol
  • RAG Pipeline — HyDE + Cross-Encoder reranking + GraphRAG hybrid retrieval
  • Real-Time Voice — WebSocket STT/TTS pipeline with turn-taking
  • Extended Thinking — visible AI reasoning with budget management
  • Sleep-Time Compute — background memory consolidation and contradiction detection
  • MCP Ecosystem — connect external tools via Model Context Protocol

Architecture

Frontend: React + TypeScript (Vite)
Backend:  Express.js + TypeScript
AI:       Claude API (primary), Mistral (fallback), Ollama (local)
Database: PostgreSQL + pgvector (4 isolated schemas)
Memory:   ZenBrain 7-layer architecture
Cache:    Redis (optional)

Quick Start

Prerequisites

  • Node.js 20 (this snapshot declares "node": "20.x")
  • PostgreSQL 15+ with pgvector extension
  • Anthropic API key

Setup

# Clone
git clone https://github.com/zensation-ai/zenai.git
cd zenai

# Backend
cd backend
cp .env.example .env
# Edit .env with your DATABASE_URL and ANTHROPIC_API_KEY
npm install
npm run build
npm run dev

# Frontend (new terminal)
cd frontend
npm install
npm run dev

Open http://localhost:5173 in your browser.

Docker Compose

Two compose files ship with this snapshot.

# Self-hosting: Postgres (pgvector) + Redis + backend on :3000
cp .env.docker .env
docker compose up -d
# Infrastructure only — Postgres + Redis, run backend and frontend locally
docker compose -f docker-compose.dev.yml up -d

The frontend is not part of the compose stack; run it as shown under Setup.

API

ZenAI exposes 250+ API endpoints. Key areas:

Area Endpoints Description
Chat /api/chat/* Streaming chat with tool use, vision, artifacts
Memory /api/:context/memory/* FSRS review, procedures, hybrid search
Ideas /api/:context/ideas/* CRUD with semantic search, topics, drafts
Tasks /api/:context/tasks/* Kanban, Gantt, dependencies, projects
Email /api/:context/emails/* Send/receive with AI categorization
Agents /api/agents/* Multi-agent execution, templates, streaming
Knowledge Graph /api/:context/graphrag/* Entity extraction, hybrid retrieval
Voice /api/:context/voice/* Real-time STT/TTS pipeline

Full API documentation: /api-docs (Swagger UI when running)

Testing

# Backend (~11,500+ tests)
cd backend && npm test

# Frontend (~1,400+ tests)
cd frontend && npx vitest run

# CLI (108 tests)
cd cli && npm test

Memory System

ZenAI's memory is powered by ZenBrain — the neuroscience-inspired memory system:

Layer Inspired By Function
Working Memory Baddeley (1974) Active task focus (7±2 items)
Short-Term Session context Current conversation
Episodic Tulving (1972) Concrete experiences
Semantic FSRS + Ebbinghaus Facts with spaced repetition
Procedural Cognitive psychology "How to do X" skills
Core Letta/MemGPT Pinned, user-editable facts
Cross-Context ZenBrain architecture Shared knowledge across domains

Paper & Citation

The memory architecture underneath ZenAI is documented and peer-reviewable:

@article{bering2026zenbrain,
  title         = {ZenBrain: A Neuroscience-Inspired 7-Layer Memory Architecture for Autonomous AI Systems},
  author        = {Bering, Alexander},
  year          = {2026},
  eprint        = {2604.23878},
  archivePrefix = {arXiv},
  primaryClass  = {cs.AI},
  url           = {https://arxiv.org/abs/2604.23878}
}

To cite this snapshot itself rather than the architecture, see CITATION.cff.

Contributing

See CONTRIBUTING.md for guidelines.

License

Apache 2.0


Built by ZenSation in Kiel, Germany.

About

Frozen public snapshot (8 May 2026) of ZenAI — the self-hosted AI OS that remembers. 60 AI tools, 12,000+ tests, 440K+ LOC, 7-layer neuroscience-inspired memory. Not the living tree; active development continues in ZenBrain.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages