Building AI Agents and Tool-Calling Workflows

Study Building AI Agents and Tool-Calling Workflows with full lessons, revision notes and quick reference, across 37 lessons.

15 modules. 37 lessons. Self-paced.

Roles this course prepares you for

Course curriculum

No exam weights apply. Lessons follow practical prerequisites, from one model request to a tested, secured and evaluated agent, then MCP, a second API format and a final challenge.

Free to read: 5 lessons, no account needed

Start Here (3 lessons)
  1. How AI agents work (read now)

    • Describe an agent as a model choosing tools in a loop that code executes, and name what stops it.
    • Read a recorded agent run and point to each model call, tool call and the final answer.
  2. Set up Ollama and the course model (read now)

    • Install Ollama, keep it on 127.0.0.1 with cloud features off, and pull granite4.1:3b.
    • Read `ollama ps` and `/api/version` and explain what each proves.
  3. Set up Python and check readiness (read now)

    • Create ~/agents-practice with the course environment and the four pinned libraries.
    • Run the readiness script and diagnose a failing check from its evidence.
Talking to a Model (3 lessons)
  1. Send a chat request and read the response (read now)

    • Send a non-streaming chat request with httpx and read every response field with its unit.
    • Explain tokens, the context window and why a reply is a prediction.
  2. Control generation and measure variation (read now)

    • Set temperature, seed, num_predict and num_ctx deliberately and predict their effect.
    • Measure variation over repeated runs and explain what a seed and temperature 0 do and do not guarantee.
  3. Stream replies and handle errors

    • Stream a reply from newline-delimited JSON and read the final chunk's usage.
    • Set timeouts and handle connection errors, timeouts and HTTP error statuses.

With course access: 32 lessons

Structured Output (2 lessons)
  1. Get structured output with a schema

    • Describe the required output as a Pydantic model and send its JSON Schema as `format`.
    • Validate the reply and explain what the constraint guarantees.
  2. Check and repair model output

    • Add plausibility checks the schema cannot express.
    • Repair invalid or implausible output with a bounded retry that records why it stopped.
Tool Calling (3 lessons)
  1. Understand the tool-calling protocol

    • Trace a tool-calling exchange message by message.
    • Write tool definitions from Pydantic models.
  2. Run your first tool call

    • Generate the practice database and query it safely with placeholders.
    • Run a tool the model asks for and return its result.
  3. Handle several calls and tool errors

    • Handle several tool calls in one turn.
    • Return invalid arguments, unknown tools and tool failures to the model as short, corrective messages.
The Agent Loop (3 lessons)
  1. Write the agent loop

    • Write a loop that runs until a final answer or a step, token or time budget.
    • Report why each run stopped.
  2. Run every branch with a scripted model

    • Write a scripted model with the adapter's interface.
    • Run every loop branch without a model.
  3. Choose an agent or a workflow

    • Explain how a fixed workflow differs from an agent.
    • Choose between them for a described task and justify it.
Traces and Tests (2 lessons)
  1. Trace every step

    • Write a JSON Lines trace of every model and tool call.
    • Use a trace to explain why a run failed.
  2. Test agent code with pytest

    • Test the loop and tools deterministically with pytest and the scripted model.
    • Explain what scripted tests prove.
Designing Tools (3 lessons)
  1. Design tools a model can use

    • Redesign weak tools: names, descriptions, narrow parameters, corrective errors, empty results, bounded output.
    • Separate read tools from write tools.
  2. Make changes safe to repeat

    • Write a create_booking tool with an idempotency key.
    • Explain why a retried change must not apply twice.
  3. Measure tool use over repeated runs

    • Measure tool choice, valid arguments and completion over a task set with repeats.
    • Compare two designs with Wilson intervals.
Workflows (4 lessons)
  1. Chain and route model calls

    • Chain model calls with programmatic checks between steps.
    • Route enquiries to specialised prompts and tools.
  2. Run independent calls concurrently

    • Run independent calls concurrently with asyncio, httpx.AsyncClient and a semaphore.
    • Measure why concurrency does not speed up one local model.
  3. Evaluate and revise with a stopping rule

    • Build an evaluate-and-revise loop that stops for a stated reason.
    • Use code checks before model judgement.
  4. Compare a workflow with an agent

    • Compare a workflow and an agent on the same task set.
    • Justify a choice from the measurements and a stated priority.
Context and Memory (3 lessons)
  1. Measure and manage the context window

    • Measure context use and detect a request that exceeds the context.
    • Choose num_ctx against its memory cost.
  2. Trim and summarise long conversations

    • Keep a long conversation within budget by trimming and summarising.
    • Check what a summary lost.
  3. Give the agent notes and document search

    • Give an agent persistent notes and a keyword search tool with cited passages.
    • Name the blind spots of keyword search.
Safety (3 lessons)
  1. Limit what tools can do

    • Confine tools to allowed actions and paths.
    • Require approval with a dry-run preview and audit every change.
  2. Keep secrets out of prompts and traces

    • Keep a secret out of the model's context, tool results and traces.
    • Redact configured secrets in traces.
  3. Defend against prompt injection

    • Show an instruction in a tool result changing an agent's behaviour.
    • Reduce its impact with layered controls and state the remaining risk.
Reliability (2 lessons)
  1. Handle timeouts, retries and bad calls

    • Retry transient failures with capped, jittered backoff and never retry unsafe changes blindly.
    • Detect invented and repeated calls.
  2. Resume an interrupted run

    • Save run state after each step and resume an interrupted run.
    • Show each change applied exactly once after resumption.
Evaluating Agents (2 lessons)
  1. Build an evaluation task set

    • Write evaluation tasks with programmatic checks on calls, state or normalised text.
    • Keep development and evaluation tasks separate.
  2. Compare agent variants with confidence

    • Compare two agent variants over repeated runs with intervals.
    • Explain the limits of using a model to grade a model.
Tools over MCP (2 lessons)
  1. Expose tools from an MCP server

    • Build a local MCP server exposing the practice tools with typed results and ToolError messages.
    • List and call its tools from the SDK client.
  2. Connect the agent to MCP tools

    • Bridge the agent loop to an MCP server over stdio.
    • Treat server descriptions, annotations and results as untrusted.
A Second API Format (1 lessons)
  1. Add the Anthropic Messages API format

    • Write a second model adapter for the Anthropic Messages format and run it against Ollama's local /v1/messages endpoint.
    • Run the same tests through both adapters and explain the differences.
Final Challenge (1 lessons)
  1. Final challenge

    • Build, test, secure and evaluate an agent for a supplied task within a time budget.
    • Justify the design and evidence in a short report.

Study views

  • Full Course
  • Revision
  • Quick Reference

Unlock all 37 lessons

Course access opens every lesson and adds revision notes, the Quick Reference, saved progress, bookmarks and your own notes.

INR 199 plus 18% GST. 90 days of online access. No auto-renewal.

Know what is included

Independent learning material from Vectametric. Not affiliated with or endorsed by the organisations behind the tools it teaches. Practice exams and projects are separate. Completing a course is not a professional certification.

Questions about courses

Are these video courses or reading courses?

The current courses use written lessons, examples and diagrams. Full Course, Revision and Cheat Sheet or Quick Reference views cover the same learning sequence at different levels of detail.

Which course should I start with?

Choose a Certification Course for a named exam, a Career Path Course for a role-led sequence, or a Skill Course for a focused subject. Read its level, prerequisites and curriculum before enrolling.

Do revision notes replace the full lessons?

No. Start with the full explanations, then use revision notes to refresh your understanding. Cheat sheets are concise study references, not a substitute for learning or permission to use notes during an official exam.

Are practice exams and projects included?

No. Course access, practice-exam bundles and project access are separate. An official certification, exam booking or voucher is not included.

How long do I have access?

The course page and checkout show the current online access period and price, including free enrollment where offered. Access starts when enrollment is confirmed and does not auto-renew.

Can I read lessons before enrolling?

Yes. Each course opens its first lessons to read without an account, and some courses are open in full. The course curriculum marks the lessons you can read now. Course access adds the remaining lessons, the Revision and Cheat Sheet or Quick Reference views, saved progress, bookmarks and personal notes.

Review the Terms and No-Refund Policy before confirming access. All sales are final; Vectametric does not offer refunds.

This website is operated by VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED, operating as Vectametric.

Corporate Identity Number (CIN): U85499KA2026OPC229822. GSTIN: 29AAMCV8281D1ZS. Registered office: RS NO/38/2A/1 BASTAND, ROAD MAHANTESH NAGAR, Ramdurg, Ramdurg, Belgaum- 591123, Karnataka.

Queries and grievances: Prajval Honnungar, Grievance Officer and Data Protection Contact.

Telephone: +91 94800 09310. Support: support@vectametric.com. Grievances: support@vectametric.com.

Copyright 2026 VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED. All rights reserved.

Vectametric home · Roadmaps · Vecta IT Exams · Vecta Government Exams · Vecta Banking & Finance Exams · Vecta Entrance Exams · About us · Contact · Privacy Policy · Terms and Conditions · No-Refund Policy