The Struct Build Agent is a built-in coding agent that can implement fixes directly from an investigation. It runs in a sandboxed environment that you configure with execution scripts, secrets, and custom prompts — so the PRs it creates are ready to merge and pass your CI.Documentation Index
Fetch the complete documentation index at: https://docs.struct.ai/llms.txt
Use this file to discover all available pages before exploring further.
How It Works
Review the Investigation
Struct completes its investigation and presents root cause analysis and a suggested fix
Sandbox Execution
Struct creates a branch, implements the fix in a sandboxed environment, and runs your configured build and test scripts
What Happens During Execution
- Creates a branch from your default branch (e.g.,
struct/fix-checkout-timeout) - Runs your pre-execution scripts (dependency installation, environment setup)
- Implements the proposed changes
- Runs your post-execution scripts (tests, linting, formatting)
- Commits with descriptive messages
- Opens a pull request and posts the link back to the original thread
Requires GitHub to be connected with write access to the target repository.
Per-Repository Configuration
Configure how the Build Agent works with each of your repositories. Go to Settings → Coding Agent → Struct tab.Requires GitHub to be connected.
Settings
| Setting | Description |
|---|---|
| Custom prompts | Repository-specific instructions for the agent (e.g., coding conventions, architecture notes) |
| Build commands | How to build and test the project |
| Branch naming | Prefix for branches created by Struct (e.g., struct/) |
Pre/Post Execution Scripts
Define scripts that run before and after the Build Agent makes changes. These ensure the sandbox matches your development environment and that every PR passes CI. Pre-execution — Runs before implementing a fix (e.g., dependency installation, environment setup):Secrets
Add environment variables that the Build Agent needs during execution (e.g., API keys for tests, registry tokens). Manage secrets from Settings → Coding Agent → Struct tab. Secrets are stored securely and injected into the sandbox environment at runtime.Best Practices
Match your CI
Set post-execution scripts to mirror your CI checks so PRs are ready to merge on first review.
Add custom prompts
Include coding conventions, architecture patterns, and preferred libraries so the agent writes code that fits your codebase.
Start with one repo
Configure and test the Build Agent on a single repository before rolling out to your full codebase.
Review before approving
Always review the investigation findings and proposed approach before approving a fix.