5 Building Blocks for Agents That Run on Their Own

AI agents can work beyond your laptop, but who supplies their context and sets their boundaries?

Subscribe at Apple Podcasts Spotify RSS

Autonomous AI agents need more than a laptop session to handle deploy checks and failing pipelines unattended. Five building blocks give teams a practical starting point. Andrey Devyatkin and Fernando Piviani explain shared context, live-data tools, observability, an existing harness and an execution environment with triggers and containment. They explore starting with GitHub Actions, choosing AWS runtimes for longer investigations, and why teams should own their context and enforce boundaries around credentials and network access.

Summary

Most autonomous agents people run today are personal assistants. They summarize your inbox, draft replies, watch Slack and hand you a digest of the day. That’s useful. The jobs that eat an infrastructure team’s week are a different kind of work: a check after every deploy, the fifteen pipelines that have been red since last month, the alert that fires at 3 a.m. with nobody to triage it. Those jobs need an agent that runs off your laptop, wakes up on an event, and works on your real systems with nobody watching. Getting there takes five building blocks: a context layer the agent can share with every other agent you run, tools that read live data, observability into what the agent did, a harness, and an execution environment that triggers the agent and contains it. None of them is exotic. Most teams already own two or three without having connected them. Buy the harness and the runtime if a vendor runs them well. Own the context and the containment, because every agent you run depends on them. Without context, the agent spends its run working out where things are. Without containment, an agent that holds your credentials and has internet egress can post those credentials somewhere you never asked it to.

From Personal Assistant to Job Tasks

The assistant pattern is simple. OpenClaw, the open-source agent that made it popular, is conceptually a loop that wakes an agent to check for work: a new chat message, a changed condition or a routine that’s due. The big vendors now sell managed versions of the same idea, and they’re good assistants. The open question is which engineering jobs you can hand over.

Which engineering jobs suit an autonomous agent first?

Annoying, repetitive jobs with a clear trigger: checks after a deploy, failing pipelines, and alerts that need a first look before a human sees them.

Post-deploy checks are the one we run in practice. A deploy finishes, and an agent gets called automatically. If the repository holds instructions for smoke tests, the agent follows them. If it doesn’t, the agent runs exploratory testing: it works out what the workload is and then reads the metrics, the flow logs and the application logs. Then it reports to Slack. A second agent could watch those reports and promote the ones that matter to a channel where a human looks. We touched on this pattern with Mohit Bansal in episode #24, and it’s the cheapest place to start, because the deploy event gives you the trigger for free.

Failing pipelines are the second. Jenkins showed every pipeline on one screen, so you could see what had been red for weeks. GitHub Actions doesn’t. Each repository runs its own workflows, and the third-party dashboards that fill the gap are clumsy. One of us ended up writing a job that collects pipeline status every morning and sends a digest. A script can do that much, but it can’t go and look. An agent can turn “30 pipelines failing” into “five fail for this reason, here’s a pull request; ten fail for that reason, here’s another.” It can also point out that five belong to abandoned projects that deploy nowhere and were never archived, and ask whether to archive them.

Alerts are the third. Running every trace line through a model costs a fortune. An event-driven agent that wakes on an alert costs far less. Episode #14 adds another cost control: batch related alerts so one incident doesn’t trigger several investigations.

“AI is great at executing as long as you give it at the right pointer. Otherwise, like, all of that capacity is wasted, right?”

When a job goes past a Slack report to a proposed fix, such as a pull request or an archived repository, it needs two things before you write any loop. The agent has to know where to look, and it has to be allowed to look there. That’s the first building block.

A Context Layer You Own

If you’re on AWS, you can buy a version of the post-deploy agent today.

Should you use AWS DevOps Agent or build your own context?

Use AWS DevOps Agent if all you need is DevOps on AWS. Own your context layer if more than one agent, team or vendor needs to know the same things about your systems.

AWS DevOps Agent watches deployments, investigates incidents, reviews pull requests and accepts custom tasks. At a conference we heard the first account of a real company running it. Their investigations cost about nine dollars each. AWS bills per agent-second, $0.0083, so nine dollars is roughly 18 minutes of agent time. Paid support plans earn monthly credits toward it. That’s not much in the grand scheme of things, and it already works.

Our concern is where the context goes. The agent builds a graph of your system and absorbs what’s going on, and that graph lives inside the product. In our view, bought agents tend to hold on to the context they build, because the vendors know context is what makes an agent useful. We expect getting that context back out, or moving it to another tool, to be hard. Before you commit, check what the product lets you export.

“This is like where we actually argue that having your own context layer is better because then you can use the same context for your coding agents, for your autonomous agents, for whatever kind of agents you decide.”

The subscriptions make this worse. On your laptop, the coding agent runs on a team plan from Anthropic or OpenAI. Off the laptop, the autonomous agent burns tokens through Amazon Bedrock. Nothing carries context between those platforms. A security agent next quarter starts from zero again.

Markdown files are the usual workaround, and they work while one person drives one agent. The question is who else can read them. Instructions committed to a repository reach anyone with access to that repository. Operational context kept in local files on an engineer’s laptop reaches nobody else. Picture the support team at a product company handling a customer complaint. If the context layer that knows what’s running is open to their support agent too, it can go and check. With local files, that context isn’t available to them.

“If you use just like some local files and things like this, then again, that context is not available.”

For a human the shared layer helps. For an autonomous agent it’s a must-have, because nobody is around to paste in what the agent doesn’t know. We made the cost of rebuilding context every session concrete in episode #17, and episode #12 covers what a context layer holds.

Live Data for the Moment That Matters

A context layer answers “where do I look?”. It doesn’t answer “what is happening right now?”.

Is a context layer enough for incident response?

No. A context layer is as fresh as its last collection, which can be a few hours ago depending on the cadence. An incident needs the current state. Use the layer to orient the agent, then give it tools that read live data.

The split matters most when something is on fire. The context layer gets the agent to the right accounts, the services involved and the general network layout in one step, without a discovery crawl. From there it needs the actual numbers: current task counts, the error rate this minute, the security group as it is now and not as it was at the last collection.

“If you’re dealing, for instance, with incidents, you need to have the actual data right now. So you can use the context layer as a springboard for initial orientation.”

With B.O.R.I.S we ship both halves together. Alongside the context layer come tools for live lookups, and they use the same permissions the context layer uses to collect its data. The pattern isn’t specific to our tool, though. Whatever you use, keep orientation and live reads as separate jobs, and make sure the live reads can’t do more than look.

The same layer works wherever the agent runs: the coding agent on your laptop, the autonomous agent in your account, a Slack agent from a vendor. That’s the payoff of owning it. One inventory serves every runtime you plug into it, managed or yours.

Observability: How Did It Get There?

Context and live data let the agent act. The next question comes from whoever has to trust it.

What do you need to see when an agent runs unattended?

The path it took, not only the result: what it was given, each tool call and what came back, and what it produced. When it makes a wrong decision, that record shows you where it went wrong so you can fix it.

On a laptop you get a version of this for free. The agent shows its messages and tool calls as it goes, and you read them and steer. That view isn’t the model’s complete reasoning. Some models show a summary of their thinking rather than the raw process. It’s still enough to redirect the agent. Run the same agent autonomously and even that view is gone. The first thing people ask about an autonomous agent is “how do I know what it did?” A final outcome doesn’t answer that. If the outcome is wrong, you need the step where the run went off the road, because that’s the step you fix: a missing instruction, a tool that returned stale data, a prompt that pointed it somewhere else.

So get the telemetry out. Record the inputs, every tool call and its result, the outputs, and any reasoning summaries the model provides. The managed personal assistants from OpenAI and Anthropic give you little observability, and you could argue you don’t need it when someone else runs them. Other managed agents differ: AWS DevOps Agent shows a timeline of its tool calls, observations and reasoning. Check what each product lets you see before you rely on it. Once you run your own, the tracing is your job. We went through tracing, and why traces become your eval set, with Nikita Kabardin in episode #22.

Running your own is the right call for engineering work, in our view. Agents will become part of how you run infrastructure. A team that keeps the capability in-house doesn’t have to stitch together agents from three vendors and then try to share context between them.

Pick a Harness, Don’t Write One

Observability tells you what the agent did. The harness is the thing doing it.

Do you need to build your own agent harness?

Almost certainly not. An existing harness with your tools plugged in over MCP, plus a good system prompt, covers most engineering jobs.

The harness is the loop around the model: it calls the LLM, runs tools, manages the context window and memory. We covered why it matters so much in episode #4. Your options run from a framework to a finished product. If you need something small and quick on AWS, Strands Agents builds simple agents fast. If you want a full harness, take one off the shelf.

“I think OpenCode can get you quite far. It integrates with the most of the AI model providers… You can just plug through the MCP. You provide extra guidance through the prompts and system prompt, and you’re kind of done.”

OpenCode connects to Amazon Bedrock, Google Vertex AI, Azure AI Foundry, OpenRouter, or the model vendors directly with an API key. It comes with the bootstrapping and the built-in tools, so you add only what’s specific to your job. Claude Code works too, but it ties you to Anthropic models, whether direct, through Bedrock or through another provider that serves them. Codex is more pluggable: it can talk to local models through Ollama or LM Studio as well as hosted ones. If you like Codex, use it. The coding harnesses have converged, and unless your job is unusual the differences between them are small.

Building your own is for learning. If you want to understand how memory or prompt caching works inside a harness, writing one teaches you. For the work you do every day, it’s effort spent on the wrong layer.

“If it’s to do work, like to help us, like on the work that we do on a daily basis, yeah, you can go quite far with this existing frameworks or fully blown harnesses already, right?”

An Execution Environment With a Trigger

A harness needs somewhere to run and something to wake it up.

Where should an autonomous agent run?

Start in GitHub Actions. Consider Lambda, Lambda MicroVMs or Amazon Bedrock AgentCore Runtime when you want AWS events to reach the agent directly, need longer runs, or need the agent inside your network.

You probably don’t want the agent running all the time. You want it to run when something happens. GitHub Actions is where most teams start, and it’s easy to see why. Install the harness in a job, add the keys for your model provider, and check out the repository with your prompts. Git events and schedule cron triggers cover a lot of jobs, and you provision no infrastructure.

Mind the token’s reach. The default GITHUB_TOKEN is scoped to the repository that holds the workflow, and you set its permissions in the workflow file. That covers a post-deploy check on the same repository. The morning sweep of failing pipelines across the organization doesn’t fit in it. For that, give the job separate, explicitly scoped credentials for the other private repositories, such as a GitHub App token limited to those repositories and to read access unless the job opens pull requests.

Events from outside Git don’t force you out of GitHub Actions. A workflow can listen for repository_dispatch, so a small authenticated bridge can turn an SNS notification, an alarm or a queue message into a workflow run. Moving into AWS is the option when you want those events to reach the agent directly, or when the agent has to sit in your network. A Lambda function can be a container image with OpenCode installed. The work is in passing the event into the harness as its task. Standard Lambda caps a run at 15 minutes, which is enough for many checks and not for a long investigation. For longer work, AWS now has two runtimes built with agents in mind. Lambda MicroVMs give each job its own Firecracker VM and keep state for up to eight hours. AgentCore Runtime runs each session in a dedicated microVM, ends it after 15 minutes of inactivity or eight hours in total, and wipes its memory afterwards.

Serverless limits we used to treat as hard rules are moving because of agents. With re:Invent close, expect more of that. Pick the runtime by the trigger, the run length and the network placement you actually need, and plan for the session boundary: an eight-hour cap means state you need afterwards belongs somewhere other than the session.

Containment Is Part of the Environment

Moving the agent closer to your infrastructure is also what makes it dangerous.

What does an agent with VPC access need around it?

A boundary that defines what it can and can’t do, enforced by the system rather than by the prompt, with outbound traffic denied by default and allowed only to the endpoints the job needs.

Say the agent needs VPC access to check something. VPC access alone is useless without tools. Most harnesses ship a shell tool, though, and a Debian-based container has the usual networking utilities. With a shell, the agent can use those or write the tool it lacks. That’s the point at which it can do far more than you asked. It probably holds credentials.

“If it has access like egress to the internet, it can go and post those credentials somewhere. You didn’t ask for that, but it can do it.”

Cutting the agent off from the network entirely doesn’t work either: it still has to reach the model provider, and possibly GitHub, Slack or your MCP servers. Deny outbound traffic by default, then allow only those endpoints. Keep the agent’s traffic separate from the runner’s. On a GitHub Actions runner, the runner’s own connection to GitHub is not the agent’s business. Put the boundary around the agent process, so the shell it spawns can reach the model endpoint and the tools you approved, and nothing else.

Instructions in a prompt don’t stop that. A sandbox does. NVIDIA OpenShell, which we first looked at in episode #4, is a good place to start your search. It runs agents in sandboxes with declarative policies for filesystem, network and process access, and blocks an attempt the policy doesn’t allow. The managed runtimes above give you VM isolation per session. You still decide what the network and the IAM role let the agent reach.

“Yes, they’re capable, but they are also gullible. You know, you could easily steer it in the wrong way.”

The way in is a ladder. Start with something small and tightly contained, watch what it does, and widen the boundary as you gain confidence. Consumer agents already make payments, call people and book things on their owners’ behalf, and the owner is responsible for all of it. Your autonomous agent acts with your accounts and your credentials. Account boundaries from episode #24 and tool-layer guards from episode #5 are the other two layers of the same fence.

What This Means for Teams

You can get an agent off your laptop this week without a platform project. Pick one annoying job with a clear trigger, run an existing harness where your code already lives, and put the effort into the two pieces that are yours to own: the context the agent works from and the box it runs in.

Four things to do this week:

  • Pick one job and its trigger. A post-deploy smoke check or a morning digest of failing pipelines. Write the instructions into the repository the agent will read.
  • Run it in GitHub Actions with OpenCode or Codex. Wire your tools in over MCP and keep the system prompt in the repo, so changes go through review. Set the workflow’s token permissions, and add a separately scoped credential if the job reads other private repositories.
  • Ship the traces somewhere. Before the first unattended run, decide where inputs, tool calls, results and outputs are recorded, and read the first few runs end to end.
  • Deny outbound traffic by default before you grant access. Give the agent read-only credentials and allow only the endpoints it needs, such as the model provider and your MCP servers. Add a sandbox policy before it gets VPC access or a shell.

Common Questions, Answered

How do I run an AI agent on a schedule without a server?

Run it in GitHub Actions. Install a harness such as OpenCode or Codex in a workflow job, store the model provider’s API key as a secret, and trigger the job on a schedule cron or a Git event. The default GITHUB_TOKEN covers the repository that holds the workflow, so check that repository out with your prompts and set the token’s permissions. For other private repositories, add separately scoped credentials. Events from outside Git can start the workflow through repository_dispatch. Consider Lambda or Amazon Bedrock AgentCore Runtime when you want AWS events to reach the agent directly or need access inside a VPC.

How do I stop an autonomous agent from leaking credentials?

Deny its outbound traffic by default, allow only the endpoints it needs, and run it in a sandbox whose policy is enforced by the system, not by the prompt. An agent with a shell tool and credentials can send those credentials anywhere it can reach. Tools such as NVIDIA OpenShell enforce a policy for files, network destinations and processes, and block everything else. Start with read-only credentials and a narrow boundary, then widen them as you gain confidence.

How do I share context between Claude Code and agents running on Bedrock?

Put the context in a layer you own and connect every agent to it, usually over MCP. Context built inside one vendor’s agent may be hard to export or share with other tools, so check what the product lets you export. Nothing carries context by default between a team plan on your laptop and an agent consuming tokens through Amazon Bedrock. A shared context layer lets coding agents, autonomous agents and Slack agents use the same picture of your infrastructure. Pair it with live-data tools for incidents, because the shared picture is only as fresh as its last collection.

Resources

  • OpenClaw on GitHub: the open-source agent that made the scheduled-check pattern popular. Read its security guidance before you self-host it, since how safely it runs depends on your setup.
  • AWS DevOps Agent pricing and its release management preview: per-second billing at $0.0083 with support-plan credits, and the timeline of tool calls, observations and reasoning the agent exposes. Together they show what an investigation costs and what a managed agent lets you see. Neither says how portable the context the agent builds is.
  • OpenCode providers: the model providers the harness connects to, from Bedrock and Vertex AI to OpenRouter. Check that yours is listed before you choose it.
  • Strands Agents: AWS’s open-source framework for building small agents quickly, if a full harness is more than the job needs.
  • GitHub Actions GITHUB_TOKEN and repository_dispatch: what the default token can reach, and how an external event can start a workflow. Read both before you put an agent in a workflow that spans repositories or reacts to alarms.
  • Lambda MicroVMs announcement: AWS’s primary source for the Firecracker-isolated runtime, its eight-hour run length, Regions and pricing. Check it before you plan an investigation that outlasts standard Lambda’s 15 minutes.
  • How Amazon Bedrock AgentCore Runtime works: a microVM per session, the 15-minute idle and eight-hour lifetime limits, and why session state isn’t durable storage.
  • NVIDIA OpenShell, its overview docs and its default policy: policy-enforced sandboxes for agents. The default policy is restrictive, with no outbound network rules. Read the effective policy for your sandbox and add only the network destinations and providers your agent needs.

Give your AI tools the context they're missing

Partners

Need a HIPAA foundation first?

Talk to our partner network