Implement agents and tools
Define bounded goals, schemas, permissions, memory, tool selection, failure handling, human approval, and observable agent execution.
- Lesson
- d2-lesson
- Practice pool
- d2-questions
- Application
- aip-l04
Implement secure model APIs, deterministic workflows, agents, tools, enterprise integrations, deployment, and production application patterns.
Define bounded goals, schemas, permissions, memory, tool selection, failure handling, human approval, and observable agent execution.
Package, configure, release, scale, secure, test, roll back, and isolate model-dependent application changes.
Connect identity, APIs, events, data systems, search, business workflows, and records with least privilege and failure isolation.
Handle invocation, streaming, quotas, retries, token limits, structured output, errors, authentication, and model-specific behavior.
Choose synchronous, asynchronous, event-driven, workflow, cache, batch, and developer-tool patterns based on constraints.
Use deterministic code or a workflow when the sequence and transitions are known. Use an agent only when dynamic planning or tool selection creates meaningful value and the goal, tools, permissions, time, cost, and stop conditions can be bounded.
Every tool needs a strict input/output schema, scoped workload identity, authorization independent of model text, timeout, retry policy, idempotency behavior, observability, and safe handling of untrusted results. High-impact or irreversible operations need an authoritative approval step outside the model.
Handle authentication, model identifiers, Regions, inference configuration, token limits, context construction, streaming, structured outputs, throttling, retries, timeouts, quotas, errors, and safe degradation. Connect identity, APIs, events, queues, workflows, data systems, and records without turning the model into the system of record.
Version code, prompts, model/configuration IDs, tool schemas, guardrails, retrieval configuration, datasets, thresholds, and infrastructure. Test in isolation, compare with a baseline, shift traffic gradually, observe quality/safety/latency/cost, and roll back the complete release unit. Changing only the prompt in production is still a production release.
Take one “agent” design and rewrite it as a deterministic workflow. Explain which uncertainty would justify restoring agency and which controls remain mandatory either way.