Project 5 — Tool-calling agent
Words made simple
A few useful meanings before you read the explanation.
- Agent
- An application that uses a model to choose its next action within defined limits. It can use tools and continue through several steps.
- AI
- Software techniques for tasks such as recognizing patterns, understanding language or generating content.
- API
- A way for one piece of software to ask another for data or an action. A claims API might return the current status of a claim.
More words from this lesson
- Token
- A small piece of text processed by a model. It may be a whole word, part of a word, or punctuation.
- Schema
- A description of the fields and value types that data should contain. It helps check that an answer has the expected shape.
- Authorization
- Checking what that identity is allowed to read or do. Being logged in does not grant access to every record.
- Evaluation
- Checking results against examples and clear criteria to find whether the system works well and where it fails.
- Observability
- Being able to understand system behavior through records such as logs, measurements and traces.
Requirements
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.
Can you explain it without the notes?
Project 5 — Tool-calling agent
Use your own words. Explain an example and one limitation before checking the explanation.
Check your explanation
Requirements: Read claim status, lookup policy, retrieve instructions, ask for missing IDs, and escalate. Start read-only.
Turn this concept into a clear answer.
Practice this conceptAdapted from 13_AI.MD · “Project 5 — Tool-calling agent”. Examples are study fragments; framework behavior can depend on your version.