# Retrieving Traces Source: https://docs.codegen.com/api-reference/agent-run-logs The Agent Run Logs API allows you to retrieve detailed execution logs for agent runs, providing insights into the agent's thought process, tool usage, and execution flow. ## Endpoint ``` GET /v1/organizations/{org_id}/agent/run/{agent_run_id}/logs ``` ## Authentication This endpoint requires API token authentication. Include your token in the Authorization header: ```bash Authorization: Bearer YOUR_API_TOKEN ``` ## Parameters | Parameter | Type | Required | Description | | -------------- | ------- | -------- | --------------------------------------------------------- | | `org_id` | integer | Yes | Your organization ID | | `agent_run_id` | integer | Yes | The ID of the agent run to retrieve logs for | | `skip` | integer | No | Number of logs to skip for pagination (default: 0) | | `limit` | integer | No | Maximum number of logs to return (default: 100, max: 100) | ## Response Structure The endpoint returns an `AgentRunWithLogsResponse` object containing the agent run details and paginated logs: ```json { "id": 12345, "organization_id": 67890, "status": "completed", "created_at": "2024-01-15T10:30:00Z", "web_url": "https://app.codegen.com/agent/trace/12345", "result": "Task completed successfully", "logs": [ { "agent_run_id": 12345, "created_at": "2024-01-15T10:30:15Z", "tool_name": "ripgrep_search", "message_type": "ACTION", "thought": "I need to search for the user's function in the codebase", "observation": { "status": "success", "results": ["Found 3 matches..."] }, "tool_input": { "query": "function getUserData", "file_extensions": [".js", ".ts"] }, "tool_output": { "matches": 3, "files": ["src/user.js", "src/api.ts"] } } ], "total_logs": 25, "page": 1, "size": 100, "pages": 1 } ``` ## Agent Run Log Fields Each log entry in the `logs` array contains the following fields: ### Core Fields | Field | Type | Description | | -------------- | ------- | --------------------------------------------------------- | | `agent_run_id` | integer | The ID of the agent run this log belongs to | | `created_at` | string | ISO 8601 timestamp when the log entry was created | | `message_type` | string | The type of log entry (see [Log Types](#log-types) below) | ### Agent Reasoning Fields | Field | Type | Description | | --------- | -------------- | --------------------------------------------------------------- | | `thought` | string \| null | The agent's internal reasoning or thought process for this step | ### Tool Execution Fields | Field | Type | Description | | ------------- | ------------------------ | ------------------------------------------------------------------------------ | | `tool_name` | string \| null | Name of the tool being executed (e.g., "ripgrep\_search", "file\_write") | | `tool_input` | object \| null | JSON object containing the parameters passed to the tool | | `tool_output` | object \| null | JSON object containing the tool's execution results | | `observation` | object \| string \| null | The agent's observation of the tool execution results or other contextual data | ## Log Types The `message_type` field indicates the type of log entry. Here are the possible values: ### Plan Agent Types | Type | Description | | --------------------------- | ------------------------------------------------------------------- | | `ACTION` | The agent is executing a tool or taking an action | | `PLAN_EVALUATION` | The agent is evaluating or updating its plan | | `FINAL_ANSWER` | The agent is providing its final response or conclusion | | `ERROR` | An error occurred during execution | | `USER_MESSAGE` | A message from the user (e.g., interruptions or additional context) | | `USER_GITHUB_ISSUE_COMMENT` | A comment from a GitHub issue that the agent is processing | ### PR Agent Types | Type | Description | | ----------------------- | -------------------------------------------------- | | `INITIAL_PR_GENERATION` | The agent is generating the initial pull request | | `DETECT_PR_ERRORS` | The agent is detecting errors in a pull request | | `FIX_PR_ERRORS` | The agent is fixing errors found in a pull request | | `PR_CREATION_FAILED` | Pull request creation failed | | `PR_EVALUATION` | The agent is evaluating a pull request | ### Commit Agent Types | Type | Description | | ------------------- | ------------------------------- | | `COMMIT_EVALUATION` | The agent is evaluating commits | ### Link Types | Type | Description | | ---------------- | ----------------------------------- | | `AGENT_RUN_LINK` | A link to another related agent run | ## Field Population Patterns Different log types populate different fields: ### ACTION Logs * Always have: `tool_name`, `tool_input`, `tool_output` * Often have: `thought`, `observation` * Example: Tool executions like searching code, editing files, creating PRs ### PLAN\_EVALUATION Logs * Always have: `thought` * May have: `observation` * Rarely have: Tool-related fields * Example: Agent reasoning about next steps ### ERROR Logs * Always have: `observation` (containing error details) * May have: `tool_name` (if error occurred during tool execution) * Example: Failed tool executions or system errors ### FINAL\_ANSWER Logs * Always have: `observation` (containing the final response) * May have: `thought` * Example: Agent's final response to the user ## Usage Examples ### Basic Log Retrieval ```python import requests url = "https://api.codegen.com/v1/organizations/67890/agent/run/12345/logs" headers = {"Authorization": "Bearer YOUR_API_TOKEN"} response = requests.get(url, headers=headers) data = response.json() print(f"Agent run status: {data['status']}") print(f"Total logs: {data['total_logs']}") for log in data['logs']: print(f"[{log['created_at']}] {log['message_type']}: {log['thought']}") ``` ### Filtering by Log Type ```python # Get only ACTION logs to see tool executions action_logs = [log for log in data['logs'] if log['message_type'] == 'ACTION'] for log in action_logs: print(f"Tool: {log['tool_name']}") print(f"Input: {log['tool_input']}") print(f"Output: {log['tool_output']}") print("---") ``` ### Pagination Example ```python # Get logs in batches of 50 skip = 0 limit = 50 all_logs = [] while True: url = f"https://api.codegen.com/v1/organizations/67890/agent/run/12345/logs?skip={skip}&limit={limit}" response = requests.get(url, headers=headers) data = response.json() all_logs.extend(data['logs']) if len(data['logs']) < limit: break # No more logs skip += limit print(f"Retrieved {len(all_logs)} total logs") ``` ### Debugging Failed Runs ```python # Find error logs to debug issues error_logs = [log for log in data['logs'] if log['message_type'] == 'ERROR'] for error_log in error_logs: print(f"Error at {error_log['created_at']}: {error_log['observation']}") if error_log['tool_name']: print(f"Failed tool: {error_log['tool_name']}") ``` ## Common Use Cases ### 1. Building Monitoring Dashboards Use the logs to create dashboards showing: * Agent execution progress * Tool usage patterns * Error rates and types * Execution timelines ### 2. Debugging Agent Behavior Analyze logs to understand: * Why an agent made certain decisions * Where errors occurred in the execution flow * What tools were used and their results ### 3. Audit and Compliance Track agent actions for: * Code change auditing * Compliance reporting * Security monitoring ### 4. Performance Analysis Monitor: * Tool execution times * Common failure patterns * Agent reasoning efficiency ## Rate Limits * **60 requests per 60 seconds** per API token * Rate limits are shared across all API endpoints ## Error Responses | Status Code | Description | | ----------- | ------------------------------------------- | | 400 | Bad Request - Invalid parameters | | 401 | Unauthorized - Invalid or missing API token | | 403 | Forbidden - Insufficient permissions | | 404 | Not Found - Agent run not found | | 429 | Too Many Requests - Rate limit exceeded | ## Feedback and Support Since this endpoint is in ALPHA, we'd love your feedback! Please reach out through: * [Community Slack](https://join.slack.com/t/codegen-community/shared_invite/zt-2p4xjjzjx-1~3tTbJWZWQUYOLAhvG5rA) * [GitHub Issues](https://github.com/codegen-sh/codegen-sdk/issues) * Email: [support@codegen.com](mailto:support@codegen.com) The structure and fields of this API may change as we gather feedback and improve the service. We'll provide advance notice of any breaking changes. # Get Agent Run Logs Source: https://docs.codegen.com/api-reference/agents-alpha/get-agent-run-logs api-reference/openapi3.json get /v1/alpha/organizations/{org_id}/agent/run/{agent_run_id}/logs Retrieve an agent run with its logs using pagination. This endpoint is currently in ALPHA and IS subject to change. Returns the agent run details along with a paginated list of logs for the specified agent run. The agent run must belong to the specified organization. Logs are returned in chronological order. Uses standard pagination parameters (skip and limit) and includes pagination metadata in the response. Rate limit: 60 requests per 60 seconds. # Ban All Checks For Agent Run Source: https://docs.codegen.com/api-reference/agents/ban-all-checks-for-agent-run api-reference/openapi3.json post /v1/organizations/{org_id}/agent/run/ban Ban all checks for a PR and stop all related agents. This endpoint: 1. Flags the PR to prevent future CI/CD check suite events from being processed 2. Stops all current agents for that PR # Create Agent Run Source: https://docs.codegen.com/api-reference/agents/create-agent-run api-reference/openapi3.json post /v1/organizations/{org_id}/agent/run Create a new agent run. Creates and initiates a long-running agent process based on the provided prompt. The process will complete asynchronously, and the response contains the agent run ID which can be used to check the status later. The requesting user must be a member of the specified organization. This endpoint accepts both a text prompt and an optional image file upload. Rate limit: 10 requests per minute. # Get Agent Run Source: https://docs.codegen.com/api-reference/agents/get-agent-run api-reference/openapi3.json get /v1/organizations/{org_id}/agent/run/{agent_run_id} Retrieve the status and result of an agent run. Returns the current status, progress, and any available results for the specified agent run. The agent run must belong to the specified organization. If the agent run is still in progress, this endpoint can be polled to check for completion. Rate limit: 60 requests per 30 seconds. # List Agent Runs Source: https://docs.codegen.com/api-reference/agents/list-agent-runs api-reference/openapi3.json get /v1/organizations/{org_id}/agent/runs List agent runs for an organization with optional user filtering. Returns a paginated list of agent runs for the specified organization. Optionally filter by user_id to get only agent runs initiated by a specific user. Results are ordered by creation date (newest first). Rate limit: 60 requests per 30 seconds. # Remove Codegen From Pr Source: https://docs.codegen.com/api-reference/agents/remove-codegen-from-pr api-reference/openapi3.json post /v1/organizations/{org_id}/agent/run/remove-from-pr Remove Codegen from a PR. This endpoint performs the same action as banning all checks but with more user-friendly naming. It: 1. Flags the PR to prevent future CI/CD check suite events from being processed 2. Stops all current agents for that PR # Resume Agent Run Source: https://docs.codegen.com/api-reference/agents/resume-agent-run api-reference/openapi3.json post /v1/organizations/{org_id}/agent/run/resume Resume a paused agent run. Resumes a paused agent run, allowing it to continue processing. Note: Setup commands agents are automatically routed to their dedicated resume function. # Unban All Checks For Agent Run Source: https://docs.codegen.com/api-reference/agents/unban-all-checks-for-agent-run api-reference/openapi3.json post /v1/organizations/{org_id}/agent/run/unban Unban all checks for a PR. This endpoint: 1. Removes the ban flag from the PR to allow future CI/CD check suite events to be processed 2. Handles both URL-based bans and parent-agent-run-based bans # Authentication Source: https://docs.codegen.com/api-reference/authentication All Codegen API endpoints require authentication using Bearer tokens. You'll need both an API token and your organization ID to get started. ## Get Your Credentials Visit the developer settings to generate your API token and find your organization ID. ## Required Information ### API Token Your personal API token authenticates all requests to the Codegen API. This token is tied to your user account and inherits your permissions within organizations. ### Organization ID Most API endpoints require an organization ID to specify which organization's resources you want to access. You can find your organization ID in the developer settings. ## Using Your Credentials ### REST API Include your API token in the Authorization header for all requests: ```bash curl -H "Authorization: Bearer YOUR_API_TOKEN" \ "https://api.codegen.com/v1/organizations/YOUR_ORG_ID/agent/run" ``` ### Python SDK The Python SDK makes authentication simple: ```python from codegen import Agent # Initialize with your credentials agent = Agent(org_id="YOUR_ORG_ID", token="YOUR_API_TOKEN") # The SDK handles authentication automatically task = agent.run(prompt="Fix the bug in user authentication") ``` # Get Cli Rules Source: https://docs.codegen.com/api-reference/cli-rules/get-cli-rules api-reference/openapi3.json get /v1/organizations/{org_id}/cli/rules Get organization and user rules for CLI applications. This endpoint is designed for CLI applications that need to fetch both organization-specific rules and user-specific custom prompts that are used in prompts. This includes: - Organization rules: Same as MCP organization_rules prompt and agent prompt builders - User custom prompt: Same as MCP user_custom_prompt and agent prompt builders Returns the rules and prompts that should be followed by AI agents. Rate limit: 30 requests per minute. # Get Organization Integrations Endpoint Source: https://docs.codegen.com/api-reference/integrations/get-organization-integrations-endpoint api-reference/openapi3.json get /v1/organizations/{org_id}/integrations Get all integration statuses for the given organization. Returns a comprehensive overview of all integrations configured for the organization, including: - OAuth-based integrations (Slack, Linear, Notion, Figma, ClickUp, Jira, Sentry, Monday.com) - GitHub app installations - API key-based integrations (CircleCI) - Database connections (PostgreSQL) Each integration includes its current status (active/inactive), associated token/installation IDs, and relevant metadata such as app names, organization names, etc. Rate limit: 60 requests per 30 seconds. # Get Mcp Providers Source: https://docs.codegen.com/api-reference/organizations/get-mcp-providers api-reference/openapi3.json get /v1/mcp-providers Get all MCP providers from oauth_providers table. Returns only providers with is_mcp=True. # Get Oauth Token Status Source: https://docs.codegen.com/api-reference/organizations/get-oauth-token-status api-reference/openapi3.json get /v1/oauth/tokens/status Get list of providers that have active OAuth tokens for the current user and organization. Returns a list of provider names that are connected. # Get Organizations Source: https://docs.codegen.com/api-reference/organizations/get-organizations api-reference/openapi3.json get /v1/organizations Get organizations for the authenticated user. Returns a paginated list of all organizations that the authenticated user is a member of. Results include basic organization details such as name, ID, and membership information. Use pagination parameters to control the number of results returned. Rate limit: 60 requests per 30 seconds. # Revoke Oauth Token Source: https://docs.codegen.com/api-reference/organizations/revoke-oauth-token api-reference/openapi3.json post /v1/oauth/tokens/revoke Revoke/disconnect an OAuth token for a specific provider. Marks ALL tokens as inactive (is_active=False) for the current user and organization. # Codegen API Source: https://docs.codegen.com/api-reference/overview The Codegen API provides programmatic access to create and manage AI agents, enabling you to integrate Codegen's capabilities into your own applications and workflows. ## What You Can Do **[Create and manage AI agents](/api-reference/agents/create-agent-run)** that can write code, fix bugs, and handle development tasks across your repositories with full programmatic control over their execution and monitoring. **[Access your organization data](/api-reference/organizations/get-organizations)** including users, repositories, integrations, and **[programmatically retrieve detailed agent traces](/api-reference/agent-run-logs)** for analysis and debugging. All agents created through the API are fully configurable and viewable in the Codegen web UI at codegen.com, allowing seamless integration between programmatic and manual workflows. Not seeing a capability you want? Get in touch! Join our [community Slack](https://community.codegen.com) or email us at [support@codegen.com](mailto:support@codegen.com). ## Authentication All API endpoints require authentication using Bearer tokens and your organization ID. Get your API token and organization ID to start using the Codegen API. ## Rate Limits The API includes rate limiting to ensure fair usage: * **Standard endpoints**: 60 requests per 30 seconds * **Agent creation**: 10 requests per minute * **Setup commands**: 5 requests per minute * **Log analysis**: 5 requests per minute ## Getting Started ### 1. Create Your First Agent Run ```bash curl -X POST "https://api.codegen.com/v1/organizations/{org_id}/agent/run" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Add error handling to the user authentication function", "repo_id": 123 }' ``` ### 2. Check Agent Status ```bash curl "https://api.codegen.com/v1/organizations/{org_id}/agent/run/{agent_run_id}" \ -H "Authorization: Bearer YOUR_API_KEY" ``` ### 3. Resume with Follow-up ```bash curl -X POST "https://api.codegen.com/v1/organizations/{org_id}/agent/run/resume" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "agent_run_id": 456, "prompt": "Also add unit tests for the error handling" }' ``` ## Use Cases **Automated Workflows** * Trigger agents from CI/CD pipelines when builds fail * Create agents in response to issue tracking system events * Automate code reviews and quality checks **Custom Integrations** * Build Codegen into your existing development tools * Create custom dashboards for agent activity * Integrate with internal systems and workflows **Batch Operations** * Process multiple repositories with consistent changes * Generate setup commands for new projects * Analyze logs across multiple sandbox environments ## Explore the API Explore all available endpoints with detailed schemas and examples. Learn how to retrieve and analyze detailed agent execution logs. ## SDKs and Tools For easier integration, we recommend using our Python SDK which provides a simple wrapper around the API: Use the Codegen Python SDK for a pythonic interface to create and manage agents programmatically. **Also available:** * **[CLI Tool](/introduction/cli)** - Command-line interface for common API operations The API is RESTful and returns JSON responses. All endpoints support standard HTTP status codes and include detailed error messages for troubleshooting. # Edit Pull Request Source: https://docs.codegen.com/api-reference/pull-requests/edit-pull-request api-reference/openapi3.json patch /v1/organizations/{org_id}/repos/{repo_id}/prs/{pr_id} Edit pull request properties (RESTful endpoint). Update the state of a pull request (open, closed, draft, ready_for_review). This endpoint requires both repo_id and pr_id for RESTful compliance. The requesting user must have write permissions to the repository. Rate limit: 30 requests per minute. # Edit Pull Request Simple Source: https://docs.codegen.com/api-reference/pull-requests/edit-pull-request-simple api-reference/openapi3.json patch /v1/organizations/{org_id}/prs/{pr_id} Edit pull request properties (simple endpoint). Update the state of a pull request (open, closed, draft, ready_for_review). This endpoint only requires the PR ID, not the repo ID. The requesting user must have write permissions to the repository. Rate limit: 30 requests per minute. # Get Check Suite Settings Source: https://docs.codegen.com/api-reference/repositories/get-check-suite-settings api-reference/openapi3.json get /v1/organizations/{org_id}/repos/check-suite-settings Get check suite settings for a repository. # Get Repositories Source: https://docs.codegen.com/api-reference/repositories/get-repositories api-reference/openapi3.json get /v1/organizations/{org_id}/repos Get repositories for the specified organization. Returns a paginated list of all repositories that belong to the specified organization. Results include repository details such as name, ID, description, visibility, and setup status. Use pagination parameters to control the number of results returned. Rate limit: 60 requests per 30 seconds. # Update Check Suite Settings Source: https://docs.codegen.com/api-reference/repositories/update-check-suite-settings api-reference/openapi3.json put /v1/organizations/{org_id}/repos/check-suite-settings Update check suite settings for a repository. # Analyze Sandbox Logs Source: https://docs.codegen.com/api-reference/sandbox/analyze-sandbox-logs api-reference/openapi3.json post /v1/organizations/{org_id}/sandbox/{sandbox_id}/analyze-logs Analyze sandbox setup logs using an AI agent. This endpoint creates an AI agent that will analyze the setup logs from a sandbox, identify any errors, provide insights about what went wrong, and suggest potential solutions. The analysis runs asynchronously and results can be retrieved using the returned agent run ID. Rate limit: 5 requests per minute. # Generate Setup Commands Source: https://docs.codegen.com/api-reference/setup-commands/generate-setup-commands api-reference/openapi3.json post /v1/organizations/{org_id}/setup-commands/generate Generate setup commands for a repository. Creates and initiates a setup command generation agent for the specified repository. The agent will analyze the repository structure and generate appropriate setup commands. Rate limit: 5 requests per minute. # Generate Slack Connect Token Endpoint Source: https://docs.codegen.com/api-reference/slack-connect/generate-slack-connect-token-endpoint api-reference/openapi3.json post /v1/slack-connect/generate-token Generate a temporary token for Slack account connection. This token: - Expires in 10 minutes - Can only be used once - Must be sent to the Codegen bot in a DM with format: "Connect my account: {token}" # Get Current User Info Source: https://docs.codegen.com/api-reference/users/get-current-user-info api-reference/openapi3.json get /v1/users/me Get current user information from API token. Returns detailed information about the user associated with the provided API token. This is useful for applications that need to identify the current user from their API token. Rate limit: 60 requests per 30 seconds. # Get User Source: https://docs.codegen.com/api-reference/users/get-user api-reference/openapi3.json get /v1/organizations/{org_id}/users/{user_id} Get details for a specific user in an organization. Returns detailed information about a user within the specified organization. The requesting user must be a member of the organization to access this endpoint. Rate limit: 60 requests per 30 seconds. # Get Users Source: https://docs.codegen.com/api-reference/users/get-users api-reference/openapi3.json get /v1/organizations/{org_id}/users Get users for the specified organization. Returns a paginated list of all users that belong to the specified organization. Results include user details such as name, email, GitHub username, and avatar. Use pagination parameters to control the number of results returned. Rate limit: 60 requests per 30 seconds. # Analytics Source: https://docs.codegen.com/capabilities/analytics What impact are code agents having on your codebase (and your finances) today? How can you better deploy them across your org? Codegen Analytics was built to answer these questions and more. Analyze cost breakdown Access detailed analytics on agent performance, costs, and team productivity. ## 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 ## 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 Use analytics to continuously optimize your agent workflows and demonstrate the value of AI assistance to your organization. # How Codegen Agents Work Source: https://docs.codegen.com/capabilities/capabilities Codegen agents follow a simple but powerful workflow: they're triggered from your existing tools, work in secure sandboxes to implement changes, create pull requests, and then monitor and fix any issues that arise. This creates a seamless development experience that integrates naturally with your team's existing processes. ## The Agent Happy Path Here's how Codegen agents work from start to finish: ```mermaid graph TD A[Trigger from Integration] --> B[Work in Remote Sandbox] B --> C[Create Pull Request] C --> D[Monitor CI Checks] D --> E[Auto-fix Failed Checks] E --> D D --> D1[All checks pass ✓] D1 --> G[Ready for Review] G --> F[Respond to Follow-up Questions] F --> G A1[Slack @mention] --> A A2[Linear issue assignment] --> A A3[GitHub issue comment] --> A ``` ### 1. Users Trigger `@codegen` to Perform Tasks Agents activate seamlessly from the platforms you already use: * **[Slack](/integrations/slack)** - Tag `@codegen` in any channel or send a direct message * **[Linear](/integrations/linear)** - Assign an issue to Codegen or mention it in comments * **[Jira](/integrations/jira)** - Assign an issue to Codegen or mention it in comments * **[ClickUp](/integrations/clickup)** - Assign a task to Codegen or mention it in comments * **[Monday.com](/integrations/monday)** - Assign an item to Codegen or mention it in comments * **[GitHub](/integrations/github)** - Comment on issues or PRs to request changes * **[API](http://localhost:3001/api-reference/agents/create-agent-run)** - Programmatically trigger agents for automated workflows ### 2. `@codegen` Performs Work in Secure Sandboxes Once triggered, agents work in **[isolated sandbox environments](/sandboxes/overview)** where they can: * Execute code safely without affecting your systems * Install dependencies and run tests * Make changes and validate them before committing * Access your repository context while maintaining security ### 3. Users Receive Completed Pull-Requests Agents create **[GitHub pull requests](/integrations/github)** with: * Detailed descriptions explaining the changes * Links back to the original request (Linear issue, Slack thread, etc.) * Clean, tested code ready for review * Proper commit messages following your conventions ### 4. Agents Monitor and Auto-fix PR Issues The **[Checks Auto-fixer](/capabilities/checks-autofixer)** ensures quality by: * Monitoring CI/CD pipeline results in real-time * Automatically analyzing build failures and test errors * Pushing targeted fixes to resolve issues * Retrying up to 3 times before escalating to humans ### 5. Agents Respond to Follow-ups Agents remain active to handle questions and refinements: * Respond to PR review comments with additional changes * Answer questions in the original Slack thread or Linear issue * Make adjustments based on feedback from team members * Provide explanations of their implementation decisions ## Configuration & Customization Codegen agents can be customized to match your team's specific workflows and requirements: ### Model Selection Choose from leading AI models and configure custom API keys to optimize performance and cost for your organization. Select LLM providers, configure custom API keys, and optimize performance settings. ### Agent Behavior Control how agents interact with users and approach code modifications to ensure they align with your team's preferences. Configure plan proposals, GitHub mention requirements, and interaction patterns. ### Security & Permissions Define what actions agents are allowed to perform across your organization with fine-grained permission controls. Control PR creation, rules detection, and enforce security policies like signed commits. Start with conservative settings and gradually expand agent capabilities as your team becomes comfortable with AI assistance. ## Learn More Dive deeper into specific capabilities: * **[Get started with the overview](/introduction/overview)** - Complete introduction to Codegen * **[Explore integrations](/integrations/integrations)** - See all available platforms and tools * **[Understand sandboxes](/sandboxes/overview)** - Learn about the secure execution environment * **[Configure settings](/settings/settings)** - Customize agent behavior and permissions * **[View analytics](/capabilities/analytics)** - Monitor agent performance and impact # Check Suite Auto-fixer Source: https://docs.codegen.com/capabilities/checks-autofixer When GitHub checks fail on a Codegen PR, Codegen agents will automatically "wake up", analyze the failure, and push fix commits.