{
  "overview": "AGENA is an **agentic AI platform** that autonomously generates code, creates pull requests, and manages your software development workflow. It is designed for development teams who want to accelerate delivery without sacrificing code quality.\n\n### What AGENA Does\n- **Takes a task** from your backlog (Azure DevOps, Jira, or manually created)\n- **Runs an AI agent pipeline**: PM → Developer → Reviewer → Finalizer\n- **Generates production code**, creates a branch, commits, and opens a PR\n- **Reviews its own output** with a dedicated Reviewer agent before submitting\n- **Notifies your team** via Slack, Teams, or Telegram\n- **Learns from your codebase** using vector memory for context-aware generation\n\n### Key Concepts\n| Concept | Description |\n|---------|-------------|\n| **Task** | A work item imported from Jira/Azure DevOps or created manually. Contains title, description, acceptance criteria, and context. |\n| **Agent** | An AI role (PM, Developer, Reviewer, QA, Finalizer) with its own LLM model, system prompt, and behavior. Configurable per organization. |\n| **Flow** | A visual automation pipeline (n8n-style) connecting agents, conditions, HTTP calls, and integrations into custom workflows. |\n| **Pixel Agent** | The animated visual workspace showing agents as pixel characters working on tasks in real-time. |\n| **Organization** | A multi-tenant workspace. Each org has its own integrations, team members, tasks, and billing. |\n| **Repo Mapping** | Links a GitHub/Azure DevOps repository to your org so AGENA knows where to create branches and PRs. |\n| **Playbook** | Organization-wide coding rules and conventions. Agents reference the playbook when generating code. |\n| **Sprint** | Active sprint from Azure DevOps or Jira. Tasks can be imported from the sprint and tracked on the sprint board. |\n\n### How It Works — End to End\n1. You create a task (manually, from Jira/Azure, or via ChatOps: \\",
  "signup": "### Creating Your Account\n\n1. Go to [agena.dev/signup](${SITE}/signup)\n2. Enter your email and password\n3. You will be assigned to a new organization automatically\n4. Complete the onboarding wizard to configure your first integration\n\n### After Signup\n- You are the **owner** of your organization\n- Invite team members from **Dashboard → Team**\n- Configure integrations from **Dashboard → Integrations**",
  "quickstart-saas": "### Using AGENA SaaS (agena.dev)\n\n**Step 1 — Sign up** at [agena.dev/signup](${SITE}/signup)\n\n**Step 2 — Configure Integrations** (Dashboard → Integrations)\n- **AI tab**: Add your OpenAI API key (required) and optionally Gemini\n- **Task tab**: Connect GitHub (for PR creation) and optionally Azure DevOps / Jira\n\n**Step 3 — Map a Repository** (Dashboard → Mappings)\n- Select your GitHub owner and repository\n- This tells AGENA where to create branches and PRs\n\n**Step 4 — Set Active Sprint** (Dashboard → Profile)\n- Select your Azure/Jira project, team, and sprint\n- The active sprint is auto-detected\n\n**Step 5 — Create Your First Task**\n- Go to **Dashboard → Tasks** → Create Task\n- Enter a title and description (be specific about what you want)\n- Click **Assign to AI** — AGENA will queue it, run the pipeline, and create a PR\n\n**Step 6 — Monitor Progress**\n- Watch the task status in the task list or **Office** view\n- When done, you will see the PR link",
  "quickstart-selfhost": "### Self-Hosted Deployment\n\n#### Prerequisites\n- Docker & Docker Compose\n- A server with at least 4GB RAM\n- Domain with SSL (for webhook callbacks)\n\n#### Installation\n\n\\",
  "office": "### Office — Pixel Agent Workspace\n\nThe **Office** is AGENA's visual workspace where your AI agents appear as animated pixel characters. Each agent has a desk, walks around, and visually shows what it is working on.\n\n#### What You See\n- **Agent Characters** — Each AI role (PM, Developer, Reviewer, etc.) is a pixel character at their desk\n- **Activity Indicators** — Agents glow or animate when actively processing a task\n- **Task Progress Bar** — Real-time pipeline progress: fetch → analyze → generate → review → finalize\n- **Queue Counter** — Shows how many tasks are waiting in the queue\n- **Recent Completions** — Quick access to recently finished tasks and their PR links\n\n#### Interactive Elements\n- **Click an agent** to see its current task and status\n- **Hover over desks** for quick agent info\n- **Create Task** button for quick task creation without leaving the office view\n- The office layout updates in real-time via WebSocket — no need to refresh\n\n#### When to Use Office\nThe Office is ideal for:\n- Monitoring active agent work in real-time\n- Demo/presentation mode to showcase AGENA to stakeholders\n- Quick overview of your AI workforce status\n\n#### Navigation\nDashboard → Office (first item in the Workspace section of the sidebar)",
  "tasks": "### Tasks\n\nThe task management hub for all your AI-generated work items.\n\n#### Creating Tasks\n1. **Manual**: Click \"Create Task\" → enter title + description → Assign to AI\n2. **Import from Azure DevOps**: Select project/team/sprint → Import\n3. **Import from Jira**: Select project/board/sprint → Import\n4. **ChatOps**: Send \\",
  "sprints": "### Sprint Board\n\nKanban-style board showing all tasks in your active sprint, grouped by status.\n\n#### Setup\n1. Go to **Dashboard → Profile**\n2. Select your Azure DevOps or Jira project, team, and sprint\n3. The sprint board automatically loads work items from the selected sprint\n\n#### Features\n- **Drag-and-drop** task state changes\n- **Import all sprint items** with one click\n- **Assign to AI** directly from the board\n- **Filter** by state, assignee, or work item type\n- **Real-time updates** via WebSocket",
  "sprint-performance": "### Sprint Performance\n\nAnalytics dashboard for your sprint velocity and AI agent effectiveness.\n\n#### Metrics\n- **Completion rate** — Percentage of tasks completed vs total\n- **AI success rate** — How often the AI pipeline succeeds without errors\n- **Average cycle time** — From task creation to PR merge\n- **Token efficiency** — Cost per successful task\n- **PR merge rate** — How many AI-generated PRs get merged",
  "refinement": "### Refinement\n\nAI-powered sprint refinement tool that analyzes backlog items and suggests story points.\n\n#### How It Works\n1. Select your source (Azure DevOps or Jira)\n2. Select project → team/board → sprint\n3. Click **Load Items** — shows all unestimated items\n4. Select items to analyze → Click **Run Refinement**\n5. The AI analyzes each item and provides:\n   - **Suggested story points** with confidence score\n   - **Summary** of what the item involves\n   - **Ambiguities** and **Questions** to clarify\n   - **Ready for planning** indicator\n\n#### Writeback\nAfter reviewing suggestions, click **Write Back** to update story points directly in Azure DevOps or Jira.",
  "agents": "### AI Agents\n\nConfigure the AI agents that power your pipeline.\n\n#### Default Agent Roles\n| Role | Description |\n|------|-------------|\n| **PM** | Analyzes requirements, gathers context, creates implementation plan |\n| **Developer** | Generates production code based on the plan |\n| **Reviewer** | Reviews code for quality, security, and best practices |\n| **QA** | Tests and validates the generated code |\n| **Finalizer** | Creates branches, commits, and opens pull requests |\n\n#### Configuration Per Agent\n- **Provider**: OpenAI or Gemini\n- **Model**: gpt-5, gpt-4o, gemini-2.5-pro, etc.\n- **Enabled/Disabled**: Toggle each agent on or off\n- **Create PR**: Whether this agent run should create a PR\n\n#### Custom Agent Models\nEach agent can use a different model. For example:\n- PM: gpt-4o-mini (fast, cheap for analysis)\n- Developer: gpt-5 (best quality for code generation)\n- Reviewer: gpt-4o (good balance for review)",
  "prompt-studio": "### Prompt Studio\n\nEdit and manage the system prompts used by each AI agent. All prompts are stored in the database and can be modified at runtime without redeploying.\n\n#### Features\n- **Live editing** — Changes take effect immediately\n- **Version history** — See when prompts were last modified\n- **Per-agent prompts** — Each agent role has its own prompt template\n- **Variable interpolation** — Use \\",
  "flows": "### Flow Builder\n\nVisual automation builder for creating custom AI workflows (n8n-style).\n\n#### Node Types\n| Node | Description |\n|------|-------------|\n| **Trigger** | Flow entry point |\n| **Agent** | LLM-powered analysis/generation (select model, provider, prompt) |\n| **Azure DevOps** | Create branch, create PR, complete PR, abandon PR |\n| **GitHub** | Create branch, create PR, merge PR |\n| **HTTP** | REST API calls with auth (bearer, API key, basic) |\n| **Condition** | Branch logic (eq, neq, contains, regex, etc.) |\n| **Notify** | Webhook, Slack, or email notifications |\n| **Azure Update** | Update work item state + add comment |\n\n#### Node Communication\nNodes pass data via \\",
  "templates": "### Templates\n\nReusable task and flow templates for common development patterns.\n\n#### Usage\n- Browse pre-built templates for common tasks (bug fix, feature, refactor)\n- Create your own templates from successful task configurations\n- Apply templates when creating new tasks to pre-fill description, context, and settings",
  "dora": "### DORA Metrics\n\nDevOps Research and Assessment (DORA) metrics dashboard.\n\n#### Available Views\n- **Overview** — High-level DORA summary\n- **Project** — Per-project delivery metrics\n- **Development** — Code velocity, commit frequency, PR throughput\n- **Quality** — Code review time, defect density, test coverage\n- **Bugs** — Bug tracking, resolution time, severity distribution\n- **Team** — Per-developer performance and workload balance\n\n#### Metrics Tracked\n- **Deployment Frequency** — How often code is deployed\n- **Lead Time for Changes** — Time from commit to production\n- **Change Failure Rate** — Percentage of deployments causing failures\n- **Mean Time to Recovery** — How quickly failures are resolved",
  "integrations": "### Integrations Setup\n\nConfigure external services in **Dashboard → Integrations**.\n\n#### AI Tab\n- **OpenAI** — API key + base URL (required for code generation)\n- **Gemini** — Google AI API key (optional fallback provider)\n- **Playbook** — Organization-wide coding rules and conventions. The AI agents reference these rules when generating code.\n\n#### Task Tab\n- **GitHub** — Owner + Personal Access Token (PAT) with \\",
  "repo-mapping": "### Repository Mapping\n\nRepository mapping tells AGENA which codebase to work with for each task. Without a mapping, AGENA does not know where to create branches and PRs.\n\n#### Setup\n1. Go to **Dashboard → Mappings**\n2. Click **Add Mapping**\n3. Configure the following fields:\n\n| Field | Description | Example |\n|-------|-------------|---------|\n| **Provider** | GitHub or Azure DevOps | GitHub |\n| **Owner** | GitHub org/user or Azure project | \\",
  "team-management": "### Team & Permissions\n\nManage your organization's team members and their access levels.\n\n#### Roles\n| Role | Permissions |\n|------|-------------|\n| **Owner** | Full access, billing, delete org |\n| **Admin** | Manage team, integrations, settings |\n| **Member** | Create tasks, view results, use agents |\n| **Viewer** | Read-only access to tasks and dashboards |\n\n#### Inviting Members\n1. Go to **Dashboard → Team**\n2. Click **Invite** → enter email address\n3. Select the role to assign\n4. The invitee receives an email with a signup/join link\n\n#### Permissions\nFine-grained permissions available at **Dashboard → Permissions**:\n- \\",
  "profile-settings": "### Profile & Preferences\n\nConfigure your personal workspace preferences at **Dashboard → Profile**.\n\n#### Active Sprint Selection\n- **Azure DevOps**: Select Project → Team → Sprint (active sprint auto-detected)\n- **Jira**: Select Project → Board → Sprint (active sprint auto-detected)\n\n#### Workspace Preferences\n- **Email / Web Push / In-app notifications** — Toggle per channel\n- **Daily summary email** — Get a daily digest of task activity\n- **Auto-assign new tasks** — Automatically queue imported tasks for AI\n- **Default create PR** — Whether AI tasks should create PRs by default\n- **Preferred provider & model** — Default AI model for new tasks\n\n#### Branch Naming Pattern\nChoose from presets or define a custom pattern:\n- \\",
  "chatops": "### ChatOps — Teams / Slack / Telegram\n\nControl AGENA directly from your chat platform.\n\n#### Available Commands\n| Command | Description |\n|---------|-------------|\n| \\",
  "pipeline": "### AI Agent Pipeline\n\nAGENA uses a two-layer orchestration system:\n\n#### CrewAI — Agent Roles\nEach agent has a specific role, model, and system prompt:\n- **PM Agent**: Analyzes the task, gathers codebase context, creates a detailed implementation plan\n- **Developer Agent**: Generates production code following the plan and repo conventions\n- **Reviewer Agent**: Reviews generated code for bugs, security issues, and best practices\n- **Finalizer Agent**: Creates a git branch, commits code, and opens a pull request\n\n#### LangGraph — Execution Pipeline\n\\",
  "services": "### Service Architecture\n\nAGENA is a monorepo with 6 pip-installable Python packages:\n\n| Package | Description |\n|---------|-------------|\n| \\",
  "selfhost-deploy": "### Self-Hosted Deployment\n\n#### Docker Compose Services\n\\",
  "admin-panel": "### Platform Admin Panel\n\nThe admin panel is the super-admin interface for managing the entire AGENA platform across all organizations. It is accessible at **Dashboard → Admin**.\n\n#### Who Can Access\nOnly users with \\",
  "admin-orgs": "### Managing Organizations\n\n#### Viewing Organizations\nNavigate to **Admin → Organizations** tab to see all registered organizations.\n\nEach org card shows:\n- **Organization name** and ID\n- **Member count** — How many users belong to this org\n- **Task count** — Total tasks created by this org\n- **Created date** — When the org was registered\n- **Owner** — The org owner's email\n\n#### Multi-Tenancy\nAGENA is fully multi-tenant. Each organization is completely isolated:\n- **Separate data** — Tasks, flows, agents, integrations are org-scoped\n- **Separate billing** — Each org has its own subscription plan\n- **Separate integrations** — Each org connects their own GitHub, Jira, Slack, etc.\n- **No cross-org visibility** — Users in Org A cannot see anything from Org B\n\n#### Common Admin Tasks\n- **Investigate issues** — If a user reports a problem, find their org and check task logs\n- **Monitor growth** — Track new org signups and active tenant count\n- **Identify abuse** — Spot orgs with unusually high task counts or API usage",
  "admin-users": "### Managing Users\n\n#### Viewing Users\nNavigate to **Admin → Users** tab to see all registered users across the entire platform.\n\nEach user entry shows:\n- **Full name** and email address\n- **Organization** they belong to\n- **Role** within their organization (owner, admin, member, viewer)\n- **Platform admin flag** — Whether they have platform admin access\n- **Last login** — When they last authenticated\n\n#### User Lifecycle\n1. User signs up at \\",
  "auth-api": "### Authentication API\n\n\\",
  "tasks-api": "### Tasks API\n\n\\",
  "flows-api": "### Flows API\n\n\\",
  "integrations-api": "### Integrations API\n\n\\",
  "sdk-install": "### Installation\n\nInstall the AGENA SDK via npm:\n\n\\`\\`\\`bash\nnpm install @agena/sdk\n\\`\\`\\`\n\nOr with yarn:\n\n\\`\\`\\`bash\nyarn add @agena/sdk\n\\`\\`\\`\n\n#### Requirements\n- Node.js 18+ or any environment with `fetch` support\n- An AGENA account with an API token\n\n#### Getting Your API Token\n1. Log in to your AGENA dashboard\n2. Go to **Profile & Preferences**\n3. Copy your API token\n\nOr use the SDK to login programmatically:\n\n\\`\\`\\`typescript\nconst { access_token } = await AgenaClient.auth.login(\n  'https://api.agena.dev',\n  'you@email.com',\n  'your-password'\n);\n\\`\\`\\`",
  "sdk-quickstart": "### Quick Start\n\n\\`\\`\\`typescript\nimport { AgenaClient } from '@agena/sdk';\n\n// Initialize the client\nconst agena = new AgenaClient({\n  apiKey: 'your-token-here',\n});\n\n// Create a task — AI agents will generate code and open a PR\nconst task = await agena.tasks.create({\n  title: 'Add user avatar upload',\n  description: 'Allow users to upload and crop a profile avatar image',\n});\n\nconsole.log('Task created:', task.id, task.status);\n\n// Poll for completion\nconst interval = setInterval(async () => {\n  const updated = await agena.tasks.get(task.id);\n  console.log('Status:', updated.status);\n\n  if (updated.status === 'completed') {\n    console.log('PR ready:', updated.pr_url);\n    clearInterval(interval);\n  }\n}, 5000);\n\\`\\`\\`\n\n#### Running a Flow\n\n\\`\\`\\`typescript\n// Execute a visual automation flow\nconst run = await agena.flows.run({ flow_id: 1 });\n\n// Check the result\nconst result = await agena.flows.getRun(run.id);\nconsole.log('Steps:', result.steps.map(s => s.status));\n\\`\\`\\`\n\n#### Monitoring Agents\n\n\\`\\`\\`typescript\n// Watch AI agents work in real-time\nconst live = await agena.agents.liveStatus(task.id);\nlive.agents.forEach(agent => {\n  console.log(agent.role, '→', agent.status);\n});\n// PM → completed\n// Developer → running\n// Reviewer → pending\n\\`\\`\\`",
  "multi-repo": "### Multi-Repository Orchestration\n\nAGENA supports **multi-repo orchestration** — a single task can target multiple repositories simultaneously. Instead of creating separate tasks for each repo, you describe the change once and AGENA runs independent agent pipelines for each repository, producing separate pull requests.\n\n#### What Is Multi-Repo?\nIn real-world projects, a single feature or bug fix often spans multiple codebases — a backend API, a frontend app, a shared library, or infrastructure config. Multi-repo orchestration lets you assign one task to all affected repositories at once.\n\n#### How to Set It Up\n1. **Add repository mappings** — Go to **Dashboard → Mappings** and add each repository you want AGENA to work with (GitHub or Azure DevOps).\n2. **Select multiple repos when creating a task** — When you create or assign a task, select two or more mapped repositories as targets.\n3. **AGENA handles the rest** — Each selected repository gets its own independent pipeline execution.\n\n#### How It Works\n- Each repository runs its own **full agent pipeline** (PM → Developer → Reviewer → Finalizer)\n- Each pipeline has **independent context** — the PM agent fetches the specific repo's codebase, conventions, and file structure\n- Each repository gets its **own branch and pull request**\n- All pipelines run in **parallel** for maximum speed\n- The task dashboard shows **per-repo status** so you can track progress for each repository independently\n\n#### Example Use Case\n**Task**: *\"Add rate limiting to the login endpoint\"*\n\n| Repository | What AGENA Does |\n|------------|----------------|\n| `backend-api` | Adds rate limiting middleware, updates login route, adds Redis counter logic |\n| `frontend-app` | Adds retry logic with exponential backoff, displays rate limit error message to users |\n| `shared-types` | Adds `RateLimitError` type definition to shared error types |\n\nResult: 3 separate PRs, one per repo, all from a single task.\n\n#### Best Practices\n- **Be specific in your task description** — mention which aspects apply to which repos when possible\n- **Use a playbook** — organization-wide coding rules help agents maintain consistency across repos\n- **Review PRs together** — since all PRs relate to the same task, review and merge them as a group",
  "task-dependencies": "### Task Dependencies\n\nAGENA supports **task dependencies** — define execution order between tasks so they run in the correct sequence automatically. When a dependency completes, the next task in the chain auto-queues and starts without manual intervention.\n\n#### What Are Task Dependencies?\nIn complex projects, tasks often have natural ordering requirements. A database migration must complete before the backend API update. The frontend update depends on the new API endpoints being ready. E2E tests should only run after all code changes are deployed. Task dependencies let you express these relationships explicitly.\n\n#### How to Set Dependencies\n1. **At creation time** — When creating a new task, select one or more existing tasks as dependencies in the \"Depends On\" field.\n2. **From the task detail page** — Open any task and add dependencies in the Dependencies section.\n3. **From the assign popup** — When assigning a task, you can also set its dependencies.\n\n#### How It Works\n- The **worker checks dependencies** before executing any task — if blockers are incomplete, the task stays in `waiting` status\n- When a blocking task completes, all dependent tasks are **automatically re-evaluated**\n- Tasks whose dependencies are now satisfied get **auto-queued** and start execution\n- The dependency chain can be as long as needed: Task A → Task B → Task C → Task D\n- **Cycle detection** runs when you add a dependency — circular chains (A → B → C → A) are rejected with a clear error message\n\n#### Visual Dependency Flow\nThe task dashboard shows a visual representation of dependency chains:\n- **Green** (done) — Task completed successfully\n- **Yellow** (running) — Task is currently being processed by AI agents\n- **Gray** (waiting) — Task is waiting for its dependencies to complete\n- Arrows between tasks show the execution flow direction\n\n#### Example\n```\n#31 DB Migration        ✓ done\n     ↓\n#32 Backend API Update  ✓ done\n     ↓\n#33 Frontend Update     ⟳ running\n     ↓\n#34 E2E Tests           ⏳ waiting\n```\nIn this example, #33 was auto-queued after #32 completed. #34 will auto-queue once #33 finishes.\n\n#### Best Practices\n- **Keep chains focused** — dependencies work best for naturally sequential work within the same feature\n- **Use with multi-repo** — combine dependencies with multi-repo orchestration for complex cross-repo workflows\n- **Check the visual flow** — use the dependency visualization to verify your execution order before starting the chain",
  "sdk-reference": "### API Reference\n\n#### AgenaClient\n\n| Method | Description |\n|--------|-------------|\n| `new AgenaClient({ apiKey, baseUrl?, timeout? })` | Create a client instance |\n| `AgenaClient.auth.login(baseUrl, email, password)` | Static: login and get token |\n\n#### Tasks\n\n| Method | Description |\n|--------|-------------|\n| `agena.tasks.create(params)` | Create a new AI task |\n| `agena.tasks.get(id)` | Get task by ID |\n| `agena.tasks.list({ status?, page?, per_page? })` | List tasks |\n| `agena.tasks.cancel(id)` | Cancel a running task |\n| `agena.tasks.rerun(id)` | Rerun a completed/failed task |\n\n#### Flows\n\n| Method | Description |\n|--------|-------------|\n| `agena.flows.run({ flow_id, context? })` | Execute a flow |\n| `agena.flows.getRun(runId)` | Get flow run details |\n| `agena.flows.listRuns()` | List recent runs |\n| `agena.flows.listTemplates()` | List flow templates |\n\n#### Agents\n\n| Method | Description |\n|--------|-------------|\n| `agena.agents.run({ task_id })` | Run agents on a task |\n| `agena.agents.liveStatus(taskId)` | Get live agent status |\n\n#### Integrations\n\n| Method | Description |\n|--------|-------------|\n| `agena.integrations.list()` | List all integrations |\n| `agena.integrations.get(provider)` | Get specific integration |\n| `agena.integrations.githubRepos()` | List GitHub repos |\n| `agena.integrations.githubBranches(owner, repo)` | List branches |\n\n#### Error Handling\n\nAll methods throw `AgenaApiError` on failure:\n\n\\`\\`\\`typescript\ntry {\n  await agena.tasks.get(999);\n} catch (err) {\n  if (err.name === 'AgenaApiError') {\n    console.error(err.status, err.detail);\n  }\n}\n\\`\\`\\`"
}