An early-stage scaffold for an event-driven research-assistant backend built
with FastAPI, Kafka (via aiokafka), and a pluggable vector database client.
The long-term goal is a multi-agent pipeline that researches a topic and
prepares briefings for a podcast or meeting; the current codebase is the
infrastructure skeleton that pipeline will be built on top of.
This is a minimal scaffold, not a finished agent. What's implemented today:
src/main.py— a FastAPI app with a health check (GET /) and an/ingestendpoint that currently just echoes the submitted text; it does not yet publish to Kafka or index anything.src/kafka_producer.py/src/kafka_consumer.py— async producer and consumer skeletons built onaiokafka, not yet wired intomain.py.src/vector_db.py— aVectorDBClientinterface stub (upsert/query) whose methods raiseNotImplementedError; intended to be backed by a real store such as FAISS, Weaviate, Milvus, or Pinecone.
There is no research/agent logic, LLM integration, or briefing-generation code yet — this repo is the backend plumbing the agent will sit on.
- Python, FastAPI + Pydantic
- aiokafka for async Kafka producer/consumer
- Docker (see
Dockerfile) for containerized runs
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env # then edit as neededRun the API:
uvicorn src.main:app --reload --port 8000Or via Docker:
docker build -t ai-research-agent .
docker run -p 8000:8000 ai-research-agentcurl -X POST http://localhost:8000/ingest \
-H "Content-Type: application/json" \
-d '{"text": "some research note"}'This currently just echoes the text back with a placeholder
"action": "enqueue_for_processing" — actual Kafka publishing and
downstream processing are not wired up yet.
See .env.example:
KAFKA_BOOTSTRAP_SERVERS— Kafka broker addressKAFKA_TOPIC— topic used for ingest eventsVECTOR_DB_URL— connection string for the vector storeAPP_ENV— environment name
src/— application code (FastAPI app, Kafka producer/consumer skeletons, vector DB client stub)requirements.txt— Python dependenciesDockerfile— container image for the app.env.example— example environment variables
MIT — see LICENSE.