Skip to main content

Coding Agents

Who this is for

Developers evaluating whether a coding-agent workload fits their use case. If you've already decided and want working code, jump to the Quick Start. Still comparing workload types? See the Workloads overview.

Long-running code generation, review, and migration agents with sandboxed execution, governance, and scalability. AgentCore provides the secure runtime for tasks that produce code as output.


What Is It?​

A coding agent is an autonomous AI that produces, modifies, or reviews source code. Triggered by tickets, pull requests, schedules, or CI events, it performs long-running tasks like feature implementation, refactoring, test generation, or code review, then surfaces results for human approval. Unlike conversational agents that respond in real-time to humans, coding agents run in the background and produce structured artifacts (code, PRs, comments).


Common Use Cases​

  • Feature implementation from Jira tickets — A ticket is created or moves to "Ready for Dev." The agent reads requirements, generates implementation code, writes tests, and opens a PR for human review.
  • Automated code review / security scanning — A PR is opened. The agent reviews for bugs, security issues, style violations, and architectural concerns, leaving inline comments.
  • Codebase migration / refactoring — Batch transformation across hundreds of files: framework upgrades, API version bumps, pattern standardization. The agent plans, transforms, tests, and commits.
  • Test generation from specifications — When specs or code change, the agent generates or updates test suites to maintain coverage targets.
  • Documentation generation from code — Code merges trigger automatic generation or update of API docs, architecture diagrams, or README files.
  • Dependency updates and vulnerability fixes — Security advisories trigger the agent to patch dependencies, verify tests pass, and submit PRs.

When to Choose Coding​

Choose this workload when:

  • The primary output is code, tests, documentation, or PR comments
  • Tasks are long-running (minutes to hours) and involve file system or repository operations
  • You need sandbox isolation for code execution, build, and validation
  • Results go through a human review gate before merging
  • The agent operates on a codebase with version control

For a side-by-side comparison with Conversational and Workflow patterns, see the Workloads overview comparison table.


Strengths and Limitations​

StrengthsLimitations
Long-running execution (hours) for complex tasksNon-deterministic output requires human review gates
Sandboxed Code Interpreter for safe executionContext window limits constrain codebase understanding
Identity-aware access to repositories and CI systemsNascent archetype; patterns are still maturing
Scale-to-zero between tasksBuild/test feedback loops add latency
Full traceability from trigger to PRComplex multi-file reasoning still challenging for models
Runtime microVM sessions cap at 2 vCPU/8 GB and a 2 GB container image; workloads exceeding either need Runtime Instances

AgentCore Configuration Summary​

AgentCore ServiceConfiguration for CodingWhy It Matters
IdentityDeveloper identityAgent accesses repos as the developer
MemoryProject-scoped contextCodebase understanding across invocations
RuntimeLong-running (hours), Code InterpreterComplex tasks need sustained compute
GuardrailsCode quality + security scanning gates, Cedar tool policiesCatch vulnerabilities before merge
ObservabilityPer-task tracingUnderstand what the agent changed and why

When Not to Use This Pattern​

Skip the Coding pattern when:

  • The task is short and deterministic (a script that bumps a version number or runs a formatter). A CI step or a scheduled Lambda is simpler and more reliable.
  • Real-time human interaction is needed during generation. If a developer needs to guide the agent turn-by-turn, the Conversational pattern is a better fit.
  • You do not have a human review gate. Coding agents produce non-deterministic output. Merging code directly without a human or automated quality gate (tests, lint, security scan) is high risk.
  • The codebase context far exceeds the model's context window. Very large monorepos with tightly coupled modules may produce poor results until chunking and retrieval strategies are in place.
  • This is a greenfield project with no existing tests or CI. The build-test-validate loop that makes coding agents reliable requires existing scaffolding to run against.

Further Reading​


Next Steps​