Skip to content

feat: Add Agent Permissions Documentation #1104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 23, 2025
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
10 changes: 10 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,17 @@ jobs:
access-check:
runs-on: ubuntu-latest
steps:
- name: Check if codegen bot
id: check-bot
run: |
if [[ "${{ github.triggering_actor }}" == "codegen-sh[bot]" ]]; then
echo "is_bot=true" >> $GITHUB_OUTPUT
else
echo "is_bot=false" >> $GITHUB_OUTPUT
fi

- uses: actions-cool/check-user-permission@v2
if: steps.check-bot.outputs.is_bot == 'false'
with:
require: write
username: ${{ github.triggering_actor }}
Expand Down
6 changes: 5 additions & 1 deletion docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@
},
{
"group": "Settings",
"pages": ["settings/repo-rules", "settings/model-configuration"]
"pages": [
"settings/agent-permissions",
"settings/repo-rules",
"settings/model-configuration"
]
}
]
},
Expand Down
Binary file added docs/images/agent-permissions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 76 additions & 0 deletions docs/settings/agent-permissions.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
title: "Agent Permissions"
sidebarTitle: "Agent Permissions"
icon: "user-shield"
---

Agent Permissions allow you to configure what actions the AI agent is allowed to perform across your organization. These settings provide fine-grained control over the agent's capabilities, ensuring it operates within your team's preferred workflows and security boundaries.

## Accessing Agent Permissions

Agent Permission settings are applied globally for your entire organization. You can access and modify these settings by navigating to:

[**codegen.com/settings/permissions**](https://codegen.com/settings/permissions)

<Frame caption="Agent Permissions UI at codegen.com/settings/permissions">
<img src="/images/agent-permissions.png" alt="Agent Permissions Configuration" />
</Frame>

## Available Permission Settings

### Enable PR Creation

**Control whether the codegen agent is able to create pull requests in your repositories in response to user requests.**

When enabled, the agent can automatically create pull requests when implementing features, fixing bugs, or making other code changes. When disabled, the agent will make changes locally but won't create PRs, requiring manual PR creation.

- **Default**: Enabled
- **Use Case**: Disable if you prefer manual PR creation or have strict PR workflows

### Enable Rules Detection

**Allow the agent to automatically detect and apply rules from .cursorrules and .windsurfrules files in your repositories.**

This setting enables the agent to automatically discover and follow coding standards, style guides, and other rules defined in your repository's configuration files.

- **Default**: Enabled
- **Use Case**: Disable if you want to manually control rule application or don't use these rule files

### Enable Linear Self-Assign

**Allow the codegen agent to self-assign Linear issues, enabling it to spin off other agents.**

When enabled, the agent can assign itself to Linear issues and potentially delegate work to other agent instances for parallel processing.

- **Default**: Enabled
- **Use Case**: Disable if you prefer manual issue assignment or want to limit agent autonomy

### Enable Linear Auto State Change

**When enabled, the agent will automatically move Linear issues to 'Started' state when self-assigning them.**

This setting automates the workflow by updating issue status when the agent begins work, providing better visibility into what the agent is actively working on.

- **Default**: Disabled
- **Use Case**: Enable for automatic issue tracking and improved project visibility

## Best Practices

### Security Considerations

- Review permission settings regularly to ensure they align with your team's security policies
- Consider disabling PR creation in production environments if you require manual review processes
- Monitor agent activity when enabling self-assignment features

### Workflow Integration

- Enable Linear Auto State Change if your team relies on Linear for project tracking
- Coordinate permission settings with your existing CI/CD and review processes
- Consider your team's preferred level of automation when configuring these settings

## Related Documentation

- [Repository Rules](/settings/repo-rules) - Configure repository-specific behavior
- [Linear Integration](/integrations/linear) - Set up Linear workspace integration
- [Model Configuration](/settings/model-configuration) - Configure LLM settings

Loading