← All masterclasses

Agentic Workflows in Production

Task planning, tool use, handoffs, and orchestration with Django + Celery.

3–5 days Backend engineers, full-stack developers, tech leads

Overview

Going from a ChatGPT wrapper to a production agentic system is a different engineering discipline. This masterclass covers the full stack: task decomposition, tool orchestration, human-in-the-loop handoffs, and reliable async execution — built on Django + Celery so it integrates with real backend infrastructure.

What you’ll build

A production agentic workflow system featuring:

  • Multi-step task planning with dynamic replanning
  • Tool registry with versioned function definitions
  • Async execution with Celery workers and Redis
  • Human-in-the-loop approval gates
  • Full observability and audit trail

Curriculum

Day 1 — Agent Fundamentals in Production Context

  • Why “just calling an LLM” isn’t an agent — the gap between demo and production
  • Task decomposition strategies: top-down planning vs iterative refinement
  • State machines for agent workflows
  • Django project setup with Celery, Redis, and Postgres

Day 2 — Tool Use & Function Calling

  • Designing tool interfaces: input schemas, output contracts, error handling
  • Tool registry pattern: versioning, discovery, access control
  • Connecting to internal APIs, databases, and external services
  • Parallel tool execution and dependency resolution
  • Testing tool integrations in isolation

Day 3 — Orchestration & Handoffs

  • Multi-agent patterns: supervisor, swarm, pipeline
  • Agent-to-agent communication protocols
  • Human-in-the-loop: approval gates, escalation paths, review queues
  • Handling long-running workflows (hours/days, not seconds)
  • Celery task chains, chords, and error recovery

Day 4 — Reliability & Observability

  • Retry strategies: idempotent tools, exponential backoff, dead-letter queues
  • Structured logging for every agent decision and tool call
  • Tracing: OpenTelemetry for agent workflows
  • Cost tracking per workflow execution
  • Alert setup: detecting stuck, looping, or hallucinating agents

Day 5 — Deployment & Scaling

  • Docker Compose for local development, Kubernetes for production
  • Worker scaling: auto-scaling Celery workers based on queue depth
  • Database migrations and zero-downtime deploys
  • Load testing agentic workflows
  • Capstone: deploy a multi-step workflow handling a real business process

Prerequisites

  • Python and Django experience
  • Basic familiarity with message queues (Redis/RabbitMQ)
  • Docker basics

Outcomes

Your team leaves with a deployable agentic workflow engine, patterns for adding new workflows, and operational runbooks for production.

Interested in this masterclass?

Tell me about your team and I'll tailor the programme to your needs.

Book this masterclass