How campfirein/cipher works
Project type and purpose
• Cipher is a full-stack AI agent framework providing:
• A CLI (cipher)
• An HTTP/WebSocket API server (mode=api)
• An MCP server (mode=mcp)
• A React/Next.js Web UI (mode=ui)
• All built around a core “brain” library offering memory, embedding, LLM orchestration, tools, event bus, and persistence.
• Purpose: expose AI-powered memory and context capabilities for coding agents, integrate via Model Context Protocol (MCP) or direct API/CLI/UI.
File structure
• Top-level folders:
• src/app – application entry points: api (HTTP+WS), cli, mcp, ui, web
• src/core – core brain modules: embedding, llm, memory, reasoning, tools, systemPrompt, mcp, events, session, storage, vector_storage, knowledge_graph, logger, utils
• examples – sample configurations for various clients
• Config/deployment: Dockerfile, docker-compose.yml, .env.example, GitHub workflows
• Tests scattered under core and api/cli to cover functionality
README for additional insights
• Defines modes (api, mcp, ui) and key features: dual memory layers, MCP integration, tool registry
• Lists built-in tools, catalog of supported LLM providers and vector stores
• Shows UI screenshot and CLI usage
Elements
• Client→API/MCP server→core brain→external service
• Core brain→persistence→core brain→client