Prerequisites
Before installing Shazam, ensure you have the following tools and accounts set up.
Shazam is built on Elixir/OTP. Erlang/OTP, SQLite (via Exqlite), and standard build tools come bundled with the Elixir installation. Install via asdf, mise, or your system package manager.
Install guide →Shazam uses Claude Code to run AI agents. Install and configure with your Anthropic API key.
Install guide →Use Nix to get all dependencies automatically — no manual installs needed. Recommended for contributors.
Install guide →Installation & Setup
Get Shazam running in under 5 minutes. The setup script auto-detects your environment.
curl -fsSL https://raw.githubusercontent.com/raphaelbarbosaqwerty/shazam-cli/main/setup.sh | bashThe script clones the repo, detects dependencies, builds, and installs to ~/bin/.
Don't have Elixir or Rust? Nix provides everything automatically — no manual installs needed.
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | shcurl -fsSL https://raw.githubusercontent.com/raphaelbarbosaqwerty/shazam-cli/main/setup.sh | bashshazam initCreates a shazam.yaml — choose company name, mission, and team template.
shazamLaunches the Rust TUI with real-time events, overlays, and autocomplete.
shazam updateFetches the latest git tag (e.g., v0.6.0), checks it out, rebuilds, and installs. Always targets stable tagged releases, not HEAD.
Interactive Shell
The interactive shell is the primary way to use Shazam. It provides a Rust-powered TUI with real-time events, overlays, and ghost text autocomplete.
Core Commands
/startStart the orchestrator and begin processing tasks/stopStop the orchestrator and all running agents/resumeResume a paused orchestrator/statusRefresh status bar/restartRestart Shazam — stop all agents and re-initTask Management
/tasksOpen the tasks overlay — browse, filter, and act on all tasks/task <title>Create a new task with the given title/approve <id>Approve a specific task by ID/aaApprove all pending subtasks at once (alias: /approve-all)/reject <id>Reject a pending subtask with an optional reason/search <query>Search tasks by title/export [file]Export tasks to markdown/tasks --syncImport tasks from .shazam/tasks/ markdown files/tasks --exportExport all tasks to .shazam/tasks/ as markdown files/review <pr>Review a pull request by number or URL (uses Opus)/review --learnLearn review patterns from recent merged PRs/review --post <task_id>Post review to GitHub with inline comments and suggested changes/review --check <pr>Verify if previous review comments were addressed/review --resolve <pr>Resolve all conversation threads on a PR/review --learnLearn patterns from merged PR reviews/review --patternsShow learned review patterns/workspacesList configured workspaces (multi-repo)/knowledgeShow project knowledge files/knowledge --updateAnalyze codebase and update skill memories/qaList QA checklists and status/qa --generate <id>Generate QA doc for a completed task/qa --validate <id>Assign QA agent to validate a task/qa --reportGenerate daily QA report/qa --auto on|offToggle auto QA generation on task completion/plan <description>Create a phased execution plan/plan --listList all plans/plan --show <id>Show plan details with phases/plan --approve <id>Approve plan and create all tasks/github syncRe-import tasks from GitHub Projects without restarting.shazam/tasks/. Create .md files manually and import with /tasks --sync, or export with /tasks --export. Version-control friendly. @path/to/file in task descriptions to auto-expand file contents as context. Example: Fix the bug in @src/auth.ts — the agent receives the full file contents. .shazam/attachments/ and included as context for the agent. /memory and the status bar (Budget: X%). Metrics persist across sessions. Omit budget: from YAML for unlimited. Task Actions (via /tasks overlay → Enter)
/pause-task <id>Pause a running task/resume-task <id>Resume a paused task/kill-task <id>Kill a running task immediately/retry-task <id>Retry a failed or killed task/delete-task <id>Delete a task from the board permanentlyAgent Management
/agentsList all agents with their roles, status, and budget/agent add <name>Add a new agent interactively/agent edit <name>Edit an existing agent configuration/agent remove <name>Remove an agent from the company/agents --initGenerate .md config files for existing agents/agent presetsBrowse available agent preset templatesTeam Templates
/team create <domain>Create a new team from a domain template/team templatesList all available team templatesViews & Navigation
/dashboardOpen agent dashboard with metrics and current tasks/configView current shazam.yaml configuration/orgDisplay the agent hierarchy tree/memoryShow memory usage, per-agent token breakdown, and cumulative cost/pluginsList loaded plugins and their event filters/plugins reloadHot-reload plugins from .shazam/plugins//plugins install <owner>/<repo>Install plugin from GitHub repo/plugins remove <name>Remove an installed plugin/helpShow all available commands and shortcuts/clearClear the event log in the shellCommand history is persistent across sessions.
Communication
/msg <agent> <message>Send a direct message or instruction to a specific agent/auto-approve [on|off]Toggle automatic approval of PM-created subtasksExit
/quitExit the interactive shell/exitExit the interactive shell (alias for /quit)Keyboard Shortcuts
CLI Commands
Shazam provides Mix tasks for managing your AI agent orchestrator. All commands follow the mix shazam.<command> pattern.
shazam init
Create a new shazam.yaml configuration with an interactive wizard. Prompts for company name, mission, and team template.
mix shazam.initRun the interactive setup wizard
mix shazam.initshazam start
Boot the orchestrator server and create the company from shazam.yaml. Starts the OTP supervision tree, TaskBoard, SessionPool, and RalphLoops.
mix shazam.start [options]-p, --portServer port for the HTTP API (default: 4040)-f, --filePath to YAML config file (default: .shazam/shazam.yaml)--no-resumeSkip automatic RalphLoop resume on startup Start with default settings
mix shazam.startStart on a custom port with a specific config
mix shazam.start -p 5000 -f my-team.yamlStart without resuming previous tasks
mix shazam.start --port 4040 --no-resumeshazam stop
Stop a running company by sending an HTTP request to the running server instance.
mix shazam.stop [options]-c, --companyName of the company to stop (default: auto-detected)-p, --portServer port to connect to (default: 4040)--allStop all running companies at once Stop the auto-detected company
mix shazam.stopStop a specific company by name
mix shazam.stop -c MyCompanyStop all running companies
mix shazam.stop --allshazam status
Display current system status including company mission, agent table (name, role, status, domain, budget), RalphLoop status, task summary, and token usage.
mix shazam.status [options]-c, --companyShow status for a specific company only (default: all companies)Show status for all companies
mix shazam.statusShow status for a specific company
mix shazam.status -c MyTeamshazam task
Create a new task in a running company. The task is added to the TaskBoard and automatically assigned based on role and availability.
mix shazam.task <title> [options]-t, --toAssign task to a specific agent by name (default: auto-assigned)-c, --companyTarget company name (default: auto-detected)-d, --descriptionAdditional task description or details Create a simple task
mix shazam.task "Implement user authentication"Assign to a specific agent in a company
mix shazam.task "Fix login bug" --to senior_dev -c MyTeamCreate a task with a detailed description
mix shazam.task "Write tests" -t qa -d "Full coverage required"shazam org
Display the agent hierarchy tree for a company, showing the chain of command from top-level agents down.
mix shazam.org [options]-c, --companyCompany name to display (default: auto-detected)Show the org chart
mix shazam.orgShow org chart for a specific company
mix shazam.org -c MyTeamshazam logs
Stream live agent output and events in real-time. Supports filtering by agent name, company, or domain.
mix shazam.logs [agent_filter] [options]-c, --companyFilter logs by company name -d, --domainFilter logs by agent domain Stream all agent logs
mix shazam.logsStream logs for a specific agent
mix shazam.logs senior_devFilter by domain and company
mix shazam.logs -d backend -c MyCompanyshazam agent.add
Dynamically add a new agent to a running company without restarting. Supports presets for quick setup.
mix shazam.agent.add <agent_name> [options]-n, --nameAgent name (alternative to positional argument) -r, --roleAgent role or title -s, --supervisorName of the supervising agent -d, --domainDomain or module ownership area -b, --budgetToken budget for the agent (default: 100000)-m, --modelAI model to use (e.g., claude-opus-4-1) -c, --companyTarget company name (default: auto-detected)--presetUse a preset template (e.g., senior_dev, qa, pm) Add a designer agent with a supervisor
mix shazam.agent.add designer --role "UI Designer" --supervisor pm --budget 80000Add a QA engineer reporting to PM
mix shazam.agent.add qa_engineer -r "Senior QA" -s pmAdd an agent from a preset template
mix shazam.agent.add researcher --preset market_analystshazam apply
Reconcile the running state with shazam.yaml. Creates or updates the company to match the current configuration file.
mix shazam.apply [options]-f, --filePath to YAML config file (default: .shazam/shazam.yaml)Apply the default config file
mix shazam.applyApply a specific config file
mix shazam.apply -f custom-team.yamlshazam dashboard
Launch a live TUI dashboard with agent status, budget bars, task counts, RalphLoop status, and event log. Press q to quit, r to refresh.
mix shazam.dashboard [options]-c, --companyCompany to display in the dashboard (default: auto-detected)Launch the dashboard
mix shazam.dashboardLaunch dashboard for a specific company
mix shazam.dashboard -c MyTeamConfiguration
Shazam is configured via a shazam.yaml file at the root of your project.
company:
name: "my-project"
mission: "Build great software"
agents:
- name: pm
role: "Project Manager"
model: "claude-haiku-4-5-20251001"
budget: 100000
supervisor: null
tools: [Read, Edit, Write, Bash, Grep, Glob]
domain: "management"
- name: senior_dev
role: "Senior Developer"
model: "claude-sonnet-4-20250514"
budget: 150000
supervisor: pm
tools: [Read, Edit, Write, Bash, Grep, Glob]
domain: "backend"
modules: ["lib/core", "lib/api"]
- name: qa
role: "QA Engineer"
model: "claude-sonnet-4-20250514"
budget: 100000
supervisor: pm
tools: [Read, Bash, Grep, Glob]
domain: "testing"
config:
auto_approve: false
auto_retry: true
max_concurrent: 4
max_retries: 2
poll_interval: 5000
module_lock: true
peer_reassign: trueConfiguration Fields
company.namecompany.missionagents[].nameagents[].roleagents[].modelagents[].budgetagents[].supervisoragents[].toolsagents[].domainagents[].skillsagents[].modulesagents[].system_promptconfig.auto_approveconfig.auto_retryconfig.max_concurrentconfig.max_retriesconfig.poll_intervalconfig.module_lockconfig.peer_reassignAgent Roles & Presets
Shazam ships with 11 pre-configured agent presets. Each preset defines default tools, model, and behavior.
.md files in .shazam/agents/. shazam init creates them from presets. Edit any file to customize prompts, restrictions, tools, and behavior — changes take effect on the next task. Use /agents --init to generate configs for existing projects. Multiple agents can share the same config via config: field in shazam.yaml. pmProject Manager — breaks down tasks, creates subtasks, coordinates team
senior_devSenior Developer — implements features, handles complex code changes
junior_devJunior Developer — handles simpler tasks, learns from senior feedback
qaQuality Assurance — writes tests, validates implementations, finds bugs
designerDesigner — UI/UX work, CSS, component styling, visual consistency
researcherResearcher — investigates solutions, explores APIs, gathers information
devopsDevOps — CI/CD pipelines, deployment, infrastructure configuration
writerTechnical Writer — documentation, READMEs, API docs, guides
market_analystMarket Analyst — market research, competitive analysis, business insights
competitor_analystCompetitor Analyst — tracks competitors, identifies opportunities
pr_reviewerPR Reviewer — reviews pull requests with full codebase context, learns from team patterns
Team Templates
Create entire teams with one command. Templates auto-generate agents with the right roles, tools, models, and hierarchy — all scoped to a domain.
Quick Start
/team create <domain> --devs N --qa N --designer --researcherExample Teams
Full Project Setup (Multi-Domain)
For larger projects, create multiple teams across different domains. Each team is isolated — agents can only edit files within their domain.
# Backend team: 3 devs + 1 QA
/team create backend --devs 3 --qa 1
# Frontend team: 2 devs + 1 designer
/team create frontend --devs 2 --designer
# API team: 2 devs + 1 researcher
/team create api --devs 2 --researcher
# Mobile team: 2 devs + 1 QA
/team create mobile --devs 2 --qa 1
# Docs team: 1 dev (uses writer preset internally)
/agent add docs_writer --preset writer --domain docsThis creates 15 agents across 5 domains, all reporting to your PM. The hierarchy looks like:
pm (Project Manager)
├── backend_dev_1 (Senior Developer, domain: backend)
├── backend_dev_2 (Senior Developer, domain: backend)
├── backend_dev_3 (Senior Developer, domain: backend)
├── backend_qa_1 (QA Engineer, domain: backend)
├── frontend_dev_1 (Senior Developer, domain: frontend)
├── frontend_dev_2 (Senior Developer, domain: frontend)
├── frontend_designer (UI Designer, domain: frontend)
├── api_dev_1 (Senior Developer, domain: api)
├── api_dev_2 (Senior Developer, domain: api)
├── api_researcher (Researcher, domain: api)
├── mobile_dev_1 (Senior Developer, domain: mobile)
├── mobile_dev_2 (Senior Developer, domain: mobile)
├── mobile_qa_1 (QA Engineer, domain: mobile)
└── docs_writer (Content Writer, domain: docs)Individual Agent Presets
You can also add individual agents using presets. Each preset comes with pre-configured role, tools, model, and system prompt.
# Add a QA engineer from preset
/agent add qa_lead --preset qa --domain backend --budget 200000
# Add a market analyst
/agent add market_1 --preset market_analyst
# Add a competitor analyst
/agent add comp_1 --preset competitor_analyst
# Add a DevOps engineer
/agent add infra_1 --preset devops --domain infra
# List all available presets
/agent presetsAvailable Flags
--devs NNumber of Senior Developer agents (default: 2). Each uses the senior_dev preset with Edit, Write, Bash tools.--qa NNumber of QA Engineer agents (default: 0). Each uses the qa preset — writes tests, validates, reports bugs.--designerAdd a UI Designer agent. Uses Figma MCP tools to analyze designs and produce specs.--researcherAdd a Researcher agent. Uses WebSearch, WebFetch to investigate solutions and gather context.REST API
Shazam exposes a REST API via Bandit/Plug for task management and monitoring.
/api/statusGet overall orchestrator status including all companies and agents.
/api/companiesList all registered companies with their agent counts and task stats.
/api/companies/:id/tasksList all tasks for a specific company with filtering support.
/api/tasksSubmit a new task to the orchestrator. Accepts JSON body with title, description, role, and priority.
/api/tasks/:idGet detailed information about a specific task including status, assignee, and results.
/api/tasks/:idCancel a pending or in-progress task.
/api/approval/:id/approveApprove a pending subtask in the human-in-the-loop queue.
/api/approval/:id/rejectReject a pending subtask with an optional reason.
/api/metricsGet agent performance metrics including task counts, durations, and success rates.
/wsWebSocket endpoint for real-time event streaming (task updates, agent status, logs).
Architecture
Shazam is built on Elixir/OTP, leveraging GenServer, ETS, and DynamicSupervisor for fault-tolerant agent management.
Core Modules
ApplicationOTP supervision tree, boots all subsystems on startupOrchestratorParallel and pipeline agent execution via Claude Code SDKCompanyGenServer managing agent hierarchy, tasks, and company lifecycleRalphLoopPer-company polling loop for task picking and executionTaskBoardETS-backed task CRUD with atomic checkout (pending → in_progress → completed)TaskExecutorBuilds prompts, manages sessions, executes tasks via Claude CodeTaskSchedulerTask selection, peer reassignment, and module locking logicSessionPoolReusable Claude session management with automatic recyclingHierarchyOrg chart management with cycle detection via Kahn's algorithmSkillMemoryStructured knowledge graph stored in .shazam/memories/StorePersistence abstraction layer (SQLite primary, JSON fallback)EventBusPub/sub event system for real-time WebSocket streamingExecution Flow
- Boot — OTP supervision tree starts TaskBoard, SessionPool, and per-company RalphLoops
- Task Submission — Tasks are added via CLI or API and stored in ETS-backed TaskBoard
- Scheduling — TaskScheduler selects tasks based on agent role, availability, and module locks
- Execution — TaskExecutor builds prompts and runs them via Claude Code sessions from the pool
- Delegation — PMs may output subtask JSON blocks, automatically parsed and assigned
- Completion — Results propagate via EventBus, metrics are recorded, sessions recycled
Multi-repo Workspaces
Agents can work across multiple repositories simultaneously. Each agent runs in its own workspace directory.
workspaces:
backend:
path: /home/user/projects/backend-api
domains: ["lib/", "src/"]
frontend:
path: /home/user/projects/frontend-web
domains: ["src/", "components/"]
mobile:
path: /home/user/projects/mobile-app
agents:
pm:
role: Project Manager
backend_dev:
role: Senior Developer
supervisor: pm
workspace: backend # runs in backend repo
frontend_dev:
role: Senior Developer
supervisor: pm
workspace: frontend # runs in frontend repo
mobile_dev:
role: Senior Developer
supervisor: pm
workspace: mobile # runs in mobile repoWhen you say "Add pagination to the users API and update the frontend table and mobile list", the PM assigns subtasks to each agent in their respective repo.
/workspaces — list configured workspaces and validate paths. Engineering Manager (Multi-team)
For projects with multiple teams, add an Engineering Manager above the PMs. The Manager receives all tasks and delegates to the correct PM based on context.
CEO (you) → Engineering Manager
├── PM Dashboard → 3 frontend devs (workspace: dashboard)
└── PM VS Code → 3 extension devs (workspace: vscode)
# shazam.yaml
agents:
manager:
role: Engineering Manager
model: claude-haiku-4-5-20251001
pm_dashboard:
role: Project Manager — Dashboard
supervisor: manager
domain: dashboard
workspace: dashboard
pm_vscode:
role: Project Manager — VS Code Extension
supervisor: manager
domain: vscode-extension
workspace: vscode
dashboard_dev_1:
supervisor: pm_dashboard
workspace: dashboard
# ...Execution Plans
Create phased implementation plans with dependencies. The PM agent breaks down your request into ordered phases, and you approve to create all tasks at once.
Commands
/plan <description>Create a phased plan — PM analyzes and proposes phases with dependencies/plan --listList all saved plans/plan --show <id>Show plan details with phases and task assignments/plan --approve <id>Approve plan — creates all tasks with correct dependencies (auto-approved)How It Works
- Create —
/plan Build a user auth system with JWT - Review — PM generates phases (e.g., Phase 1: DB schema, Phase 2: API endpoints, Phase 3: Tests)
- Auto-save — Plan is saved to
.shazam/plans/as markdown - Approve —
/plan --approve plan_1creates all tasks withdepends_onset - Execute — RalphLoop respects dependencies, executing phases in order
QA System
Auto-generated QA checklists for completed tasks. A QA agent validates each checklist item and marks pass/fail.
Commands
/qaList QA checklists and their status/qa --generate <task_id>Generate QA doc for a completed task (test cases with checkboxes)/qa --validate <task_id>Assign QA agent to run validation — marks [x] for passing, creates bug reports for failures/qa --reportGenerate daily QA summary report/qa --auto on|offToggle auto-generation — creates QA docs automatically when tasks completeqa_auto: true in shazam.yaml to enable auto-generation by default. QA docs are saved to .shazam/qa/ with a README index tracking overall progress. QA Doc Format
# QA: Implement JWT auth (task_5)
## Test Cases
| # | Test Case | Expected | Status |
|---|-----------|----------|--------|
| 1 | Login with valid credentials | Returns JWT token | [x] Pass |
| 2 | Login with invalid password | Returns 401 | [x] Pass |
| 3 | Access protected route without token | Returns 403 | [ ] Fail |
## Bug Reports
- Test 3: Missing auth middleware on /api/users endpointEnvironment Variables
SHAZAM_PORTTroubleshooting
Check that RalphLoop is running and agents match the task domain.
# Check system status
mix shazam.status
# Verify the agent roles and domains match your task
# Re-apply config if you changed shazam.yaml
mix shazam.applyAnother agent is already working on the same code module. Shazam prevents concurrent edits.
# Check which agent holds the lock
mix shazam.status
# Wait for the current task to complete, or disable module locking:
# In shazam.yaml: config.module_lock: falseToo many concurrent requests to the Claude API.
# Reduce concurrent agents in shazam.yaml:
# config.max_concurrent: 2SQLite3 library not found. Shazam will fall back to JSON storage.
# Install SQLite3 (macOS)
brew install sqlite3
# Install SQLite3 (Ubuntu/Debian)
sudo apt-get install libsqlite3-dev
# Or just let Shazam use JSON fallback — it works automaticallyAnother process is using the default API port.
# Use a different port
mix shazam.start --port 5050
# Or set via environment variable
export SHAZAM_PORT=5050asdf version manager is installed but broken or outdated. The Elixir shim points to a missing asdf binary.
# Option A: Reinstall asdf
brew reinstall asdf
# Option B: Remove asdf and install Elixir directly
brew install elixir
# Option C: Reshim after fixing
asdf reshim elixir
# Option D: Reinstall Shazam (uses Nix if available)
curl -fsSL https://raw.githubusercontent.com/raphaelbarbosaqwerty/shazam-cli/main/setup.sh | bashmacOS ships /usr/bin/shazam (ShazamKit). Your PATH may have /usr/bin before ~/bin.
# Use the 'shz' alias (installed automatically)
shz init
shz shell
# Or fix your PATH (add to ~/.zshrc)
export PATH="$HOME/bin:$PATH"The claude_code SDK requires Elixir 1.18+. Your system has an older version.
# Option A: Use Nix (handles everything automatically)
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh
curl -fsSL https://raw.githubusercontent.com/raphaelbarbosaqwerty/shazam-cli/main/setup.sh | bash
# Option B: Update Elixir manually
brew upgrade elixir
# Option C: Use asdf
asdf install elixir 1.18.3
asdf global elixir 1.18.3The shazam-tui Rust binary was not built or not found in PATH.
# Rebuild everything
cd ~/.shazam-cli && ./build.sh
# If cargo is missing, install Rust first
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
cd ~/.shazam-cli && ./build.shA git tag was force-pushed upstream and your local copy conflicts. Versions before v0.8.0 used git fetch without --force.
# Manual one-time fix:
cd ~/.shazam-cli
git fetch origin --tags --force
git checkout v0.8.0
./build.sh
# After this, "shazam update" works normally — the fix is included in v0.8.0+Your PATH has /usr/bin/shazam (Apple ShazamKit) or an old binary before ~/bin.
# Check which binary is being used
which shazam
# Fix: ensure ~/bin is first in PATH
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
# Verify
shazam --versionPlugins
Extend Shazam with middleware hooks into the agent lifecycle. Plugins are Elixir modules compiled at runtime from .shazam/plugins/*.ex.
mkdir -p .shazam/plugins
# Create a plugin file
cat > .shazam/plugins/01_logger.ex << 'EOF'
defmodule ShazamPlugin.Logger do
use Shazam.Plugin
@impl true
def after_task_complete(task_id, result, _ctx) do
File.write(".shazam/events.log",
"[#{DateTime.utc_now()}] Task #{task_id} done\n", [:append])
{:ok, result}
end
end
EOF
# Start shazam — plugins load automatically on /start
shazamLifecycle Events
Plugins hook into 8 lifecycle events. "before" hooks can mutate input or halt the operation. "after" hooks can mutate output. "notify" hooks are observe-only.
| Event | Phase | Can Mutate | Description |
|---|---|---|---|
| on_init | startup | — | Called when /start boots agents |
| before_task_create | before | attrs or halt | Before a task is created |
| after_task_create | after | task | After a task is created |
| before_task_complete | before | result or halt | Before marking task complete |
| after_task_complete | after | result | After task is marked complete |
| before_query | before | prompt or halt | Before prompt is sent to agent |
| after_query | after | response | After agent responds |
| on_tool_use | notify | — (observe) | When an agent uses a tool |
Writing a Plugin
Implement only the callbacks you need. Files are loaded in alphabetical order (prefix with 01_, 02_ to control order).
# .shazam/plugins/02_webhook.ex
defmodule ShazamPlugin.Webhook do
use Shazam.Plugin
@impl true
def after_task_complete(task_id, result, ctx) do
url = ctx.plugin_config["webhook_url"]
if url do
payload = Jason.encode!(%{
text: "Task #{task_id} completed in #{ctx.company_name}"
})
spawn(fn ->
System.cmd("curl", ["-s", "-X", "POST", "-d", payload, url])
end)
end
{:ok, result}
end
end# .shazam/plugins/03_auto_context.ex
defmodule ShazamPlugin.AutoContext do
use Shazam.Plugin
@impl true
def before_query(prompt, _agent_name, _ctx) do
case File.read(".shazam/project_context.md") do
{:ok, context} -> {:ok, "## Context\n#{context}\n\n#{prompt}"}
_ -> {:ok, prompt}
end
end
endPlugin Context
Every callback receives a context map:
%{
company_name: "MyProject",
agents: [%{name: "pm", role: "Project Manager", ...}, ...],
tasks: [%{id: "task_1", title: "...", status: :pending, ...}, ...],
plugin_config: %{"webhook_url" => "..."} # from shazam.yaml
}YAML Configuration
Configure plugins in shazam.yaml. Use events: to filter which events trigger the plugin.
plugins:
- name: webhook # matches ShazamPlugin.Webhook
enabled: true
events: # only these events (omit for all)
- after_task_complete
- after_task_create
config:
webhook_url: "https://hooks.slack.com/services/..."
- name: auto_context
events: [before_query] # only prompt injection
- name: logger
# no events: = runs on all implemented callbacks
enabled: trueCommands
| Command | Description |
|---|---|
| /plugins | List loaded plugins with their event filters |
| /plugins reload | Hot-reload plugins from disk (no restart needed) |
| /plugins install <owner>/<repo> | Install plugins from a GitHub repo (all plugin files or specific with --path) |
| /plugins remove <name> | Remove an installed plugin |
Return Values
| Return | Effect |
|---|---|
| {:ok, data} | Continue pipeline with (possibly modified) data |
| {:halt, reason} | Stop pipeline, cancel operation (before events only) |
| :ok | Continue (for on_init, on_tool_use) |
Available Example Plugins
Install with /plugins install ShazamAI/shazam-core or copy individual files to .shazam/plugins/.
| Plugin | File | Description |
|---|---|---|
| GitHub Projects | 05_github_projects.ex | Sync tasks with GitHub org-level Projects board |
| JSON Logger | 06_json_logger.ex | Structured event logs in .shazam/logs/events.json (secrets auto-scrubbed) |
| Secrets Obfuscation | 07_secrets_obfuscation.ex | Masks API keys, tokens, passwords before sending to AI providers |
| Webhook | 02_webhook.ex | POST notifications to Slack/HTTP endpoints |
| Auto-context | 03_auto_context.ex | Inject project context into agent prompts |
Context & RAG
Agents automatically learn across tasks. Context accumulates as they complete work — decisions, discoveries, patterns, and tech stack are extracted and reused in future tasks. Works with all providers.
How It Works
- Task completes — ContextManager extracts summary and routes to a topic file
- Learnings extracted — regex patterns detect decisions, tech stack, warnings from output
- Deduplication — new learnings compared with existing via Jaccard similarity (>0.7 = skip)
- Next task — agent receives: learnings + history + team activity + TF-IDF relevant context
Storage Structure
.shazam/context/
agents/
senior_1/
index.md # auto-generated links + key learnings
_learnings.md # "Project uses Supabase", "JWT uses jose"
implement_jwt_auth.md # topic: auth work
build_rest_api.md # topic: API endpoints
pm/
index.md
_learnings.md
plan_auth_system.md
team_activity.md # chronological log (auto-trimmed)What Agents Receive
## What You Know
- Project uses Vue.js
- Project uses Supabase
- API uses JWT with 1h expiration via jose library
- careful: /api/users has no rate limiting
## Your Recent Work
### [2026-03-20] Fix JWT expiration — changed TTL to 24h
## Recent Team Activity
### [2026-03-20] pm: Plan auth system — delegated 3 subtasks
## Related Context (TF-IDF)
### [2026-03-20] senior_2: Setup database — created users tableTF-IDF Retrieval
Pure Elixir implementation — zero external dependencies. Indexes all .md files recursively and returns the most relevant chunks by score.
| Feature | Description |
|---|---|
| Stopword removal | 100+ common words filtered out |
| Augmented TF | Prevents bias toward long documents |
| Partial matching | "auth" finds "authentication" (with bonus) |
| Budget-aware | Returns chunks within configurable char limit |
Auto-Extracted Learnings
Patterns detected from agent output:
| Pattern | Example |
|---|---|
| Decisions | "chose JWT over session-based auth" |
| Discoveries | "found that the API requires rate limiting" |
| Tech stack | Files touched: .vue → "Project uses Vue.js" |
| Warnings | "careful: this endpoint has no auth middleware" |
Configuration
config:
context_history: 5 # last N tasks per agent
team_activity: 10 # last N team tasks
context_budget: 4000 # max chars injected into promptProviders
Shazam supports multiple AI CLI tools as interchangeable providers. Each agent can use a different provider — mix Claude, Codex, Cursor, and Gemini in the same team.
Available Providers
| Provider | CLI | Sessions | Notes |
|---|---|---|---|
| claude_code | claude | Yes | Default. Persistent sessions via SessionPool. Best for context-heavy tasks. |
| codex | codex | No | Stateless. Each task spawns a new CLI process. |
| cursor | cursor | No | Stateless. Requires Cursor CLI installed. |
| gemini | gemini | No | Stateless. Requires Gemini CLI installed. |
Configuration
# shazam.yaml
provider: claude_code # default for all agents
agents:
pm:
role: Project Manager
provider: claude_code # explicit — uses Claude
senior_1:
role: Senior Developer
supervisor: pm
provider: codex # uses Codex CLI
senior_2:
role: Senior Developer
supervisor: pm
provider: cursor # uses Cursor CLI
senior_3:
role: Senior Developer
supervisor: pm
# no provider: field = inherits global default (claude_code)How It Works
- Resolution — TaskExecutor resolves the provider from agent config (or global default)
- Session check — Session-based providers (Claude) use SessionPool for reuse; stateless providers skip it
- Execution — Provider receives the prompt and returns
{:ok, text, files} - Normalization — All providers return the same result format, so RalphLoop handles output identically
Shazam.Provider behaviour with 6 callbacks (start_session, stop_session, execute, supports_sessions?, name, available?) and register in the Resolver. Web Dashboard
A companion web dashboard built with Vue 3 + Tailwind CSS. Connects to the CLI's REST API and WebSocket for real-time monitoring.
Features
Quick Start
# Start Shazam CLI (starts the API server on :4040)
shazam
# In another terminal
git clone https://github.com/ShazamAI/shazam-dashboard.git
cd shazam-dashboard
npm install
npm run dev
# Open http://localhost:3000localhost:4040 and works alongside the TUI — both can run simultaneously. Changelog
Breaking Changes (Command Renames)
- /pause removed (use
/stopinstead) - /plugin install renamed to
/plugins install - /plugin remove renamed to
/plugins remove - /memory-bank renamed to
/knowledge - /restart -f removed (just use
/restart) - /approve --all removed (use
/aaor/approve-all) - /tasks --clear-all removed (use
/tasks --clear)
Improvements
/approve <id>now requires explicit task ID/statusvs/dashboardclearly differentiated- Runtime config changes show "session only" warning
Features
- /restart command — stop all agents and re-init
- /github sync — re-import tasks from GitHub Projects without restarting
- /plugins install — install plugins directly from GitHub repos
- /plugins remove — remove installed plugins
- TUI horizontal scroll — input no longer freezes with long text
- Workspace
include:field (renamed fromdomains:, backward compatible)
Core v0.2.0
- excluded_paths in domain config
- Dashboard advanced metrics (avg duration, tasks/hour, tokens/task, retry rate)
- QA real test generation — QA agents write and run actual tests
- Plugin name matching normalized (github_projects matches GitHubProjects)
- Example plugins: GitHub Projects, JSON Logger, Secrets Obfuscation
Breaking Changes
- Architecture split — backend engine extracted to ShazamAI/shazam-core
- CLI now depends on shazam-core as separate package
- New installation layout: ~/.shazam-install/{shazam-core, shazam-cli}
- setup.sh updated to clone both repos
Ecosystem
- shazam-core — Backend engine (Elixir)
- shazam-cli — CLI + TUI (Elixir + Rust)
- shazam-dashboard — Web dashboard (Vue 3)
Features
- AGENT_QUERY re-execution — agents receive answers and continue working
- Workspace enforcement — CRITICAL prompt prevents cross-repo file creation
- Orphan process cleanup — kills all child CLI processes on exit
- Removed SQLite — JSON-only persistence
- AgentWorker implements Access — permanent fix for struct bracket access
- Task counter isolation per workspace
- Circuit Breaker, Health Check, Graceful Degradation, Task Deduplication
- Engineering Manager role, nested tech_stack, /retry-all
Engineering Manager, circuit breaker, health check, task deduplication, graceful degradation, 6 bug fixes.
Enhanced TUI: sparkline status bar, task detail view with markdown, inline keybindings, scroll persistence. 49 new tests (371 total).
Git-awareness, agent-to-agent queries, project auto-detection, agent sparkline pulse.
Context persistence — agents learn across tasks with TF-IDF retrieval, auto-extracted learnings, atomized topic files. Works with all providers.
Features
- Multi-provider support — use different AI CLIs per agent
- 4 built-in providers: Claude Code, Codex, Cursor, Gemini
- provider: field in YAML — set globally or per-agent
- Session-based (Claude) use SessionPool; stateless (Codex, Cursor, Gemini) create ephemeral executions
- Fully backward-compatible — Claude Code remains the default
Features
- Plugin System — extensible middleware for the agent lifecycle
- Plugins as Elixir modules in .shazam/plugins/*.ex, compiled at runtime
- 8 lifecycle events: on_init, before/after task create, before/after task complete, before/after query, on_tool_use
- "before" hooks mutate input or halt; "after" hooks mutate output
- Zero-cost when no plugins loaded (persistent_term fast path)
- /plugins and /plugins reload commands
- Per-plugin config via shazam.yaml plugins: section
- Event filtering — events: field restricts when a plugin runs
Plugin system — extensible middleware for the agent lifecycle with 8 lifecycle events, runtime compilation of .shazam/plugins/*.ex, zero-cost when no plugins loaded.
Refactoring
- Removed ~1400 lines of dead ANSI fallback code from repl.ex
- Split monolithic commands.ex (1466 lines) into 5 focused modules
- Extracted TaskBoard.Persistence and Company.Builder
- Cleaned debug logging from RalphLoop
- Zero compile warnings — largest file reduced from 1525 to ~545 lines
Bug Fixes
- Critical: Tasks not executing since v0.3.0 — AgentWorker struct Access crash fixed
- RalphLoop race condition — paused state no longer reverts after /start
- Clean OTP shutdown — Application.stop before System.halt
Features
- QA system — auto-generated checklists, agent validation, bug reports
- Execution plans — /plan with phases, dependencies, auto-approve
- Knowledge — /knowledge --update analyzes codebase
Features
- PR Reviewer agent — review PRs with Opus, inline comments, suggested changes
- Editable agent configs — .md files in .shazam/agents/
- Multi-repo workspaces — agents across multiple repositories
- Markdown task files — .shazam/tasks/ with sync/export
- Memory monitoring — /memory command + Mem: MB in status bar
- Task search, export, detail view
- Persistent command history
- Multi-project isolation
- Agent visibility — tool_use and text in real-time feed
- 11 agent presets including pr_reviewer
Bug Fixes
- Session crash fix — bulletproof event loop
- RalphLoop noproc — safe calls with spawn
- Status bar atom vs string normalization
- /aa approve all pattern matching fix
Infrastructure
- Nix flake for reproducible dev environment
- shazam update — auto-update command
- shz alias for macOS compatibility
- PostHog analytics on site
- GitHub Actions CI
Initial release — Elixir/OTP core, Rust TUI, 30+ commands, hierarchical agent teams, human-in-the-loop approval, session pooling, REST API + WebSocket.