Skip to content

About

This repository contains demo applications for my data2day 2025 talk on Agentic AI. The demos illustrate different approaches to building AI agents, from simple routing to multi-agent systems. Each demo is intentionally simplified to highlight core concepts from the talk.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Demo Code for data2day 2025: Agentic AI Demystified With a Single Toy App

Overview

This repository contains demo applications for my data2day 2025 talk on Agentic AI. The demos illustrate different approaches to building AI agents, from simple routing to multi-agent systems. Each demo is intentionally simplified to highlight core concepts from the talk.

⚠️ Important: These are quick & dirty demos for educational purposes only. The code is not production-ready and assumes familiarity with the talk content.

What's Inside

Three Python applications demonstrating increasing levels of agent complexity:

  • Router (router.py): Minimal agency with simple routing logic
  • Multi-Step Agent (multi_step.py): Browser automation using browser-use
  • Multi-Agent (multi_agent.py): Coordinated system with multiple specialized agents

If you only want to understand the core logic, focus on these three Python files and skip the Docker setup.

Prerequisites

Required

  • Google Gemini API Key: Get one from Google AI Studio
  • Docker (recommended) OR Python with uv + Google Chrome

About uv

uv is a fast Python package installer and resolver. Install it following the official instructions.

Configuration

The demos default to gemini-flash-2.5 which has a free tier. Code for alternative LLM providers is included but commented out.

Set your API key as an environment variable:

export GEMINI_API_KEY="your-api-key-here"

Known Issue: Gemini Free Tier Reliability

The Gemini free tier has been frequently unavailable recently. If you see 503 UNAVAILABLE (the model is overloaded) errors, you have three options:

  1. Wait and retry later
  2. Upgrade to a paid Gemini tier
  3. Modify the code to use a different LLM provider (look for commented-out provider code in the Python files)

Note: The demos don't include automatic fallbacks or retry logic.

Installation & Running

Option 1: Docker (Recommended for Linux)

⚠️ Linux Only: The Docker setup requires X11 GUI support and only works on Linux systems.

  1. Build the image:

    docker build . -t agentic-demo:latest
  2. Run the container:

    docker run \
      -e GEMINI_API_KEY=$GEMINI_API_KEY \
      --rm -ti \
      --net=host \
      --ipc=host \
      -e DISPLAY=$DISPLAY \
      -v /tmp/.X11-unix:/tmp/.X11-unix \
      --env="QT_X11_NO_MITSHM=1" \
      agentic-demo:latest

    What these flags do:

    • --net=host: Shares network with host for easy port access
    • -e DISPLAY and -v /tmp/.X11-unix: Enable X11 GUI forwarding
    • --rm: Automatically remove container on exit
  3. Complete initial setup: A Chrome window will appear. Click through the initial setup dialogs.

  4. Access the demos: Open your regular browser (NOT the Chrome instance from the container) and navigate to:

    • Router: http://localhost:7860
    • Multi-Step Agent: http://localhost:7861
    • Multi-Agent: http://localhost:7862

Option 2: Manual Setup (Linux/WSL)

Note: Only tested on Linux/WSL. Chrome debug mode startup may differ on other operating systems.

  1. Install dependencies:

    # Install uv (see Prerequisites section for link)
    # Install Google Chrome for your system
  2. Start Chrome in debug mode:

    google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug

    Click through the initial Chrome dialogs.

  3. Run a demo:

    uv run router.py
    # OR
    uv run multi_step.py
    # OR
    uv run multi_agent.py
  4. Access the demo: Check stdout for the local port and visit it in your browser.

Demo Descriptions

Router

Uses minimal agency with simple routing logic. The workflow follows this diagram (green nodes require LLM calls):

router workflow

Note: Image generation functionality was removed to avoid requiring additional API keys.

Multi-Step Agent

Provides a simple frontend for browser automation powered by the browser-use library.

Multi-Agent

Demonstrates coordination between multiple specialized agents as shown below:

multi-agent architecture

Troubleshooting

Chrome won't start in debug mode:

  • Check if Chrome is already running. Close all instances and try again.
  • On non-Linux systems, consult Chrome documentation for remote debugging flags.

Port already in use:

  • Check if another process is using ports 7860-7862.
  • Modify the port numbers in the Python files if needed.

X11 errors with Docker:

  • Run xhost +local:docker to allow Docker containers to connect to X11.
  • Ensure $DISPLAY is set correctly (usually :0).

503 errors from Gemini:

  • See the "Known Issue" section under Configuration above.

Docker Complexity Note

The Dockerfile sets up an environment and launches Chrome in remote-debug mode for automation. This adds complexity but makes demos easier to run across different setups. If this seems like overkill, just extract the Python files and manage your own environment.

About

This repository contains demo applications for my data2day 2025 talk on Agentic AI. The demos illustrate different approaches to building AI agents, from simple routing to multi-agent systems. Each demo is intentionally simplified to highlight core concepts from the talk.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages