From 38e00829cdc0188927320ee0b0a1e9695be7a5b2 Mon Sep 17 00:00:00 2001
From: "codegen-sh[bot]" <131295404+codegen-sh[bot]@users.noreply.github.com>
Date: Thu, 29 May 2025 02:07:07 +0000
Subject: [PATCH 1/2] Add documentation for secrets and sandbox size
- Add docs/settings/secrets.mdx with comprehensive secrets management guide
- Add docs/sandboxes/sandbox-size.mdx with sandbox sizing options and configuration
- Update docs.json to include new pages in navigation
- Follow existing documentation format and structure
---
docs/docs.json | 2 +
docs/sandboxes/sandbox-size.mdx | 129 ++++++++++++++++++++++++++++++++
docs/settings/secrets.mdx | 69 +++++++++++++++++
3 files changed, 200 insertions(+)
create mode 100644 docs/sandboxes/sandbox-size.mdx
create mode 100644 docs/settings/secrets.mdx
diff --git a/docs/docs.json b/docs/docs.json
index d3ddc3338..84aaebd36 100644
--- a/docs/docs.json
+++ b/docs/docs.json
@@ -42,6 +42,7 @@
"sandboxes/setup-commands",
"sandboxes/editor",
"sandboxes/environment-variables",
+ "sandboxes/sandbox-size",
"sandboxes/web-preview"
]
},
@@ -50,6 +51,7 @@
"pages": [
"settings/agent-permissions",
"settings/repo-rules",
+ "settings/secrets",
"settings/model-configuration"
]
}
diff --git a/docs/sandboxes/sandbox-size.mdx b/docs/sandboxes/sandbox-size.mdx
new file mode 100644
index 000000000..88c15f243
--- /dev/null
+++ b/docs/sandboxes/sandbox-size.mdx
@@ -0,0 +1,129 @@
+---
+title: "Sandbox Size"
+sidebarTitle: "Sandbox Size"
+icon: "expand"
+---
+
+Sandbox Size determines the computational resources allocated to your AI agent's execution environment. Different sandbox sizes provide varying levels of CPU, memory, and storage capacity to handle tasks of different complexity and resource requirements.
+
+## Available Sandbox Sizes
+
+Codegen offers multiple sandbox size options to match your workload requirements:
+
+### Small
+- **CPU**: 2 vCPUs
+- **Memory**: 4 GB RAM
+- **Storage**: 20 GB
+- **Best for**: Simple code changes, documentation updates, small scripts
+
+### Medium (Default)
+- **CPU**: 4 vCPUs
+- **Memory**: 8 GB RAM
+- **Storage**: 40 GB
+- **Best for**: Most development tasks, testing, moderate complexity projects
+
+### Large
+- **CPU**: 8 vCPUs
+- **Memory**: 16 GB RAM
+- **Storage**: 80 GB
+- **Best for**: Large codebases, complex builds, data processing tasks
+
+### Extra Large
+- **CPU**: 16 vCPUs
+- **Memory**: 32 GB RAM
+- **Storage**: 160 GB
+- **Best for**: Heavy computational tasks, large-scale testing, enterprise applications
+
+## Configuring Sandbox Size
+
+You can configure the sandbox size at different levels:
+
+### Organization Level
+Set a default sandbox size for your entire organization:
+
+1. Navigate to [codegen.com/settings/sandboxes](https://codegen.com/settings/sandboxes)
+2. Select your preferred default sandbox size
+3. Save the configuration
+
+### Repository Level
+Override the organization default for specific repositories:
+
+1. Go to [codegen.com/repos](https://codegen.com/repos)
+2. Select the repository you want to configure
+3. Choose a specific sandbox size for that repository
+4. Save your changes
+
+### Task Level
+Specify sandbox size when requesting specific tasks:
+
+```
+@codegen --sandbox-size=large
+Please run the full test suite and generate a performance report
+```
+
+## Choosing the Right Size
+
+Consider these factors when selecting a sandbox size:
+
+### Project Characteristics
+- **Codebase Size**: Larger repositories may need more storage and memory
+- **Build Complexity**: Complex build processes require more CPU and memory
+- **Dependencies**: Projects with many dependencies need more storage space
+- **Test Suites**: Comprehensive test suites benefit from additional resources
+
+### Task Requirements
+- **Code Analysis**: Large-scale analysis tasks need more memory
+- **Compilation**: Building large projects requires more CPU
+- **Data Processing**: Working with large datasets needs more memory and storage
+- **Parallel Operations**: Concurrent tasks benefit from additional CPU cores
+
+## Performance Considerations
+
+### Resource Utilization
+- Monitor your tasks to see if they're hitting resource limits
+- Upgrade to a larger size if you notice performance bottlenecks
+- Downgrade to save costs if resources are consistently underutilized
+
+### Cost Optimization
+- Start with the default Medium size for most tasks
+- Scale up only when necessary for specific workloads
+- Consider repository-specific sizing for different project types
+
+
+ Most development tasks work well with the default Medium sandbox size. Only
+ upgrade to larger sizes if you're experiencing performance issues or working
+ with particularly resource-intensive projects.
+
+
+## Monitoring and Optimization
+
+### Resource Monitoring
+The Codegen platform provides insights into:
+- CPU utilization during task execution
+- Memory usage patterns
+- Storage consumption
+- Task completion times
+
+### Automatic Recommendations
+Based on usage patterns, Codegen may suggest:
+- Optimal sandbox sizes for specific repositories
+- Cost-saving opportunities through downsizing
+- Performance improvements through upsizing
+
+
+ Sandbox size changes take effect immediately for new tasks. Running tasks
+ will continue with their original resource allocation until completion.
+
+
+## Billing and Limits
+
+- Sandbox size affects your usage costs
+- Larger sandboxes consume more compute credits
+- Organization admins can set limits on maximum sandbox sizes
+- Usage reports show resource consumption by sandbox size
+
+
+ Very large sandbox sizes should be used judiciously as they consume
+ significantly more resources and may impact your usage limits.
+
+
diff --git a/docs/settings/secrets.mdx b/docs/settings/secrets.mdx
new file mode 100644
index 000000000..1196b0cc6
--- /dev/null
+++ b/docs/settings/secrets.mdx
@@ -0,0 +1,69 @@
+---
+title: "Secrets"
+sidebarTitle: "Secrets"
+icon: "key"
+---
+
+Secrets in Codegen allow you to securely store and manage sensitive information like API keys, tokens, and other credentials that your AI agent needs to access during task execution. These secrets are encrypted and made available to the agent's sandbox environment without exposing them in your codebase.
+
+## How Secrets Work
+
+When you configure secrets for your organization, they become available as environment variables within the agent's sandbox environment. This allows the agent to:
+
+- Access external APIs and services
+- Authenticate with third-party tools
+- Use credentials without hardcoding them in your repository
+- Maintain security best practices by keeping sensitive data separate from code
+
+## Accessing and Configuring Secrets
+
+You can manage your organization's secrets through the Codegen web interface:
+
+1. Navigate to [codegen.com/settings/secrets](https://codegen.com/settings/secrets)
+2. Add new secrets by providing a name and value
+3. Configure which repositories or environments can access specific secrets
+4. Save your changes to make them available to the agent
+
+
+ Secrets are encrypted at rest and in transit. Only the AI agent's sandbox
+ environment can access the decrypted values during task execution.
+
+
+## Common Use Cases
+
+Secrets are commonly used for:
+
+- **API Keys**: Store keys for external services like OpenAI, GitHub, or cloud providers
+- **Database Credentials**: Securely connect to databases without exposing connection strings
+- **Authentication Tokens**: Access private repositories or services that require authentication
+- **Configuration Values**: Store environment-specific settings that shouldn't be in code
+- **Third-party Integrations**: Credentials for services like Slack, Linear, or other tools
+
+## Best Practices
+
+When working with secrets in Codegen:
+
+- **Use Descriptive Names**: Choose clear, descriptive names for your secrets (e.g., `OPENAI_API_KEY`, `DATABASE_URL`)
+- **Rotate Regularly**: Update secrets periodically to maintain security
+- **Principle of Least Privilege**: Only grant access to secrets that are actually needed
+- **Avoid Duplication**: Don't store the same secret multiple times with different names
+- **Document Usage**: Keep track of which secrets are used by which repositories or workflows
+
+
+ The agent will automatically have access to configured secrets as environment
+ variables. You can reference them in your code using standard environment
+ variable syntax (e.g., `process.env.API_KEY` in Node.js or `os.getenv('API_KEY')` in Python).
+
+
+## Security Considerations
+
+- Secrets are never logged or displayed in plain text in the Codegen interface
+- Access to secrets is controlled at the organization level
+- Secrets are only available within the secure sandbox environment
+- All secret operations are audited for security compliance
+
+
+ Never commit secrets directly to your repository. Always use the Codegen
+ secrets management system to handle sensitive information securely.
+
+
From 57268844aa8634f8c17106d4c1fc7c278ddb5120 Mon Sep 17 00:00:00 2001
From: "codegen-sh[bot]" <131295404+codegen-sh[bot]@users.noreply.github.com>
Date: Thu, 29 May 2025 02:22:15 +0000
Subject: [PATCH 2/2] Add comment to trigger test retry
The previous test run failed due to a timeout in unit tests, but integration tests passed.
This small change is to trigger a new test run to see if the issue was transient.
---
docs/settings/secrets.mdx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/docs/settings/secrets.mdx b/docs/settings/secrets.mdx
index 1196b0cc6..04c81f6a3 100644
--- a/docs/settings/secrets.mdx
+++ b/docs/settings/secrets.mdx
@@ -4,6 +4,8 @@ sidebarTitle: "Secrets"
icon: "key"
---
+
+
Secrets in Codegen allow you to securely store and manage sensitive information like API keys, tokens, and other credentials that your AI agent needs to access during task execution. These secrets are encrypted and made available to the agent's sandbox environment without exposing them in your codebase.
## How Secrets Work
@@ -66,4 +68,3 @@ When working with secrets in Codegen:
Never commit secrets directly to your repository. Always use the Codegen
secrets management system to handle sensitive information securely.
-