An AI agent reports that it updated a CRM account. The trace shows that the first update succeeded, the connection timed out, and a retry created a duplicate follow-up. The final message looks plausible. The business now has two tasks assigned to the same person. Catching that kind of failure is the work of agent engineering.
The harness defines how an agent operates
The harness is the software around the model. It supplies context, exposes tools, manages execution and records results. In the CRM example, it can offer a read-only account lookup and a purpose-specific operation for creating a follow-up. A stable request identifier lets the service recognise and safely handle repeated attempts after a timeout.
When the outcome is unclear, check the record before retrying. Keep action state in the application and have the agent report what the tools confirm. If a change needs approval, record the proposed action and approval together so the agent can resume with a clear next step. Anthropic’s long-running agent harness research
An ADE makes failures repeatable
An Agent Development Environment is an emerging term for a workspace or workflow that supports building, running and debugging agents. The practical capabilities include inspecting tool inputs and outputs, replaying a task, switching configurations and comparing outcomes on the same examples.
To diagnose the CRM incident, record the model configuration, tool responses and test fixture version. Recreate the timeout after the first write in a staging fixture. Check how both the old and new harness handle the same response sequence. A reproducible trace helps you distinguish an application retry issue from a reasoning error.
Sandboxing controls what the agent can touch
Run generated code or tool actions in an environment with scoped resources. For a staging CRM test, give the agent synthetic records, limited network access and a dedicated test identity. Keep production credentials outside that environment. In production, enforce permissions at the service boundary so each connector can only perform operations that the agent's role allows.
Sandboxing and tool permissions cover different surfaces. An isolated runtime can still reach a broadly privileged service if given its credentials. A restricted connector can still coexist with code that has unnecessary network access. Review both paths for the operations your workflow exposes.
Trajectory evals check the work behind the answer
Outcome checks inspect the final state. Trajectory checks inspect the steps that produced it. Combine them, and leave room for multiple valid sequences. A different lookup order can be fine if the agent still meets the approval requirement and creates exactly one correct follow-up. Anthropic’s guide to agent evaluations
| Scenario | What the evaluation checks |
|---|---|
| Ordinary follow-up | The correct account receives one task |
| Timeout after writing | The agent checks state before repeating the action |
| Ambiguous account names | The agent verifies the account or asks for clarification |
| Missing approval | The agent records the proposal without writing to the CRM |
Include the timeout case in routine regression runs. Monitor duplicate actions, approval violations, completion rate and time to resolution. If behaviour changes after a model or connector upgrade, traces can show which requirement failed and give you a case to replay.
Before increasing the agent's access, run the workflow with staff reviewing the proposed changes. Compare the proposal with what staff actually enter and label recurring disagreements. If the team regularly corrects due dates, add the due-date rule to the tool contract or prompt and replay those examples. Expand the scope when the workflow meets the team's acceptance criteria on realistic traffic and staff can see how to recover from exceptions.
For related deployment patterns, read the AI demo-to-production checklist. The AI agent development page describes the wider integration work around these workflows.
