code<spar>

Introduction

CodeSpar is an open source, multi-agent platform that deploys autonomous AI coding agents to WhatsApp, Slack, Telegram, Discord, and CLI.

Introduction

Autonomous agents for every project. Deployed where your team works.

CodeSpar is an open source, multi-agent platform that deploys autonomous AI coding agents directly into the messaging channels your team already uses — WhatsApp, Slack, Telegram, Discord, and CLI. Each project gets its own persistent agent that monitors builds, investigates failures, proposes fixes, and orchestrates deploys, all via @mention commands.

Key Features

  • Eight specialized agent types — purpose-built agents for project management, task execution, code review, deployment, incident response, cross-project coordination, sprint planning, and codebase analysis
  • Five messaging channels — WhatsApp, Slack, Telegram, Discord, and CLI, all with the same @mention interface
  • Graduated autonomy (L0–L5) — fine-grained control over how much independence your agents have, from passive (L0) to fully autonomous (L5)
  • Security-first architecture — 10 defense layers including sandboxed Docker execution, secrets isolation, audit logging, and human approval gates for sensitive operations
  • Open source (MIT License) — full transparency, community contributions, self-host anywhere

How It Works

1. You talk to your agent in any channel

Just @mention your agent in Slack, WhatsApp, Discord, or Telegram — same syntax everywhere:

@codespar instruct add a health check endpoint at /api/health

2. The Dev Agent reads your code and creates a PR

The agent reads your actual codebase via the GitHub API, sends the relevant files to Claude, and creates a pull request with the changes:

[agent-default] Task completed: task-1773970
  Instruction: add a health check endpoint at /api/health
  Duration: 12.3s

  Changes applied to 1 file(s):
    - app/api/health/route.ts

  PR #1 created: https://github.com/your-org/your-repo/pull/1

3. The Review Agent analyzes the PR

Automatically (or on demand), the Review Agent fetches the PR diff, classifies risk, and posts a detailed code review:

@codespar review PR #1

4. Your team approves from any channel

A developer approves from WhatsApp what was requested in Slack. Cross-channel, token-based approval with quorum:

@codespar approve dp-abc123

5. Everything is audited

Every action — from commands to approvals to deployments — is logged in an immutable, hash-chained audit trail.


Architecture

Under the hood, CodeSpar follows a persistent + ephemeral agent architecture:

┌─────────────────────────────────────────────────┐
│                  Coordinator                     │
│           (cross-project orchestration)          │
└──────────────────────┬──────────────────────────┘

        ┌──────────────┼──────────────┐
        ▼              ▼              ▼
┌──────────────┐┌──────────────┐┌──────────────┐
│Project Agent ││Project Agent ││Project Agent │
│  (repo-a)    ││  (repo-b)    ││  (repo-c)    │
└──────┬───────┘└──────┬───────┘└──────────────┘
       │               │
       ▼               ▼
  ┌─────────┐    ┌─────────┐
  │Dev/Task │    │ Review  │
  │  Agent  │    │  Agent  │
  └─────────┘    └─────────┘
  (ephemeral)    (ephemeral)
  • Project Agent (persistent) — your team's always-on interface. Monitors CI/CD, handles @mention commands, spawns ephemeral agents.
  • Dev Agent (ephemeral) — reads your codebase via GitHub API, sends context to Claude, creates branches and PRs with real code changes. Learn more
  • Review Agent (ephemeral) — fetches PR diffs, classifies risk (low/medium/high), auto-approves low-risk at L3+. Learn more
  • Deploy Agent (ephemeral) — approval workflows with quorum, cross-channel voting, staging and production. Learn more
  • Incident Agent (ephemeral) — investigates build failures, correlates with recent changes, proposes fixes. Learn more
  • Coordinator (persistent) — cross-project orchestration, cascading deploys, status aggregation. Learn more

The agent also understands natural language in any language. Ask in Portuguese, Spanish, or English — it uses Claude Haiku for intent classification and Claude Sonnet for open-ended questions. Learn more

Autonomy Levels

CodeSpar uses a graduated autonomy model so you control exactly how much independence your agents have:

LevelNameBehavior
L0PassiveOnly responds when directly addressed
L1NotifyMonitors and alerts, never auto-executes (default)
L2SuggestProposes actions proactively, requires human approval
L3Auto-LowAuto-executes low-risk actions (formatting, linting), notifies after
L4Auto-MedAuto-executes medium-risk actions (bug fixes, PR reviews)
L5Full AutoFully autonomous within policy bounds

Safety guardrail: Regardless of autonomy level, agents never auto-execute production deployments, data migrations, security-sensitive changes, or infrastructure modifications. These always require explicit human approval.

Tech Stack

CodeSpar is built with:

  • TypeScript — end to end, strict mode
  • Fastify — high-performance HTTP server
  • Turborepo — monorepo with 13 packages
  • Docker — sandboxed agent execution
  • MIT License — use it, fork it, contribute to it

Next Steps

Ready to get started? Head to the Quickstart guide to have CodeSpar running in under 5 minutes, or read the full Installation guide for production deployment options.

On this page