The open-source managed agents platform. Turn coding agents into real teammates — assign tasks, track progress, compound skills. https://multica.ai
Find a file
Jiang Bohan 9fe6b920c4 fix(agent): always provide getApiKey callback and emit error events
PiAgentCore was created with an empty object when no API key was
initially configured. This broke dynamic provider switching because
setProvider() updated currentApiKey but PiAgentCore had no getApiKey
callback to read it. Always provide the callback so it dynamically
reads the current key.

Also adds AgentErrorEvent to MulticaEvent and emits it from
AsyncAgent.write() catch handlers so errors flow through the
subscriber mechanism to IPC listeners.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 22:23:44 +08:00
.github/workflows chore(ci): add GitHub Actions workflow (#28) 2026-01-30 13:51:05 +08:00
apps fix(desktop): remove heartbeat section from home page 2026-02-06 17:36:46 +08:00
docs docs: add design documents for cron job and auto-memory-refresh 2026-02-06 14:47:31 +08:00
packages feat(ui): spin MulticaIcon on hover 2026-02-05 20:22:29 +08:00
scripts chore(cli): update package.json and build script for unified CLI 2026-02-01 23:09:54 +08:00
skills refactor(profile-setup): simplify setup to focus on agent identity and user info 2026-02-01 23:59:59 +08:00
src fix(agent): always provide getApiKey callback and emit error events 2026-02-06 22:23:44 +08:00
.dockerignore Add Docker support for Gateway and SDK documentation 2026-01-28 17:56:22 +08:00
.gitignore feat(cli): add binary build support for interactive CLI 2026-01-30 15:22:53 +08:00
AGENTS.md docs: add AGENTS.md for OpenAI Codex compatibility 2026-02-01 18:55:26 +08:00
CLAUDE.md refactor(cli): make desktop app the default dev target 2026-02-05 03:14:44 +08:00
package.json chore(deps): add croner for cron expression parsing 2026-02-06 14:47:31 +08:00
pnpm-lock.yaml chore(deps): add croner for cron expression parsing 2026-02-06 14:47:31 +08:00
pnpm-workspace.yaml feat(store): add shared Zustand store package with counter example 2026-01-30 11:34:09 +08:00
README.md docs: simplify README and add development section 2026-02-05 15:21:15 +08:00
tsconfig.json Implement WebSocket Gateway with NestJS and client SDK 2026-01-28 16:46:51 +08:00
turbo.json chore(turbo): add src as global dependency for cache invalidation 2026-02-05 16:16:33 +08:00
vitest.config.ts chore: set up Vitest testing framework 2026-01-30 13:54:34 +08:00

Super Multica

A multi-component architecture for distributed agent systems.

Project Structure

src/
├── agent/              # Core agent module
│   ├── context-window/ # Token-aware context management
│   ├── profile/        # Agent profile management
│   ├── session/        # Session persistence with compaction
│   ├── skills/         # Modular skill system
│   └── tools/          # Agent tools
│       └── web/        # Web fetch and search tools
├── gateway/            # WebSocket gateway for remote access
├── hub/                # Agent coordination hub
└── shared/             # Shared types

apps/
├── desktop/            # Electron desktop app (recommended)
└── web/                # Next.js web application

packages/
├── sdk/                # Gateway client SDK
├── store/              # Zustand state management
└── ui/                 # Shared UI components

skills/                 # Bundled skills (commit, code-review)

Getting Started

pnpm install

Development

# Desktop app (recommended for local development)
pnpm dev

# Gateway + Web app (for remote/mobile clients)
pnpm dev:gateway     # Start Gateway on :3000
pnpm dev:web         # Start Web app on :3001
pnpm dev:all         # Start both Gateway and Web app

The Desktop app runs a standalone Hub with embedded Agent Engine - no Gateway required for local use.

Credentials

multica credentials init

Creates:

  • ~/.super-multica/credentials.json5 — LLM providers + tools
  • ~/.super-multica/skills.env.json5 — skill/plugin API keys

Example credentials.json5:

{
  version: 1,
  llm: {
    provider: "openai",
    providers: {
      openai: { apiKey: "sk-xxx", model: "gpt-4o" }
    }
  },
  tools: {
    brave: { apiKey: "brv-..." }
  }
}

LLM Providers

OAuth Providers (external CLI login):

  • claude-code — requires claude login
  • openai-codex — requires codex login

API Key Providers (configure in credentials.json5):

  • anthropic, openai, kimi-coding, google, groq, mistral, xai, openrouter

Check status: /provider in interactive mode

CLI

multica                              # Interactive mode
multica run "prompt"                 # Single prompt
multica chat --profile my-agent      # Use profile
multica --session abc123             # Continue session
multica session list                 # List sessions
multica profile list                 # List profiles
multica skills list                  # List skills
multica help                         # Show help

Short alias: mu

Sessions

Sessions persist to ~/.super-multica/sessions/<id>/ with JSONL message history and JSON metadata. Context windows are automatically managed with token-aware compaction.

Profiles

Profiles define agent identity, personality, and memory in ~/.super-multica/agent-profiles/<id>/.

multica profile new my-agent    # Create profile
multica profile list            # List all
multica profile edit my-agent   # Open in file manager

Profile files: soul.md, user.md, workspace.md, memory.md, memory/*.md

Skills

Skills extend agent functionality via SKILL.md files. See Skills Documentation.

multica skills list              # List skills
multica skills add owner/repo    # Install from GitHub
multica skills status            # Check status

Built-in: commit, code-review, skill-creator

Tools

Available tools: read, write, edit, glob, exec, process, web_fetch, web_search, memory_search, sessions_spawn

See Tools Documentation for details.

Architecture

Desktop App (standalone, recommended)
  └─ Hub (embedded)
     └─ Agent Engine

Web/Mobile Clients
  → Gateway (WebSocket, :3000)
    → Hub
      → Agent Engine
  • Desktop App: Electron app with embedded Hub, no Gateway needed
  • Gateway: WebSocket server for remote clients
  • Hub: Agent lifecycle and event distribution

Scripts

pnpm dev              # Desktop app (recommended)
pnpm dev:gateway      # Gateway only
pnpm dev:web          # Web app only
pnpm dev:all          # Gateway + Web

pnpm build            # Production build
pnpm typecheck        # Type check
pnpm test             # Run tests