Chapter 1 · Practice 4 of 4
If you use a framework, understand the prompts and calls underneath it
Why it matters
Agent frameworks save boilerplate, but Anthropic's article warns that they can add abstraction layers that obscure the underlying prompts and responses, which makes debugging harder.
The article suggests starting with the model APIs directly, since many patterns take only a few lines of code. If you use a framework:
- find out exactly what prompt it sends, including any system text it adds;
- check how it formats tool results and errors;
- confirm where retries, limits and timeouts are set;
- make sure you can log every model and tool call it makes.
If you cannot answer these, you cannot explain why the agent did what it did.