Visible Technical Details

Cipher's technical architecture and implementation — every feature is production-ready, not just a concept.

Agent Tool System

Agent supports Plan and Auto execution modes. Plan mode generates a plan for your approval first. Auto mode automatically chains tool calls, up to 15 iterative rounds: think → act → observe → re-think.

  • 6 built-in tools: read_file / write_file / edit_file / run_command / search_code / list_directory
  • RAG context auto-injection + project tree auto-loading
  • package.json auto-parsing, tech stack recognition

Auto-Heal

After writing code, Agent automatically runs validation commands (tsc / eslint / lint / build). Detects errors and auto-fixes them, up to 3 rounds. Stops automatically when progress stalls to save Tokens.

  • Auto-detects project config: tsconfig / eslint / package.json scripts
  • Stagnation detection: stops when errors stop decreasing

API Usage Tracking

Pub-sub based usage tracking system. Automatically records Prompt Tokens, Completion Tokens, and costs after each AI request. Persisted in localStorage + Electron Store dual storage.

  • 26+ model pricing tables (DeepSeek / GPT-4o / Claude / Gemini, etc.)
  • Character-based Token approximation with CN/EN distinction
  • Cumulative + session dual-dimension stats, auto UI updates

RAG Code Search

TF-IDF similarity-based engine. During indexing, code files are automatically split by function and class boundaries. Search uses camelCase tokenization + CN-EN synonym expansion.

  • 500+ CN-EN synonym pairs: login ↔ auth ↔ 登录 ↔ 认证
  • 30+ file types: ts / tsx / js / py / rs / go and more
  • Auto-rebuild index on file changes + import/require dependency extraction

Skills System

Skills are packaged AI assistant configurations. Each skill has its own Prompt, available tools, and model parameters. 4 built-in skills, supports import/export.

  • Built-in: Cipher Agent / Novel Assistant / PPT Designer / Excel Data
  • Import: .zip / .json / .md, Export: .zip / .json
  • Skill attachments: extra prompts / scripts / config files

Multi-Provider Architecture

7 built-in provider presets, each independently toggleable. Custom providers support custom API URLs, Keys, and model lists. One-click default switch with built-in connection test.

  • Presets: Xiaomi / NVIDIA NIM / DeepSeek / OpenAI / Anthropic / OpenRouter
  • Config: maxTokens / temperature / topP / toolCallRounds

Rules System

Global rules apply across all projects, project rules are specific to the current project. Auto-reads CLAUDE.md, .cursorrules, .windsurfrules from the project directory. Each rule can be independently enabled or disabled.

IPC Communication

Electron main and renderer processes communicate via 13 IPC handlers covering file R/W, terminal execution, config persistence, and security trust confirmation. Sandbox mode isolates processes.

  • Path trust confirmation: user must confirm first folder open
  • Trust list persistence, auto-saves trusted paths

Theme System

4 theme modes (Dark / Dark Blue / Light / System), ~50 semantic CSS variables. Glassmorphism frosted glass via backdrop-filter + semi-transparent backgrounds, 300ms smooth transitions.

Memory System

Working memory tracks file operations (create / modify / delete) within a session, 24-hour TTL auto-expiry. Project notes persist across sessions. Memory auto-formatted and injected into Agent context.

Tech Stack at a Glance

Desktop tech stack — all AI features run locally.

Electron 32
React 18
TypeScript 5
Vite
Monaco Editor
xterm.js
TailwindCSS
Framer Motion
Zustand