Project 5 — Tool-calling agent
Practice this questionRequirements
Read claim status, lookup policy, retrieve instructions, ask for missing IDs, and escalate. Start read-only.
Architecture
User → bounded decision loop → validated/authorized tools → observations → answer. Tools are existing business-service wrappers.
Technologies
Provider SDK or chosen agent SDK, Zod tool schemas, existing Node services, run tracking.
Database design
Runs, call/result references, task outcomes, and conversation ownership; no need to duplicate canonical claims.
API design
Agent message/run endpoints; tools called internally through narrowly scoped contracts.
AI design
Small allowed toolset, clear descriptions, typed results, maximum steps/deadline/token budget, and stop/clarify behavior.
Security
Tool allowlist, object authorization, no arbitrary database/URL tool, output minimization, and injected-result tests.
Evaluation
Correct tool and arguments, denied cross-customer IDs, absent data, transient failures, loops, and truthful task completion.
Observability
Per-tool spans, loop steps, error reasons, unnecessary calls, outcome, and cost distribution.
Deployment
Apply provider and service quotas; isolate read-only credentials; keep safe template fallback.
Interview questions
- “Does the model execute the function?” Answer: it proposes; application code authorizes and executes.
- “How do you stop loops?” Answer: explicit progress, step, time, and token checks.
Acceptance: No fabricated status and no unauthorized object access, even under adversarial prompts.