You already know: the agent loop and validating tool calls (Agent fundamentals); timeouts, retries and rate limits for HTTP services (D1 Networking); processes, isolation and resource limits (D1 Operating systems).
Why this matters for Atlas. An agent is only as good as its tools. The model chooses tools from their names and descriptions, reads their outputs as context, and keeps going after their errors. A badly designed tool wastes tokens and confuses the model. An unsafe one turns a model mistake into an incident. This lesson is the engineering around a tool call: designing the interface, scoping permissions to the user, surviving flaky APIs without doing anything twice, sandboxing code, and treating every tool result as untrusted input.
1. Design the tool for the model, not for the API
The question. Your billing API has 23 endpoints. Should the agent get 23 tools?
Start from nothing. The model picks tools by reading their names and descriptions, and every definition costs context tokens on every step. Tools designed like a REST API (GET /customers/{id}, GET /invoices?customer=, GET /charges?invoice=) force the model to chain three calls and carry IDs between them. A tool designed around the task (find_duplicate_charges(student_email)) does that chaining in code, where it's deterministic and free.