I Built My First Agent
I sat down last weekend with Claude’s Agent SDK excited to build and deploy my first agent. It ingests errored workflow events and outputs GitHub pull requests with suggested fixes.
Here’s What I Learned
It only took around 2 hours to get it working and another 6 to get it working well. The majority of the time was spent on traditional time sinks like inspecting network calls to figure out how to fetch third party data and on hosting the agent. All in all I’d call it $1,000 in dev time from start to finish.
Out of the box, the agent submitted beautiful pull requests, but often failed to address the underlying reason the workflow errored. This was largely solved by adding instructions and a few examples to the system prompt. While it’s too soon to tell how well this agent will perform in production, I am fairly optimistic after testing a handful of cases.
I thought Claude’s Agent SDK was very thoughtful as it has wonderful baked in orchestration, tools, and default configurations while being extremely extensible. Adding a custom system prompt was as easy as adding a markdown file and extending the agent’s capabilities was as easy as creating an inline MCP server and adding it to the allowed tools list.
The agent was not cheap to run. It cost ~$0.5 per run using the latest anthropic models.
And finally, my biggest learning was conceptual (and hopefully practical): There’s no hard and fast rule for what should be a workflow and what should be an agent. This agent could have been implemented as a workflow—we could have defined each step explicitly. Likewise, even the most straightforward workflows could be built as agents. That said, reading through the agent’s logs you see that the agent executed 30+ thoughtful steps to reach its goal. Hardcoding all those steps in a workflow would have been impractical (though not impossible).
So my new mental model for agents isn’t that they can do things workflows can’t. Instead, I see them as a different type of workflow—one that makes sense when:
- You need many LLM calls scattered throughout the process
- The orchestration (”What tasks should I do? And in what order?”) is better expressed through natural language (a system prompt) than through explicit conditionals and loops
Resources