A hierarchical, directory-based multi-agent system that replicates a software engineer's workflow. Works with Cursor and Claude Code.
Given a Jira ticket, the system reads requirements, plans work, writes code or takes over automation-generated MRs, reviews, tests, merges, and updates Jira -- end to end.
| Platform | MCP Config | How it works |
|---|---|---|
| Cursor | .cursor/mcp.json |
Agents run as chat participants with MCP tool access |
| Claude Code | .mcp.json |
Agents run via Claude Code with the same MCP tools |
Both platforms use the same agent definitions, skills, and profiles. The generate-mcp-config script produces configs for either or both from a single .env file.
Agents can run locally on the development server (when using Cursor SSH Remote or Claude Code directly) or remotely over SSH from any machine. The system auto-detects which mode to use.
- Python 3.11+
- Node.js 18+ -- required by MCP servers (Jira, GitLab, GitHub, Slack). On Windows, if you use
nvm, runnvm install 22 && nvm use 22from an admin terminal. - Claude Code or Cursor -- at least one must be installed. Claude Code must be available as
claudeon yourPATH.
-
Copy the environment template and fill in your values:
cp .env.example .env
-
Set at least these variables in
.env:Variable Purpose SAGENT_WORKSPACEBase directory where repositories live on the remote server SAGENT_SSH_HOSTHostname of the remote server (for SSH mode) SAGENT_SSH_USERSSH username SAGENT_SSH_KEYPath to SSH private key (must match your ~/.ssh/config)SAGENT_IS_REMOTESet to trueonly if running directly on the remote server (e.g. via Cursor SSH Remote). On Windows this is always auto-detected asfalse.See
.env.examplefor additional settings (Jira, GitLab, GitHub, Slack). -
Generate MCP configuration:
# Linux / macOS (via Makefile) make mcp-config WORKSPACE=/path/to/workspace # Cursor only make mcp-config WORKSPACE=/path/to/workspace CLAUDE_CODE=1 # Cursor + Claude Code # Any platform (via Python directly) python scripts/generate-mcp-config.py # Cursor only python scripts/generate-mcp-config.py --claude-code # Cursor + Claude Code
-
Windows only -- the generated
.mcp.jsonusesnpxas the command, but Windows requires a wrapper. Open.mcp.jsonand change each server's"command"from"npx"to"npx.cmd":{ "mcpServers": { "atlassian-jira": { "command": "npx.cmd", "args": ["-y", "@aashari/mcp-server-atlassian-jira"], "env": { ... } } } } -
Activate:
- Cursor: Reload the window (
Ctrl+Shift+P-> "Reload Window") - Claude Code: Run
/mcpto reload, or restart the session
- Cursor: Reload the window (
User provides Jira ticket
└── orchestrator (top-level router)
├── planner → breaks ticket into tasks
├── coder → writes/modifies code
├── reviewer → reviews changes and MRs
├── tester → writes and runs tests
├── packager → AIPCC packaging specialist
├── researcher → investigations, ADRs, spikes
├── git-ops → branches, MRs, merges
├── jira-ops → ticket lifecycle
└── infra-ops → Ansible, containers, CI
Each agent is defined declaratively via agent.yaml (metadata) + AGENT.md (instructions). Skills are reusable capabilities that agents load on demand -- including repo-specific skills discovered dynamically from target repositories.
| Directory | Purpose |
|---|---|
agents/ |
Agent definitions (agent.yaml + AGENT.md per agent) |
skills/ |
Reusable capabilities (SKILL.md per skill) |
profiles/ |
Known repository profiles (conventions, key files, workflows) |
mcps/ |
MCP server configuration docs (Jira, GitLab, GitHub, Slack) |
remote/ |
SSH remote execution config (remote/server.yaml) |
scripts/ |
Tooling (generate-mcp-config.py) |
templates/ |
Templates for creating new agents, skills, profiles |
src/ |
Python runtime -- CLI, engine, loaders, backends |
workspace/ |
Runtime workspace for agent artifacts (gitignored) |
Install in development mode:
# Linux / macOS
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev,mcp]"
# Windows
python -m venv .venv
.venv\Scripts\activate
pip install -e ".[dev,mcp]"# Full orchestration (intake -> plan -> execute -> report)
structured-agents run AIPCC-12095
# Dry run (read-only, no external changes)
structured-agents run AIPCC-12095 --dry-run
# Run a single agent instead of full orchestration
structured-agents run AIPCC-12095 --agent coder --context "Fix the constraint parsing"
# Extra verbosity
structured-agents run AIPCC-12095 -v --dry-run# List all agents, skills, profiles, and MCPs
structured-agents list
# List only agents
structured-agents list agents
# Validate all definitions (checks cross-references)
structured-agents validate
# Show the fully assembled system prompt for an agent
structured-agents show orchestrator
structured-agents show coder --dry-runEach run creates a workspace directory at workspace/runs/<ticket>-<timestamp>/ with:
run.log-- full log fileplan.yaml-- the execution plancontext.json-- serialized run contextartifacts/-- per-step output filesreport.md-- final summary report
See AGENTS.md for how to replicate the orchestration flow manually inside Cursor chat.
See templates/agent/. Each agent needs:
agent.yaml-- metadata, capabilities, sub-agents, skills, MCPsAGENT.md-- system prompt and instructions
See templates/skill/. Each skill needs:
SKILL.md-- instructions with YAML frontmatter (name, description)
Skills support dynamic discovery: when working on a repo, agents check for .claude/skills/*/SKILL.md and AGENTS.md in the target repo and follow repo-specific instructions before falling back to generic ones. Skills from ai-helpers are always available as a shared library.
MIT