Staff MVP - AI Multi-Agent Development System

Quick Start (5 minutes)

Staff MVP is a lean AI multi-agent system where specialized AI agents autonomously handle development tasks and create GitHub pull requests.

1. Prerequisites

  • Go 1.21+ installed
  • OpenAI API key (get one at platform.openai.com)
  • GitHub personal access token with repo permissions

2. Setup

# Clone and setup
git clone <your-repo>
cd staff
./setup.sh

# Configure (edit with your API keys)
cp config.example.yaml config.yaml
nano config.yaml

3. Configuration

Edit config.yaml with your credentials:

openai:
  api_key: "sk-your-openai-key-here"
  
github:
  token: "ghp_your-github-token-here"
  owner: "your-github-username"
  repo: "your-repo-name"

Or use environment variables:

export OPENAI_API_KEY="sk-your-openai-key-here"
export GITHUB_TOKEN="ghp_your-github-token-here"

4. Usage

cd server

# Create a task
./staff create-task "Add user authentication system" --priority high --agent backend-engineer

# Start an agent to process tasks
./staff start-agent backend-engineer

# List all tasks
./staff list-tasks

# Check agent status
./staff list-agents

How It Works

  1. Create Tasks: You create development tasks with descriptions and assign them to specialized agents
  2. Agent Processing: Agents fetch their assigned tasks and process them using OpenAI GPT-4
  3. GitHub Integration: Completed tasks automatically create pull requests in your repository
  4. Human Review: You review and merge the PRs like any normal development workflow

Available Agents

  • CEO: Strategic decisions and business direction
  • Product Manager: Requirements, user stories, specifications
  • Backend Engineer: Server-side code, APIs, databases
  • Frontend Engineer: UI/UX, client-side applications

Task Workflow

Create Task → Assign to Agent → Agent Processes → Creates PR → Human Review → Merge

Tasks are stored as markdown files in the tasks/ directory and use Git for version control.

Commands

# Task Management
./staff create-task <description> [--priority high|medium|low] [--agent <agent-name>]
./staff list-tasks [--status pending|in_progress|completed]
./staff assign-task <task-id> <agent-name>

# Agent Management  
./staff start-agent <agent-name> [--loop] [--interval 30s]
./staff list-agents
./staff stop-agent <agent-name>

# Utilities
./staff config-check
./staff --help

Project Structure

├── config.yaml              # Main configuration
├── tasks/                   # Task storage (Git-tracked)
│   ├── task-001.md         # Individual tasks
│   └── completed/          # Completed tasks
├── operations/
│   └── agents/             # Agent system prompts
│       ├── ceo/
│       ├── product-manager/
│       ├── backend-engineer/
│       └── frontend-engineer/
└── server/                 # Go backend
    ├── cmd/                # CLI commands
    ├── config/             # Configuration system
    ├── agent/              # Agent processing logic
    ├── llm/                # LLM integration
    └── git/                # Git/GitHub operations

Example Task

# Task: Add User Authentication

**ID**: task-001  
**Priority**: high  
**Agent**: backend-engineer  
**Status**: pending

## Description
Implement a complete user authentication system with:
- User registration and login
- JWT token-based authentication
- Password hashing and validation
- Basic user profile management

## Acceptance Criteria
- [ ] Users can register with email/password
- [ ] Users can login and receive JWT token
- [ ] Protected routes require valid token
- [ ] Passwords are securely hashed
- [ ] Basic user profile endpoints

GitHub Integration

When agents complete tasks, they automatically:

  1. Create a new branch: task/001-add-user-authentication
  2. Commit their solution with detailed commit message
  3. Create a pull request with:
    • Task description and solution summary
    • List of files changed
    • Agent identification

Limitations (MVP)

  • Single user only (no user management)
  • Manual task assignment
  • No PR comment handling
  • No self-learning or improvement
  • OpenAI only (no other LLM providers yet)

Troubleshooting

"API key required" error:

  • Check your config.yaml has the correct OpenAI API key
  • Or set OPENAI_API_KEY environment variable

"GitHub token invalid" error:

  • Ensure your GitHub token has repo permissions
  • Check the owner/repo settings in config

Build errors:

  • Ensure Go 1.21+ is installed: go version
  • Run go mod tidy in the server directory

Next Steps

This MVP can be extended with:

  • Multi-user support and authentication
  • Additional LLM providers (Claude, Gemini)
  • PR comment handling and iteration
  • Agent learning and improvement
  • Web UI for task management
  • Integration with project management tools

Built with ❤️ using Go + OpenAI + GitHub