Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions docs/capabilities/analytics.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
title: "Agent Analytics"
sidebarTitle: "Analytics"
icon: "chart-line"
---

Get comprehensive insights into your agent activity with detailed analytics on tool usage, costs, performance, and team productivity. Codegen provides fine-grained visibility into how agents are working across your organization.

## Key Metrics

Track the metrics that matter most for your development workflow:

- **Pull Request Analytics** - Monitor code merged, review velocity, and contributor activity
- **Agent Tool Usage** - See which tools agents use most frequently and their success rates
- **Cost Analysis** - Track spending across different models, agents, and time periods
- **Performance Insights** - Analyze agent response times and task completion rates
- **Team Activity** - Understand how different team members interact with agents

## Features

### Pull Request Tracking

- **Merge velocity** - Track how quickly PRs are created and merged
- **Author activity** - See contributor patterns and productivity trends
- **Status monitoring** - Monitor PR states and resolution times

### Detailed Filtering

- **Date range selection** - Analyze data over custom time periods
- **User-specific views** - Filter by individual team members
- **Status filtering** - Focus on specific PR states or outcomes
- **Interactive charts** - Explore data with dynamic visualizations

### Real-time Insights

- **Live dashboards** - Get up-to-date metrics on agent activity
- **Trend analysis** - Identify patterns in agent usage and effectiveness
- **Cost optimization** - Make informed decisions about model selection and usage

## Access Analytics

View your organization's analytics dashboard to get started:

<Card
title="View Analytics Dashboard"
icon="chart-line"
href="https://codegen.com/analytics"
>
Access detailed analytics on agent performance, costs, and team productivity.
</Card>

## Use Cases

**Performance Optimization**

- Identify which agents and tools provide the best ROI
- Optimize model selection based on cost and performance data
- Track improvement in development velocity over time

**Team Insights**

- Understand how different team members leverage AI assistance
- Identify opportunities for increased agent adoption
- Monitor the impact of agents on overall productivity

**Cost Management**

- Track spending across different LLM providers and models
- Identify high-cost operations and optimize usage patterns
- Budget and forecast AI assistance costs

<Tip>
Use analytics to continuously optimize your agent workflows and demonstrate
the value of AI assistance to your organization.
</Tip>
115 changes: 115 additions & 0 deletions docs/capabilities/checks-autofixer.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
---
title: "Check Suite Auto-fixer"
sidebarTitle: "Checks Auto-fixer"
icon: "bell"
---

When GitHub checks fail on a Codegen PR, Codegen agents will automatically "wake up", analyze the failure, and push fix commit.

<video
controls
src="https://res.cloudinary.com/dbikr6pew/video/upload/v1757875834/4-fixing-checks_aagrki.mp4"
className="w-full aspect-[3456/2160] rounded-sm"
/>

This intelligent system monitors CI status and proactively resolves issues without manual intervention.

<Card
title="Configure Check Suite Auto-fixer"
icon="rocket"
href="https://codegen.com/settings/checks-autofixer"
>
Configure globally at the organization level or customize settings per
repository. Enterprise plans can adjust retry limits for optimal performance.
</Card>

<Tip>
Codegen will try to fix broken checks 3 times before "tapping out" by default.
Enterprise customers can customize the retry count per check or per
repository.
</Tip>

## How Checks Auto-Fixer Works

Codegen continuously monitors your pull requests and automatically responds to check failures:

- **Automatic Detection:** Monitors GitHub check runs and CI status in real-time
- **Intelligent Analysis:** Analyzes build logs, test failures, and error messages to understand root causes
- **Targeted Fixes:** Generates specific code changes to resolve the identified issues
- **Persistent Retry:** Will attempt to fix issues up to 3 times per PR

## What Triggers Auto-Fixing

Check auto-fixing activates when:

- **CI Checks Fail:** Any GitHub check run reports a failure status
- **Build Errors:** Compilation, linting, or build process failures
- **Test Failures:** Unit tests, integration tests, or automated test suites fail
- **Code Quality Issues:** Static analysis tools report violations or warnings

## The Auto-Fix Process

When Codegen auto-fixes a failing PR, it follows this process:

1. **Detect Failure:** Monitor check status and identify when builds break
2. **Analyze Logs:** Grep through CI logs to understand specific failure points
3. **Generate Solution:** Create targeted code changes to resolve identified issues
4. **Apply Fix:** Automatically commit fixes to the same PR branch
5. **Re-validate:** Monitor the new check run to ensure the fix was successful

## Retry Logic

Codegen implements intelligent retry behavior:

- **Default: 3 attempts** per PR to resolve failing checks
- **Enterprise customization** - Enterprise customers can configure retry limits:
- Set global defaults at the organization level
- Override per repository in repository settings
- Customize retry counts per individual check type
- **Progressive analysis** - each retry incorporates learnings from previous attempts
- **Failure escalation** - when retry limit is reached, the issue is flagged for human review

## Configuration Options

The Checks Auto-Fixer can be configured at multiple levels:

### Organization Level

- **Global settings** - Configure default behavior for all repositories
- **Available to all plans** - Enable/disable the feature organization-wide
- **Access via** - Organization Settings → Checks Auto-Fixer

### Repository Level

- **Per-repo overrides** - Customize settings for specific repositories
- **Individual check control** - Enable/disable monitoring per check type
- **Custom instructions** - Provide specific guidance for handling each check
- **Access via** - Repository Settings → Checks Auto-Fixer

### Enterprise Features

- **Custom retry limits** - Set retry counts globally, per repository, or per check type
- **Advanced monitoring** - Granular control over which checks to monitor
- **Priority handling** - Configure high-priority checks for immediate processing

## GitHub Integration

The auto-fix system integrates deeply with GitHub:

- **Check Run Annotations:** Creates detailed feedback with line-specific suggestions
- **PR Comments:** Adds contextual suggestions and explanations
- **Auto-Fix Actions:** Provides one-click fix buttons in the GitHub UI
- **Status Updates:** Real-time updates on fix progress and results

<Note>
Checks Auto-Fixer only activates for repositories where Codegen has write
access and the feature is enabled. It respects your repository permissions and
team workflows.
</Note>

## Benefits

- **Reduced Context Switching:** No need to manually investigate and fix CI failures
- **Faster Iteration:** PRs get fixed automatically, keeping development velocity high
- **Learning from Failures:** Each fix improves Codegen's understanding of your codebase
- **24/7 Monitoring:** Works around the clock to keep your PRs in good shape
53 changes: 53 additions & 0 deletions docs/capabilities/pr-review.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
title: "PR Review Agent"
sidebarTitle: "PR Review"
icon: "eye"
---

Codegen provides a configurable AI code review feature similar to CodeRabbit, Graphite, or Greptile as a first-class feature.

<Card
title="Configure PR Reviews"
icon="eye"
href="https://codegen.com/settings/review"
>
Set up PR review at the organization level, then customize per repository.
</Card>

## How It Works

When you open a PR or push new commits, Codegen agents analyze the changes and provide:

- **Inline comments** on specific lines with actionable feedback
- **Security scanning** for vulnerabilities and unsafe patterns
- **Code quality** suggestions for maintainability and best practices
- **Architectural feedback** on design patterns and structure

## Configuration

Configure PR reviews at two levels:

### Organization Settings

Set global defaults and organization-wide review rules at [Organization Settings → PR Review](https://codegen.com/settings/review).

### Repository Settings

Override settings and add repository-specific rules at **Repository Settings → Review**.

Repository rules are combined with organization rules for comprehensive coverage. You can:

- Enable/disable PR reviews for the repository
- Add custom review guidelines specific to the codebase
- Define language-specific requirements
- Set repository-specific coding standards

<Tip>
Start with organization-level settings, then customize individual repositories
as needed.
</Tip>

<Note>
PR reviews require read access to your repository. Enable the feature at both
organization and repository levels to activate reviews.
</Note>
67 changes: 0 additions & 67 deletions docs/capabilities/wake-up.mdx

This file was deleted.

35 changes: 24 additions & 11 deletions docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
"group": "Overview",
"pages": [
"introduction/overview",
"introduction/api",
"introduction/cli",
"introduction/prompting",
"introduction/community",
"introduction/about",
Expand All @@ -27,23 +25,42 @@
},
{
"group": "Capabilities",
"pages": ["capabilities/capabilities", "capabilities/wake-up"]
"pages": [
"capabilities/capabilities",
"capabilities/checks-autofixer",
"capabilities/pr-review",
"capabilities/analytics",
"introduction/cli",
"introduction/sdk"
]
},
{
"group": "Settings",
"pages": [
"settings/settings",
"settings/repo-rules",
"settings/model-configuration",
"settings/agent-behavior",
"settings/agent-permissions"
]
},
{
"group": "Integrations",
"pages": [
"integrations/integrations",
"integrations/github",
"integrations/slack",
"integrations/linear",
"integrations/notion",
"integrations/figma",
"integrations/jira",
"integrations/clickup",
"integrations/monday",
"integrations/sentry",
"integrations/circleci",
"integrations/web-search",
"integrations/postgres",
{
"group": "integrations/mcp",
"name": "Remote MCP Server"
}
"integrations/mcp-servers"
]
},
{
Expand All @@ -56,10 +73,6 @@
"sandboxes/editor",
"sandboxes/web-preview"
]
},
{
"group": "Settings",
"pages": ["settings/repo-rules", "settings/model-configuration"]
}
]
},
Expand Down
Loading