# {{PROJECT_NAME}}

Multi-agent pipeline built with [arccrew](https://github.com/amonrreal/arccrew).

## Setup

```bash
# Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate        # On Windows: .venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Optional: MCP tools support (connect GitHub, Notion, Slack, etc. as agent tools)
# pip install "arccrew[mcp]"

# Configure API keys
cp .env.example .env
# Set ANTHROPIC_API_KEY (or another provider) in .env

arccrew check
```

## Build your pipeline

Open this project in Claude Code and run:

```
/build-agents  — generate a full pipeline from a description
/add-agent     — add a single agent to an existing pipeline
```

## Run

```bash
# Start the API server
arccrew serve

# Call the pipeline
curl -X POST http://localhost:8000/api/run \
  -H "Content-Type: application/json" \
  -d '{"pipeline": "my_pipeline", "tasks": [{"description": "your task here"}]}'

# Health check
curl http://localhost:8000/api/health

# MCP server (stdio — for Claude Desktop and Cursor)
arccrew serve-mcp
```

## MCP setup (Claude Desktop / Cursor)

Use `mcp.json.example` as a reference. Add the `mcpServers` block to your client config:

- **Claude Desktop:** `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Cursor (global):** `~/.cursor/mcp.json`

**Local development** — use `bash -c` with an explicit `cd` (the `cwd` field is not reliably respected by all clients):

```json
{
  "mcpServers": {
    "{{PROJECT_NAME}}": {
      "command": "bash",
      "args": ["-c", "cd /absolute/path/to/{{PROJECT_NAME}} && arccrew serve-mcp"]
    }
  }
}
```

**Deployed server** — use the HTTP transport URL instead:

```json
{
  "mcpServers": {
    "{{PROJECT_NAME}}": {
      "url": "https://your-deployment-url/mcp"
    }
  }
}
```

Make sure your `.env` has the API keys set — `arccrew serve-mcp` reads them from there.

### How to use your pipelines via MCP

Once connected, the AI client can use these tools automatically:

| Tool | What it does |
|---|---|
| `list_pipelines` | Lists all registered pipelines |
| `run_pipeline` | Runs any pipeline by name + task description |
| `run_{pipeline_name}` | Shortcut tool for each individual pipeline |

Example prompt to the AI: *"Run the blank_ai_marketing pipeline to create a campaign for my chocolate business"*

## Project structure

```
agents/          — agent classes (extend arccrew.BaseAgent)
prompts/         — prompt files
  global.md      — rules applied to all agents
  {agent}.md     — role, tools, output schema for each agent
tools/           — custom @tool functions
state.py         — custom state (extend PipelineState for domain-specific fields)
pipeline.py      — graph wiring + pipeline registration
tests/           — agent and tool tests
.env             — API keys and config (never commit this)
mcp.json.example — MCP client config reference (Claude Desktop / Cursor)
```

## Other commands

```bash
pytest                    # Run tests
ruff check .              # Lint
arccrew sync-skills     # Update skills after pip upgrade
```
