The prompt carries the judgment.The limits live in code.
The same errors kept reaching the team chat, and the first answer depended on who was watching. Now a triage agent answers in the thread with the relevant telemetry already read, and its infrastructure tools can't reach production.
Fran Marcano · · 5 min read
Access
Company SSO · RBAC per action
Memory
Per thread · RAG over company docs
Context
Traces, logs, crash reports
Contents
Context
From an assistant to a triage agent
I started with an assistant. The first version created test data and answered questions about releases. It was organized around what the agent could do, not around what engineers kept asking. The team's real support threads showed what it was missing. Many questions were errors someone had already diagnosed, and many needed live service state the assistant couldn't read.
So I rebuilt it as a triage agent with read access to traces, logs and infrastructure state, and turned the recurring errors into a playbook of known errors. Test data and release checks stayed, as tools. The price is a narrower agent. A new error starts from telemetry and the docs, with no known answer to lean on.
Today it is the triage and SRE subagent of the general agent that engineers reach from the team chat, which runs on AWS Bedrock AgentCore with the Strands Agents SDK. Each channel sets a mode, the general agent delegates triage work to this subagent, and its answer reaches the thread through the chat gateway. It triages support requests and crash alerts, supports SRE work during an incident by reading live state, creates test data and checks releases, within what each person's role allows. The platform it shares with the other subagents (the chat gateway, the harness, company SSO with a role check on every action, memory and evals) is described in the platform article.
The model's work here is judgment: reading a crash next to the code that threw it, a trace next to the log line that explains it, or a vague question next to an error the team has seen before.
Architecture
What it reads
Telemetry. OpenTelemetry traces in OpenSearch, CloudWatch logs and crash reports.
Code and docs. The code behind a stack trace, through the code host, and the team's documentation.
The playbook. Errors the team has already diagnosed, written from past support threads.
Live state. Release status, test data and infrastructure state, and a people directory among other tools.
The general agent hands triage to its subagent
From the team chat to the triage subagent and back
Calls a modelNo model
Fig. 1The channel sets the mode, the general agent delegates, and everything the subagent says reaches the chat through the gateway, which never calls a model.
Lifecycle
Three kinds of request
A crash alert is a request nobody typed. The crash reporter posts an alert in an alerts channel. The gateway reads its type and drops the kinds the agent doesn't triage. The rest go to the general agent as a triage prompt in that channel's mode, and the triage subagent reads the crash through the crash-report tools and the code behind it through the code-host tools. It returns a summary with a severity and the code's likely author, and the gateway turns that into a triage card in the alert's thread, with buttons for feedback.
A support question is the case it was rebuilt for. The agent reads the traces and logs around the request and matches what it finds against the playbook. When no known error fits, the docs and live service state carry the answer. It answers in the thread, and the engineer decides what to change.
A request from a person takes the same path. An engineer mentions the agent and asks for a test user. The gateway passes along the prompt, the channel's mode, who is asking and the thread. The agent picks the test-data tool, and the action runs only if the engineer's role allows it. Asking for another test user in the same thread keeps the first request's context.
Not every alert reaches the model
One crash alert, from post to card
Calls a modelDecided in code, before any model
Fig. 2Code decides which alerts reach the model. What comes back is a triage card in the alert's thread.
Controls
Where the limits live
The agent has three limits: no infrastructure tool changes anything, none reaches production, and no action goes beyond what the engineer's role allows.
The easiest place to write a limit is the prompt, and a limit there holds only while the model follows it. A system prompt is text the model weighs against other text, such as the engineer's message, a log line or a stack trace pasted into the thread. A check in a tool's code runs the same way whatever that text says.
Each channel has a mode, and the mode only picks the system prompt. General questions get one, support and release channels another. Connecting a channel takes one entry in the gateway's table and a deploy. The tool list stays the same in every mode, and a request with no mode gets the general prompt. That fallback is safe because no default can widen what the agent may do.
One tool surface means one surface to review, and no channel can get a smaller tool list, so a narrower limit has to be written as code, inside the tool or in the services around the model. The infrastructure tools are where that matters most. They read live service and deployment state outside production, which is what an incident needs, and they check the target environment in their own code and refuse production. The agent's docs say it in one line: don't move this check into the prompt.
Each tool's docstring is the spec the model reads, so a change to what the model is told shows up in the same diff as the code. The evals that decide whether a change to the prompt, a tool or the playbook stays are built from real support threads and past alerts.
Where each limit lives
The prompt on top, the limits in code
Refused in the tool's own code
Fig. 3Take the prompt layer away and every limit in this figure still holds.
Decisions
It doesn't fix what it finds
That is the largest cost of the design. In an incident, a person makes the change, and that can cost minutes an agent with write access might have saved. In exchange, its infrastructure tools only read, so a message in a thread, typed or pasted from a log, can't make them change anything.
I left out the tools that fix things, such as restarting a service or changing a setting. Each one would put a write path next to production, and each such path is one more limit that has to be right in code.
The playbook only knows errors that have already happened, so it is only as current as the threads it was written from.
Results
In production
The triage agent runs in production, on support requests and crash alerts, and the engineer still takes it from there.
To build one, a team needs to triage in a chat already, have telemetry an agent can read, such as traces, logs and crash reports, and have enough past threads to write a playbook and evals from. It also needs typed tools it can test without the chat, an identity provider and roles to check each action against, and infrastructure it can read without write access. It helps less when the bottleneck is the fix rather than the diagnosis, or when the systems record too little for an agent to read.
If I started again, I would read the threads before choosing the tools. I did it the other way round, and rebuilt the agent. I would also write the limits before the prompt and test them. If deleting a sentence from the prompt would open production, the limit is in the wrong place.
Next system
What turns a model into an agent?
The harness around it: tools, memory, runtime and guardrails. I build that layer, including what the agent is not allowed to do.