Skip to content

woland7/agent-platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agent Platform

Agent Platform is a monorepo for building several AI-assisted product mini-apps on one shared foundation instead of creating a separate backend and worker stack for each idea.

The intent is to keep the platform boring at the infrastructure level and modular at the product level:

  • one React frontend shell with separate routes per mini-app
  • one FastAPI backend that owns APIs, orchestration, persistence, and integrations
  • one Dramatiq worker for long-running jobs
  • PostgreSQL as the durable system of record
  • Redis only for queue, cache, and transient state
  • Dynaconf for configuration and Structlog for logging
  • CrewAI kept as an internal subsystem, never the public API surface

What You Are Building Here

This repository is trying to turn a set of AI-enabled utilities into a coherent platform with strict boundaries.

The core idea is:

  • mini-apps should feel independent at the product level
  • they should still reuse the same platform primitives, job lifecycle, storage model, and deployment model
  • deterministic logic should stay in services and repositories
  • agents should be used only where interpretation or summarization is actually needed
  • prompts should live in versioned files, not in Python code

The platform is being extended with the same shape for Telegram Deals, Flights, and Trains rather than rewritten again for each new app.

Architecture Rules

  • Frontend talks only to FastAPI.
  • Backend owns business logic, orchestration, persistence, and external integrations.
  • Long-running work goes through the jobs system and the worker.
  • Agents are internal helpers, not raw API concepts.
  • PostgreSQL stores durable state.
  • Redis stays limited to broker, cache, and transient execution state.
  • Runtime prompts in shared/prompts/ stay separate from development prompts in docs/prompts/.

Current Mini-Apps

  • telegram_deals: scans Telegram messages, extracts structured deal data, uses AI only for controlled relevance evaluation, and persists accepted results
  • flights: accepts natural-language flight requests, resolves them into typed searches, ranks provider-backed offers, summarizes results, and stores them by job
  • trains: follows the same request-driven pattern for rail searches behind the same backend and jobs boundaries

Repository Shape

  • frontend/: React application and mini-app routes
  • backend/src/app/: FastAPI app, jobs system, worker entrypoints, shared core modules, and mini-app backends
  • backend/tests/: architecture and backend behavior tests
  • shared/prompts/: runtime prompt files versioned by mini-app
  • shared/crewai/: CrewAI runtime YAML configuration
  • docs/: decisions, plans, and task tracking for the platform itself

Runtime Shape

The main flow is:

Frontend -> FastAPI -> service layer -> worker/jobs -> PostgreSQL

Current API groups:

  • /api/health
  • /api/jobs/*
  • /api/telegram-deals/*
  • /api/flights/*
  • /api/trains/*

Current frontend routes:

  • /telegram-deals
  • /flights
  • /trains

Running Locally

Create a local env file first:

cp .env.example .env

Start the stack with:

docker compose up --build

This starts:

  • frontend
  • backend
  • worker
  • PostgreSQL
  • Redis

Main local endpoints:

  • frontend: http://localhost:5173
  • backend health: http://localhost:8000/api/health
  • jobs API: http://localhost:8000/api/jobs/{job_id}

Secrets And Integrations

Base stack startup does not require every external credential, but app flows that depend on them will fail until configured.

Common variables:

  • OPENAI_API_KEY
  • SERPAPI_KEY
  • TELEGRAM_API_ID
  • TELEGRAM_API_HASH
  • TELEGRAM_CHANNEL

If you want Telegram scanning to work, complete the interactive login setup once:

docker compose run --rm --profile tools telegram-login

Local Python Environment

The backend uses uv. If you need to run backend commands locally and avoid container-owned virtualenv issues, use:

backend/scripts/uv-local.sh run pytest tests/test_health.py

To recreate or repair the local backend environment:

backend/scripts/repair-local-venv.sh

Read These Next

agent-platform

About

Agent-based mini-apps platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors