Generative AI

Agentic AI: From Workflows to Autonomous Agents

The difference between an agentic system and an agent, and the best practices for building both: workflows, the agent loop, tools, context engineering, skills, MCP, code execution, human in the loop, durable execution, evaluation, observability, security and production. Theory and a lab in every class, 24 labs verified in Docker with the official documentation, and a video in every class.

Advanced · 32 hours · 24 lessons · Course language: Spanish and English

A best-practices course on agentic AI, with theory and a lab in every class. You start with the distinction that organizes everything: "agentic" is a property measured in degrees (how much the model decides), and an agent is the end of the scale where the model directs its own process and tools. You solve the same complaint at Ruta Norte, a parcel delivery company, with one call, with a workflow and with an agent, and you measure what each one gains and risks. You write an agent's loop by hand and then with Pydantic AI 2; you build agentic workflows (routing, chains with gates, parallelization, orchestrator-workers, evaluator-optimizer); you design tools the model uses well and check it with cases; you apply context engineering, memory with notes, harnesses for long tasks and Agent Skills with progressive disclosure. You publish tools with the MCP Python SDK 2 (elicitation, annotations and tools pinned against poisoning), run the agent's code in a Docker sandbox, and add human approvals that survive restarts, durable execution with DBOS, measured multi-agent systems and failure handling. You observe with OpenTelemetry and Jaeger, evaluate with pydantic-evals (trajectories, validated judges, pass@k and pass^k), test without a model using FunctionModel, defend against prompt injection by design, apply least privilege with auditing and a kill switch, and publish the agent as a service with streaming. Everything runs on your computer with a local model, with no API keys. The lessons, quizzes and videos are in English; the lab code and the local model's answers keep their original Spanish, and every lesson explains the names.

What you will learn

  • Explain the difference between an agentic system and an agent, and choose the level of autonomy with data
  • Write an agent's loop by hand and with Pydantic AI 2: tools, typed output, dependencies and limits
  • Build agentic workflows (routing, gates, parallelization, orchestrator and evaluator) and know when they are enough
  • Design tools, context, memory, long-running harnesses and skills that a model uses well
  • Publish and consume tools with MCP securely, and run the agent's code in a sandbox
  • Make an agent reliable: human approvals, durable execution, retries, budgets and idempotency
  • Observe, evaluate and test agents: OpenTelemetry traces, pydantic-evals, validated judges and tests without a model
  • Defend an agent against prompt injection by design and take it to production with least privilege

Skills

Agentic AI, AI agents, LLM workflows, Pydantic AI, Tool design, Context engineering, Agent Skills, MCP, Sandboxed code execution, Human in the loop, Durable execution, Multi-agent systems, OpenTelemetry, Agent evaluation, Agent security, Agents in production

Program

Module 1: Agentic versus agent (free classes)

The autonomy spectrum, an agent's loop written by hand and the same agent with Pydantic AI 2.

Project: The same query solved with one call, a workflow and an agent, measured.

  1. Agentic versus agent: the autonomy spectrum: Your environment and the same query with one call, a workflow and an agent, measured.
  2. The agent loop, written by hand: Messages, tools, errors as data, the growing context and a step cap.
  3. The same agent with Pydantic AI 2: Typed dependencies, authorization in code, validated output, retries and usage limits.

Module 2: Agentic workflows

Routing, chains with gates, parallelization, voting, orchestrator-workers and evaluator-optimizer.

Project: A router with 10 out of 10 correct and answers that pass code gates.

  1. Routing and chains with gates: A classifier with closed options, measured, and a chain the code verifies.
  2. Parallelization and orchestrator-workers: Sectioning, voting, an orchestrator that plans and why voting doesn't fix a systematic error.
  3. Evaluator-optimizer: A writer and a demanding reviewer in a cycle, with criteria in code and a round cap.

Module 3: Tools and context

Tools the model uses well, context engineering, long-running harnesses and Agent Skills.

Project: An agent that works one task per session, with progress on disk and skills on demand.

  1. Tools the model uses well: Two toolsets measured with the same cases: names, descriptions, errors and answers.
  2. Context engineering: The whole manual or on demand, the growing history, trimming and notes that aren't lost.
  3. Harnesses for long tasks: An initializer, one task per session, progress on disk, verification and commits.
  4. Agent Skills: progressive disclosure: SKILL.md, a catalog of twelve procedures and skills that load only when needed.

Module 4: Protocols and code execution

MCP with SDK 2, elicitation, tools pinned against poisoning and a Docker sandbox.

Project: An MCP server in Docker and an agent that writes and runs programs without a network.

  1. MCP: tools for any agent: A server with SDK 2 in Docker: tools, resources, prompts, structured output and errors.
  2. Advanced, secure MCP: Elicitation with protocol 2026-07-28's resolvers and tools pinned against poisoning.
  3. Code execution: code mode: A Docker sandbox with no network or disk, tested, and an agent that programs instead of calling tools.

Module 5: Reliability

Human in the loop, durable execution with DBOS, multi-agent systems and failure handling.

Project: A payment batch that survives a kill -9 without paying twice.

  1. Human in the loop: Deferred tools, approvals that survive the process and actions the agent can't make up.
  2. Durable execution: DBOS on PostgreSQL: a batch that dies with kill -9 and resumes without paying twice.
  3. Multi-agent systems: when they are worth it: A generalist against a coordinator with specialists: correct answers, calls and tokens.
  4. When something fails: A fallback model, transient and permanent errors, time limits, budgets and idempotency.

Module 6: Observe, evaluate and test

OpenTelemetry traces in Jaeger, pydantic-evals with trajectories and judges, and tests without a model.

Project: An evaluation with pass^k and a test suite that stops a dangerous change.

  1. Observability with OpenTelemetry: Traces with the GenAI conventions in Jaeger, your own spans and traces without personal data.
  2. Evaluating agents: pydantic-evals: result, trajectory, a judge validated with a sabotaged agent, pass@k and pass^k.
  3. Tests without a model and CI: FunctionModel as a script, tests that stop a dangerous change and GitHub Actions pinned by SHA.

Module 7: Security, production and final project

Prompt injection, least privilege, auditing, the agent as a service and the complete assistant.

Project: Ruta Norte's complaints assistant with a quality gate.

  1. Prompt injection and the lethal trifecta: A real indirect attack and the defenses by design: a fixed recipient, less data and quarantine.
  2. Least privilege, auditing and a kill switch: Tools by role, a log of every action, a kill switch and secrets out of the context.
  3. The agent in production: A service with FastAPI and SSE, sessions in PostgreSQL, per-turn budgets and health.
  4. Final project: Ruta Norte's assistant: A workflow, an agent with MCP, approval, traces and a quality gate that stops a real error.

Prerequisites

  • Python with functions, classes, basic async/await and virtual environments
  • Having used some LLM's API (the course reviews what you need)
  • Docker Desktop with at least 8 GB of memory (10 GB is better), and uv (class 1 sets up the environment)

Next courses

  • Generative AI Patterns: Agent Architectures, Protocols and LLMOps · Advanced · 30 hours
    The patterns for building generative AI systems, from workflows to multi-agent systems, with MCP, A2A, human in the loop, agentic RAG, evaluation, guardrails and security. 24 labs in Docker with a local model, based on the original papers and the official documentation, and a video in every lesson.
  • LLMOps: Generative AI in Production with Best Practices · Advanced · 25 hours
    The complete lifecycle of an LLM application: versioned prompts, traces, evaluation with datasets and calibrated judges, CI, metrics and SLOs, a gateway, caching and costs, personal data, red teaming, the supply chain, governance and canary deployments. 20 labs in Docker with a local model, based on the official documentation, and a video in every lesson.

See all courses