Logo di Designing Real World Ai Agents Workshop

Designing Real World Ai Agents Workshop

Community
iusztinpaul

Hands-on workshop: Build a multi-agent AI system from scratch — Deep Research Agent + Writing Workflow served as MCP servers. Includes code, slides, and video

Pubblicato daiusztinpaul
Repositorydesigning-real-world-ai-agents-workshop
LinguaPython
Fork
140
Stelle
510
Strumenti disponibili
0
Tipo di trasportostdio
LicenzaMIT
Link
  • Collega gli strumenti ai flussi di lavoro IA

    Designing Real World Ai Agents Workshop mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • Strumenti disponibili: 0

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni se il server li fornisce.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse della comunità open source

    Stelle: 510; fork: 140 (repository collegato).

Build Your Own Deep Research Agent + Technical Writer Multi-Agent System

A hands-on workshop, presented at AI Engineering Conference Europe, building a multi-agent AI system with two MCP servers: a Deep Research Agent and a LinkedIn Writing Workflow. Both connected to a harness like Claude Code or Cursor.

🎬 Full workshop available on YouTube ↓

📑 Slides here.


Whenever You're Ready, Here's How to Go Deeper

This workshop is a 2–4 hour taste. If you want to go from zero to shipping production-grade AI agents, check out our Agentic AI Engineering Course, built with Towards AI.

34 lessons. Three end-to-end portfolio projects. A certificate. And a Discord community with direct access to industry experts and us.

Rated 5/5 by 300+ students. The first 6 lessons are free:

Start here →


How to Use This Repo

Three ways to use this repo. Pick the mode that fits the time you have. Or work through all three in order, since each builds on the last:

  1. Watch the workshop and see the patterns end-to-end. Watch in ~2 hr. Start with the 2-hour YouTube workshop and the slides above. You'll come away with a mental model of the full multi-agent system: tool-use agents, evaluator-optimizer loops, grounded search, structured LLM output, and MCP-server design.

  2. Run the finished code. See it produce real artifacts. Run in ~30 min. Watch the system generate a research brief, draft a LinkedIn post through an evaluator-optimizer loop, and score itself with an LLM-as-judge. Follow the Getting Started and Running the Code sections to install the project and run the MCP servers, skills, and evaluation pipeline.

  3. Implement it yourself with agentic coding. Build a 1:1 replica from scratch in ~2–4 hr. Open implement_yourself/, a stripped-down skeleton prepared with 25 pre-groomed tickets and a custom /implement Claude Code skill that orchestrates SWE and Tester agents in a loop, ticket by ticket, until the directory matches src/. See implement_yourself/README.md for the kickoff guide.

    No cheating, by design. implement_yourself/ is a self-contained project. Open your harness (Claude Code, Cursor, …) directly in that folder (not at the repo root) so its working directory is scoped to the skeleton. The agents can't see the reference implementation in ../src/, can't grep it, can't read its files. You get a real build, not a copy-paste.

What You'll Build Today

Deep Research Agent — An MCP server that runs deep research using Gemini with Google Search grounding and native YouTube video analysis:

user topic → [deep_research] × N → analyze_youtube_video (if URLs) → [deep_research gap-fill] → compile_research → research.md

LinkedIn Writing Workflow — An MCP server that generates LinkedIn posts with an evaluator-optimizer loop:

research.md + guideline → generate post → [review → edit] × N → post.md → generate image

Both servers expose tools, resources, and prompts via the Model Context Protocol, letting any MCP-compatible harness orchestrate the workflow.

Patterns and concepts you'll learn:

  • Tool-use agents — letting the LLM decide which tools to call and when
  • Evaluator-optimizer loop — generate, review, edit in cycles
  • Grounded search — Gemini with Google Search grounding for factual research
  • Structured LLM output — Pydantic schemas for type-safe model responses
  • MCP server design — registering tools, resources, and prompts with FastMCP
  • LLM-as-judge evaluation — automated quality scoring with Opik

Example: End-to-End Workflow

Here's a real run through the full pipeline — from a topic seed to a published-ready LinkedIn post with an AI-generated image.

Final output


We planned 12 AI agents and shipped 1. It worked better. Sounds crazy, right? But it's a common story.

A client built an AI marketing chatbot. Their initial design had dozens of agents: orchestrator, validators, spam prevention. It failed.

A single agent with tools won. Tasks were tightly coupled. One brain maintained context. Tools were still specialized.

This is the core mistake. People jump to complex multi-agent setups too fast.

Think AI system design as a spectrum:

  • Workflows: You control steps.
  • Single Agent + Tools: Model decides flow.
  • Multi-Agent: Multiple decision-makers.

...

A single agent works for most cases. But it has limits. Too many tools? You hit "context rot." Past ~10-20 tools, LLMs degrade at tool selection. They get overwhelmed. Information gets lost in the middle.

So, when do you actually need multi-agent?

...

The simplest system that reliably solves the problem is always the best system. Don't overengineer your AI agents. Build simple first.

What's the most complex agent architecture you've simplified? Tell me below.

Read the full post

1. Start with a seed

A short research brief with 2-3 questions and reference links:

markdown
# Research Topic: AI Agent Architecture — When Less Is More

## Key Questions
1. Why do single-agent architectures with smart tools outperform multi-agent systems?
2. What are the only legitimate reasons to adopt a multi-agent architecture?

## References
- Stop Overengineering: Workflows vs AI Agents Explained (YouTube)
- From 12 Agents to 1 (DecodingAI article)

2. Deep Research Agent produces research.md

The agent runs multiple Gemini-grounded search queries and analyzes YouTube videos, then compiles everything into a structured research brief with sources.

The full research.md for this example is ~20k tokens across 2 queries and 1 video transcript.

3. Write a guideline

A short brief describing the post angle, audience, and key points:

markdown
# LinkedIn Post Guideline

## Topic
Why most AI teams should use 1 agent instead of 12.

## Angle
Open with the counterintuitive "12 agents → 1" hook. Introduce the complexity
spectrum. End with a clear mental model.

## Target Audience
AI engineers and technical leads building LLM-powered applications.

## Key Points
- A team planned 12 agents but shipped 1 — it worked better.
- The spectrum: workflows → single agent + tools → multi-agent. Stay left.
- "Context rot": past ~10-20 tools, LLMs degrade at tool selection.
- Only 4 valid reasons for multi-agent.

## Tone
Direct, opinionated, engineer-to-engineer. No fluff.

4. Writing Workflow refines the post

The evaluator-optimizer loop generates a draft, then runs 3 rounds of review + edit:

v0 — Initial draft

We planned 12 AI agents. We shipped 1.

Sounds crazy, right? But it's a common story.

A client wanted an AI chatbot for marketing content: emails, SMS, promos. Their initial design had dozens of specialized agents: orchestrator, analyzers, validators, spam prevention.

In practice? A single agent with tools won. Tasks were tightly coupled, sequential. Splitting it created information silos and handoff errors. [...]

The simplest system that reliably solves the problem is always the best system.

v3 — After 3 review/edit cycles

We planned 12 AI agents and shipped 1. It worked better.

A client built an AI marketing chatbot. Their initial design had dozens of agents: orchestrator, validators, spam prevention. It failed.

A single agent with tools won. Tasks were tightly coupled. One brain maintained context. Tools were still specialized.

Stay as far left as possible. Move right only when forced. [...]

The simplest system that reliably solves the problem is always the best system.

Harness engineering isn't just a new term for prompt engineering. It's where AI is heading.

Agents got useful enough for code and tools, but they weren't reliable. They'd repeat mistakes. The bottleneck shifted from code generation to consistent, reliable behavior in real systems.

Think of it this way: prompt engineering is what to ask. Context engineering is what to send the model. Harness engineering is how the whole thing operates. It's the environment around the model, beyond just tokens.

Car analogy: the model is the engine. Context is the fuel. The harness is the rest of the car: steering, brakes, lane boundaries. It prevents crashes.

A harness includes tools, permissions, state, tests, logs, retries, checkpoints, guardrails, and evals.

Stop hoping the model improves. Engineer its environment. The burden shifts to us, the builders, to prevent repeat mistakes.

I use self-reflection in my Claude Code setup. The agent learns what I liked, saving tokens and time.

Real companies are already doing this. Anthropic's long-running agents externalize memory into artifacts. OpenAI built a 1M-line product with zero manual code using structured docs and agent-to-agent reviews. Stripe agents merge 1K+ PRs weekly within isolated environments. LangChain moved a coding agent from outside the top 30 to top 5 on Terminal Bench 2.0 by changing only the harness. Same model, better system.

This isn't just for coding agents. This is the new way software gets built.

The programmer's job is shifting: less writing code, more designing habitats for agents to work without issues. Think machine-readable docs, evals, sandboxes, permission boundaries, and structural tests.

Reliability is the real work. Not just prompting.

LLMs are heading into systems, workflows, harnesses. Value comes from orchestration, constraints, feedback loops—not just a single prompt. The future isn't one genius model. It's models in well-engineered environments.

That's why harness engineering matters. It's what happens when you stop demoing intelligence and start shipping it.

Want to learn more? I explain it all in my latest video: https://youtu.be/zYerCzIexCg What's your biggest challenge building reliable agent systems right now?
Forget your latest AI model. There's a new system breaking the internet: Angine de Poitrine.

This masked duo from Quebec, deploys a high-resolution audio architecture. It makes everything else sound low-res.

Khn's custom double-necked microtonal guitar features 2x resolution: 24 notes per octave, not 12. Fine-grained frequency modulation.

Klek backs him up on drums, driving rhythms that feel like O(n^2) time signatures. Pure algorithmic complexity.

Their sound: "Dada Pythagorean-Cubist mantra-rock." Eastern traditions meet Frank Zappa.

Their 27-minute inference run for KEXP in Feb 2026 hit 7M+ views and broke the internet. Sold-out shows in NYC, London, Rennes followed.

Their anonymity adds another layer. Polka-dot costumes and papier-mâché masks are anonymous inference endpoints.

They communicate in an invented language. This ensures pure signal: raw output, no artist biases. A decoupled identity art experiment.

Khn's loop pedals are recursive pipelines. They stack complex guitar and bass in real-time, building dense soundscapes.

Just dropped: their new album, Vol. II, on April 3, 2026.

AI music is common. Angine de Poitrine proves human artistry is the ultimate non-deterministic function. Raw, complex, and deeply human.

You need to hear this.

What's the most complex system you've encountered recently?

Browse more full examples (seed, research, post drafts, reviews, final post + image) in the examples/ directory.

Tech Stack

ComponentTool
LLM APIGoogle Gemini (via google-genai SDK)
MCP FrameworkFastMCP
Data ValidationPydantic
SettingsPydantic Settings
ObservabilityOpik
Image GenerationGemini Flash Image
QARuff
Package Manageruv

Getting Started

Assumes working Python knowledge and basic familiarity with LLMs.

Prerequisites

RequirementCheckInstall
Python 3.12+python --versionuv python install 3.12 or python.org
uv 0.7+uv --versioncurl -LsSf https://astral.sh/uv/install.sh | sh (docs)
GNU Makemake --versionPre-installed on macOS/Linux. Windows: choco install make
Google API Key—aistudio.google.com/apikey (required — all LLM calls use Gemini)
Opik account—comet.com/site/products/opik (optional, for observability and evals)

Installation

  1. Clone and configure:

    bash
    git clone https://github.com/iusztinpaul/designing-real-world-ai-agents-workshop.git
    cd designing-real-world-ai-agents-workshop
    cp .env.example .env          # add your GOOGLE_API_KEY (+ optional OPIK_API_KEY)
  2. Install dependencies:

    bash
    uv sync

    Note: If you don't have Python 3.12+, uv can install it for you: uv python install 3.12, then re-run uv sync.

  3. Verify the setup:

    bash
    make test-end-to-end          # runs research + writing pipeline end-to-end

    If it completes without errors, you're good to go.

Running the Code

There are four ways to run the workflows:

ModeBest for
MCP Servers (recommended)Interactive use with AI harness
SkillsGuided slash-command workflows
Streamlit UIVisual end-to-end demo with live progress
ScriptsVerify setup, smoke tests

MCP Servers (recommended)

Connect the servers to an MCP-compatible harness (Claude Code, Cursor) for interactive use. This is the primary way to use the workshop.

Setup: The .mcp.json file is pre-configured. Both servers start automatically when you open the project in Claude Code or Cursor.

ServerToolsPrompt
deep-researchdeep_research, analyze_youtube_video, compile_researchresearch_workflow
linkedin-writergenerate_post, edit_post, generate_imagelinkedin_post_workflow

Usage:

  1. Open the project in Claude Code or Cursor
  2. Invoke an MCP prompt (e.g., research_workflow) to get guided through the full workflow
  3. Or call individual tools directly for fine-grained control

Manual server start (advanced):

bash
make run-research-server    # stdio transport
make run-writing-server     # stdio transport

Skills

Pre-built slash commands that orchestrate the MCP tools with sensible defaults. All output goes to outputs/{topic-slug}/.

CommandWhat it does
/researchDeep research on a topic → research.md
/write-postGenerate LinkedIn post from existing research → post.md + post_image.png
/research-and-writeFull pipeline: research a topic, then write a post from it

Example:

/research-and-write

The skill will ask you for a topic and guideline, then run the full pipeline end-to-end. Check examples/ to see what each step produces.

Streamlit UI

A standalone chat UI that orchestrates both MCP servers via FastMCP — no harness required. Drop in a topic (or upload a .md / .txt seed file) and watch the pipeline run end-to-end with live per-stage progress: search counters, sources collected, evaluator-optimizer loop, and image generation.

bash
make run-ui

Streamlit UI showing live deep-research progress, the writing workflow's evaluator-optimizer loop, and the generated image

Outputs land in outputs/{topic-slug}/ (same layout as the skills).

Run workflows directly from the terminal via make. Useful for verifying your setup works and running quick smoke tests. See [examples/](examples/) for full end-to-end output samples.

Test workflows:

bash
make test-research-workflow    # Research on a sample topic → test_logic/research.md
make test-writing-workflow     # Generate post from research → test_logic/post.md
make test-end-to-end           # Both steps sequentially

Note: test-writing-workflow requires test_logic/research.md to exist. Run test-research-workflow first, or use test-end-to-end.

Full dataset run:

The [datasets/](datasets/) directory contains a pre-built LinkedIn posts dataset with seeds, guidelines, research documents, ground truth posts, and generated outputs — used for both batch runs and evaluation.

bash
make run-dataset-writing           # Research + write for all dataset posts (with images)
make run-dataset-writing-no-image  # Same, skip image generation (faster)

Evaluation (requires Opik)

The workshop includes an LLM-as-judge evaluation pipeline. Instead of manually reviewing each generated post, an LLM scores them against quality criteria (structure, tone, accuracy). Opik tracks these scores across runs so you can measure whether prompt or pipeline changes actually improve output quality.

bash
make eval-dev               # LLM judge on dev split
make eval-test              # LLM judge on test split
make eval-online            # Generate + judge posts on the fly

Each command automatically uploads the dataset to Opik before running. To upload without evaluating (e.g., to browse in the Opik UI), use make upload-eval-dataset.

Project Structure

├── src/
│   ├── research/              # Deep Research Agent MCP server
│   │   ├── server.py          # FastMCP entry point
│   │   ├── config/            # Settings, constants, prompt templates
│   │   ├── models/            # Pydantic schemas for structured LLM output
│   │   ├── app/               # Business logic handlers
│   │   ├── tools/             # MCP tool implementations
│   │   ├── routers/           # MCP tool, resource, and prompt registration
│   │   └── utils/             # Gemini client, file I/O, Opik, markdown helpers
│   └── writing/               # LinkedIn Writer MCP server
│       ├── server.py          # FastMCP entry point
│       ├── profiles/          # Shipped markdown profiles (structure, terminology, character, branding)
│       ├── config/            # Settings, constants, prompt templates
│       ├── models/            # Pydantic schemas (Post, Review, Profiles)
│       ├── app/               # Business logic handlers
│       ├── evals/             # LLM judge metric, dataset upload, evaluation harness
│       ├── tools/             # MCP tool implementations
│       ├── routers/           # MCP tool, resource, and prompt registration
│       └── utils/             # Gemini client, Imagen, Opik helpers
├── datasets/                  # LinkedIn posts dataset with labels and splits
├── examples/                  # Full end-to-end output samples (seed → research → posts → image)
├── scripts/                   # Entrypoints and test scripts
├── .mcp.json                  # MCP server configuration for harnesses
├── Makefile                   # Command center
└── .env.example               # Environment variable template

Next Steps

ResourceDescription
Agentic AI Engineering CourseOur full course on shipping production-grade AI agents. 34 lessons. Three end-to-end portfolio projects. A certificate. And a Discord community.
Agentic AI Engineering GuideFree 6-day email course on the mistakes that silently break AI agents in production.
AI Engineering CheatsheetsQuick-reference sheets for agents, RAG, fine-tuning, and more. Ready to be plugged into Claude Code as context.

Contributors

License

MIT License. See LICENSE for details.

Copyright (c) 2026 Paul Iusztin, Towards AI Inc

Usa Designing Real World Ai Agents Workshop MCP con più modelli AI

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso Designing Real World Ai Agents Workshop, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Questa integrazione MCP viene eseguita localmente sul tuo dispositivo tramite il connettore MCP di TypingMind.

Guida alla configurazione del connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura connettore.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura connettore e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con l’opzione «Questo dispositivo» selezionata
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi Designing Real World Ai Agents Workshop come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di Designing Real World Ai Agents Workshop.
  4. Salva l'elenco dei server.
  5. Se vuoi verificare che il connettore sia ancora pronto, aggiorna la pagina.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "designing-real-world-ai-agents-workshop": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di Designing Real World Ai Agents Workshop, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di Designing Real World Ai Agents Workshop.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare Designing Real World Ai Agents Workshop per aiutarmi con questa attività?
Designing Real World Ai Agents Workshop
Certo. L’ho letto.
Ecco cosa ho trovato con Designing Real World Ai Agents Workshop.

Domande frequenti

A cosa serve il server MCP Designing Real World Ai Agents Workshop?

Designing Real World Ai Agents Workshop è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare il server MCP Designing Real World Ai Agents Workshop con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare Designing Real World Ai Agents Workshop con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP Designing Real World Ai Agents Workshop con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando Designing Real World Ai Agents Workshop, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego il server MCP Designing Real World Ai Agents Workshop a TypingMind?

Designing Real World Ai Agents Workshop funziona tramite il connettore MCP locale di TypingMind. È la soluzione ideale quando il server MCP deve accedere a file locali, app desktop, strumenti da riga di comando o risorse private sul tuo computer.

Quali strumenti offre il server MCP Designing Real World Ai Agents Workshop in TypingMind?

Designing Real World Ai Agents Workshop mette a disposizione funzionalità MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare il server MCP Designing Real World Ai Agents Workshop?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se Designing Real World Ai Agents Workshop richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇