Product

The multi-agent platform for engineering teams

CodeSpar deploys persistent AI coding agents to your messaging channels. Each project gets its own agent that monitors builds, investigates failures, proposes fixes, and orchestrates deploys — all from a simple @mention.

Architecture

Six agent types. One orchestration layer.

Every project gets a persistent Project Agent. When work needs doing, it spawns specialized ephemeral agents that execute in isolation and self-terminate on completion.

Project Agent
Persistent

Always-on persistent agent assigned to each project. Monitors repository activity, CI/CD pipelines, and messaging channels. Maintains full codebase context through incremental indexing. Spawns ephemeral agents when work needs doing.

Long-lived. One per project. Survives restarts.

Task Agent
Ephemeral

Executes coding tasks inside isolated Docker containers with Claude Code. Receives structured TaskSpec from Project Agent, clones repo, creates branch, implements changes, runs tests, and opens PR. Auto-terminates on completion.

Minutes to hours. Destroyed after PR is opened.

Review Agent
Ephemeral

Analyzes pull requests for code quality, security vulnerabilities, performance regressions, and style violations. Can auto-approve low-risk changes per configurable policy, or request changes with inline comments.

Seconds to minutes. One per PR.

Deploy Agent
Ephemeral

Orchestrates the full deployment pipeline. Runs pre-deploy checks, manages approval gates, monitors health after deploy, and triggers automatic rollback if error rates spike above threshold.

Minutes. Watches health for 15 min post-deploy.

Incident Agent
Ephemeral

Activated on production errors. Correlates exceptions with recent deployments and code changes. Searches logs, identifies root cause, proposes fix, and can spawn a Task Agent to implement it.

Minutes. Terminated after RCA is delivered.

Coordinator
Persistent

Cross-project orchestration for complex operations. Manages cascading deploys across dependent services, shared resource locks, and organization-wide policies. Prevents conflicting operations.

Long-lived. One per organization.

Lifecycle

Four states. Always observable.

Every agent follows a deterministic state machine. You can query the current state of any agent at any time, from any channel.

1
INITIALIZING

Agent container is starting. Loading context, cloning repo, indexing codebase.

2
IDLE

Waiting for events. Listening to channels, webhooks, and scheduled triggers.

3
ACTIVE

Processing a task. Executing code, analyzing PRs, or orchestrating deploys.

4
WAITING_APPROVAL

Action requires human confirmation. Blocked until approved or rejected.

Transitions are event-driven. IDLE → ACTIVE when a relevant event arrives (message, webhook, cron). ACTIVE → WAITING_APPROVAL when an action exceeds the agent's autonomy level. WAITING_APPROVAL → ACTIVE on human confirmation. Any state → INITIALIZING on restart.

Channel-Agnostic

One interface. Every platform.

Every incoming message — whether from WhatsApp, Slack, Telegram, Discord, or CLI — is normalized into a single NormalizedMessage interface before reaching any agent. Agents never know which channel originated a message.

This means agent logic is written once and works everywhere. Channel adapters handle the translation: converting Slack Block Kit to plain text, WhatsApp media to attachments, Discord embeds to structured content.

Responses follow the same pattern. Agents emit a NormalizedResponse that each channel adapter renders natively — rich cards on Slack, formatted messages on WhatsApp, embeds on Discord.

types/message.ts
interface NormalizedMessage {
id: string;
channel: 'whatsapp' | 'slack' | 'telegram' | 'discord' | 'cli';
author: {
id: string;
name: string;
role: UserRole;
};
content: string;
attachments: Attachment[];
threadId?: string;
replyTo?: string;
timestamp: Date;
metadata: Record<string, unknown>;
}
task execution
$ docker run --rm \
--network=none \
--memory=2g \
--cpus=2 \
--read-only \
--tmpfs /tmp:size=512m \
-v /repo:/workspace:ro \
-v /output:/output \
codespar/task-agent:latest \
--task-spec=task.json
# Each task agent gets:
# - No network access (--network=none)
# - Memory + CPU limits
# - Read-only filesystem
# - Isolated /tmp for scratch
# - Repo mounted read-only
# - Output dir for artifacts

Execution

Docker isolation. Claude Code inside.

Every Task Agent runs inside a purpose-built Docker container with no network access, memory limits, CPU quotas, and a read-only filesystem. The repo is mounted read-only; output goes to a dedicated directory.

Inside the container, Claude Code handles the actual coding work — reading files, writing code, running tests, iterating on failures. The Task Agent manages the lifecycle: branch creation, commit, push, and PR.

When the task completes (or fails), the container is destroyed. No state leaks between tasks. No persistent processes. Clean isolation every time.

Deploy your first agent

One command to start. Six agent types ready to work. Every channel supported. Open source forever.