cd /news/ai-infrastructure/an-event-driven-ai-pipeline-using-fa… Β· home β€Ί topics β€Ί ai-infrastructure β€Ί article
[ARTICLE Β· art-32119] src=github.com β†— pub= topic=ai-infrastructure verified=true sentiment=Β· neutral

An event-driven AI pipeline using FastAPI, Redpanda, and Docker

A developer released a demo AI pipeline using FastAPI, Redpanda (Kafka-compatible), and Docker, where an API gateway publishes events consumed by separate workers for extraction, summarization, and notification. The project illustrates decoupling AI pipeline stages for scalable processing.

read1 min views1 publishedJun 18, 2026

A minimal demo for Video 3 showing how a FastAPI gateway hands work to Kafka and how separate workers process the event chain.

ai-kafka-pipeline-demo/
β”œβ”€β”€ api-gateway/
β”‚   └── app/
β”‚       β”œβ”€β”€ main.py
β”‚       β”œβ”€β”€ routes/submit.py
β”‚       β”œβ”€β”€ services/publisher.py
β”‚       └── config.py
β”œβ”€β”€ workers/
β”‚   β”œβ”€β”€ extractor/
β”‚   β”œβ”€β”€ summarizer/
β”‚   └── notifier/
β”œβ”€β”€ shared/
β”‚   β”œβ”€β”€ kafka/
β”‚   β”œβ”€β”€ schemas/
β”‚   β”œβ”€β”€ config/
β”‚   └── utils/
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ requirements.txt
└── .env
  • POST /submit

to the API gateway - Gateway publishes document.submitted

  • Extractor consumes and publishes text.extracted

  • Summarizer consumes and publishes summary.generated

  • Notifier consumes and logs final completion

docker compose up --build

Open another terminal:

curl -X POST http://localhost:8000/submit \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "user-1",
    "content": "Kafka helps decouple AI pipeline stages for scalable processing in production systems."
  }'
  • API returns Processing started

  • Extractor logs the incoming event

  • Summarizer logs the next event

  • Notifier logs the final pipeline completion

  • FastAPI handles intake, not heavy processing.

  • Kafka turns the request into an event.

  • Each worker owns one stage.

  • Shared schemas keep the contracts explicit.

  • This is the simplest form of a production-style AI pipeline.

  • I also recorded a full visual code walkthrough breaking down the project structure and explaining the design trade-offs here: https://youtu.be/c2ijN2KAWXw https://youtu.be/KjvbABpajUs

── more in #ai-infrastructure 4 stories Β· sorted by recency
── more on @fastapi 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/an-event-driven-ai-p…] indexed:0 read:1min 2026-06-18 Β· β€”