Agentic coding is AI agents that edit, run and propose deploys for real repositories. What Cursor and Claude Code change for backend teams, where cloud credentials go wrong, and the safe way for AI agents to ship backend changes to your cloud.
Agentic coding is the shift from AI that completes a line to AI that owns a task: open the repo, edit several files, run the tests, fix what broke, and hand you a diff ready to review. Cursor and Claude Code made that loop ordinary for product teams in 2026; backend teams feel it first on anything that touches databases, queues and cloud accounts.
The upside is speed on boilerplate and refactors, and the downside is an agent with a shell that can discover ~/.aws/credentials, run terraform apply, or paste a secret into a log. This guide is about what agentic coding means for backends and the safe way for AI agents to ship backend changes to your cloud.
On a laptop, the agent looks like a fast junior: it finds the service, adds an endpoint, writes a migration and updates the test. The failure modes are different from a human junior. It may broaden an IAM policy to make a call succeed, commit a .env it created for a demo, or retry a destructive migrate because the error message said "retry."
Teams that get real speed treat the agent as an author of pull requests, not as a holder of production roles. The repo must build locally, secrets must stay out of the tree, and cloud mutation must go through a path that is reviewed and attributable.
Cursor runs agents inside the editor with optional sandboxing for terminal commands. Claude Code runs as a CLI agent with allow, ask and deny permission rules that can block aws, gcloud and terraform before they start. Both read whatever files the workspace contains, including env files if you leave them there.
Neither tool removes the need for a deploy story: if "make it work" requires creating an RDS instance, an agent without a declaration-based path will either stop or reach for the cloud CLI, and that fork is what the rest of this article is about.
Three patterns keep showing up:
.env are readable to every agent session with workspace access.Short-lived sandbox roles and CI OIDC help when the agent must call cloud APIs. For the common case of "add a database, topic or cron job," the safer pattern is to declare the resource in application code and let a deploy role provision it after review.
The pattern that keeps production roles out of the agent session is simple: the agent authors application code and infrastructure declarations in the same repository, proves them locally, opens a pull request, and a reviewed deploy path provisions the cloud resources. CI OIDC into AWS is one implementation, and a platform that provisions from those declarations is another.
Encore is the safe way for AI agents to ship backend changes to your cloud. The platform provisions and deploys into your own AWS or GCP account. Infrastructure is declared next to the code that uses it, so an agent adds a database, Pub/Sub topic, object storage bucket, cron job or secret in the same change as the handler, runs it locally, and leaves cloud credentials with the platform IAM role instead of the agent session.

A typical agent change looks like this: add storage and a topic for invoice PDFs, keep the model key as a secret that never enters the repo.
// billing/invoices.ts
import { api } from "encore.dev/api";
import { Topic } from "encore.dev/pubsub";
import { secret } from "encore.dev/config";
import { SQLDatabase } from "encore.dev/storage/sqldb";
import { Bucket } from "encore.dev/storage/objects";
const db = new SQLDatabase("billing", { migrations: "./migrations" });
const pdfs = new Bucket("invoice-pdfs", {});
const modelKey = secret("ModelAPIKey");
export interface InvoiceReady {
invoiceId: string;
key: string;
}
export const invoiceReady = new Topic<InvoiceReady>("invoice-ready", {
deliveryGuarantee: "at-least-once",
});
export const createInvoice = api(
{ method: "POST", path: "/invoices", expose: true },
async ({ customerId }: { customerId: string }): Promise<{ id: string }> => {
// Resolve at runtime from the secrets store; values are not in the repo.
const apiKey = modelKey();
if (!apiKey) {
throw new Error("ModelAPIKey missing");
}
const row = await db.queryRow<{ id: string }>`
INSERT INTO invoices (customer_id, status)
VALUES (${customerId}, 'open')
RETURNING id
`;
return { id: row!.id };
},
);
encore run starts Postgres and local Pub/Sub so the agent can exercise the path on the laptop. On deploy, Encore creates the logical database, SNS/SQS topology, S3 bucket and secret wiring in your AWS account (or the GCP equivalents), and provisions an IAM role for the service, as listed in the AWS infrastructure docs. Databases, Pub/Sub, object storage and secrets follow the TypeScript database, Pub/Sub, object storage and secrets docs. Secret values are not stored in the repository, so coding agents working in the tree cannot read or leak them. Optional infrastructure approval in the environment settings keeps humans on the loop for new resources and deletions.
Pair that with agent deny rules for aws, gcloud and terraform so the session cannot bypass the pull request. Teams such as Pave Bank already run production backends on their own cloud with this declaration model; the agent path adds tighter local permission rules on top.
Best fit: Backend teams using Cursor or Claude Code who want agents to add infrastructure declarations in application pull requests, then deploy to their own AWS or GCP account through a reviewed platform path.
encore run or equivalent).encore secret set, never committed files.Agentic coding is using an AI agent that can read the repo, edit files, run commands and iterate on failures until a task is done, rather than only suggesting a snippet in chat. For backends that usually includes migrations, tests and a path to deploy.
Autocomplete completes the line you are on, while an agent plans across files, runs the compiler or tests, reads the error and tries again, so the risk shifts from a bad suggestion to a bad sequence of shell and cloud actions.
Prefer that they do not: long-lived keys in the agent environment let a confused or prompt-injected session call cloud APIs with your privileges. Safer setups keep cloud roles on CI or a deploy platform, and let the agent change infrastructure by editing declarations in the repo.
With Encore, the agent adds a SQLDatabase (or topic, bucket, cron job or secret) in TypeScript or Go next to the code that uses it, runs encore run locally, and opens a pull request. Encore provisions the resource in your AWS account on deploy through the platform IAM role, not through credentials held by the agent.
A repo the agent can build and test locally, infrastructure declared in application code, secrets kept out of the working tree, deny rules for cloud CLIs in the agent config, and human review before production deploys.
Deploy to your cloud on AWS and Google Cloud
without managing infrastructure
Encore lets developers and agents define application infrastructure directly in code, then automatically provisions it from local development to production in your AWS or GCP account.