Agents & workflows
Implement tool / function calling
Define tools, let the model call them, execute safely, return results into the loop.
~8 focused hours·intermediate
Tools: OpenAI function calling, Anthropic tool use, Pydantic, JSON Schema, LangChain tools
Market relevance — share of job ads asking for this
What employers mean
You should be able to…
- Define a tool/function schema (name, description, JSON-schema parameters) that an LLM can call reliably
- Parse a model's tool_call / function_call response and route it to the right Python function
- Validate and coerce tool arguments with Pydantic before executing side-effecting code
- Return tool results back into the conversation so the model can use them in its next turn
- Handle parallel/multiple tool calls in a single model turn
- Design clear tool names, descriptions and error messages so the model picks the right tool and recovers from bad input
- Add retries and timeouts around flaky external tool calls (APIs, DB queries, web search)
- Force or restrict tool choice (e.g. require a specific tool, or disable tools for a turn)
Needs first: Get reliable structured outputs from LLMs
Learn — free, link-checked
The few resources that matter
Read · beginner · 25 min · python.langchain.com
Tool calling concepts
Explains the provider-agnostic tool-calling abstraction that LangChain/LangGraph agents are built on. — LangChain
Read · beginner · 30 min · platform.openai.com
Function calling
Official reference for defining JSON-schema tools and parsing OpenAI's function-call output, the canonical starting point before wiring any framework. — OpenAI
Read · beginner · 30 min · docs.anthropic.com
Tool use with Claude
Shows Claude's tool_use/tool_result message loop end-to-end, including parallel and forced tool calls. — Anthropic
Course · beginner · 300 min · huggingface.co
Welcome to the AI Agents Course
Free multi-unit course covering agent fundamentals, smolagents, LangGraph and multi-agent systems with a certification project. — Hugging Face
Read · intermediate · 25 min · anthropic.com
Writing effective tools for AI agents
Practical guidance on tool naming, error messages and token-efficient outputs that make agent tool use reliable in production. — Anthropic
Read · intermediate · 40 min · openai.github.io
OpenAI Agents SDK
Lightweight alternative to LangGraph for agent loops, handoffs and guardrails, increasingly named in JDs alongside LangGraph/CrewAI. — OpenAI
Course · intermediate · 120 min · deeplearning.ai
AI Agents in LangGraph
Short video course building a ReAct agent and a LangGraph agent from scratch, taught by LangChain's founder. — DeepLearning.AI (with LangChain)
Practice
UPI transaction support bot with tool calling
Build a chatbot that answers customer questions about UPI transactions (status, refund eligibility, dispute filing) by calling 3-4 tools against a mock transactions database instead of hallucinating. Use Pydantic to validate every tool's arguments and return structured JSON results back to the model. Add a confirmation step before the 'raise dispute' tool actually mutates data.
Done when
- At least 3 distinct tools defined with JSON-schema parameters and docstrings
- Pydantic models validate and reject malformed tool arguments before execution
- A destructive tool (raise dispute) requires an explicit user confirmation turn before executing
- 10 sample conversations logged showing correct tool selection, including one where the model asks a clarifying question instead of guessing
Prove it
Evidence a recruiter can check
- Public GitHub repo with README showing the tool schemas and a transcript of 5+ real conversations
- A short screen recording or GIF of the bot correctly calling the right tool for 3 different intents
- Unit tests that assert malformed tool arguments are rejected before the tool executes
Interview
Questions you'll get asked
- Walk me through the full request/response loop when a model decides to call a tool.
- How do you make a tool description good enough that the model calls it correctly on the first try?
- What happens if the model hallucinates arguments that don't match your Pydantic schema? How do you handle that?
- How would you let a model call two independent tools in parallel and merge the results?
- Design a 'get order status' tool for an e-commerce chatbot — what's in the schema, and what do you return on failure?
- How do you prevent a tool-calling agent from calling a destructive tool (e.g. refund, delete) without confirmation?
- What's the difference between forcing a specific tool call and letting the model choose freely?