Skip to content

PatrickPi1312/agent-platform-overview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Agent Platform — Architecture Overview

Architecture showcase only — source code proprietary. This repository documents the design of a production multi-tenant SaaS platform. It contains no runnable code, no secrets, and no customer data — only architecture descriptions and diagrams. It exists to demonstrate how the author designs autonomous, tool-using AI agents and multi-stage agent workflows.

What this is

A multi-tenant SaaS platform for trade/contractor businesses (plumbing, heating, electrical) with AI agents embedded across the workflow: quoting, invoicing, scheduling, customer communication (chat, WhatsApp, voice phone calls), document generation, and accounting hand-off.

The interesting part — and the focus of this showcase — is the agent layer: three distinct agents, each with a different operating model (text tool-use, real-time voice, fully local inference), all sharing a common tool catalog and a verification ("did the agent actually do the job correctly?") discipline.

Tech stack

Layer Technology
Backend Python, FastAPI (~298 REST endpoints)
Data PostgreSQL (54 tables), SQLAlchemy
LLM / Agents Anthropic API (Claude), local Qwen-32B inference
Voice faster-whisper (STT) + Azure TTS / ElevenLabs (TTS)
Documents WeasyPrint (HTML → PDF)
Edge / Transport Nginx, TLS, WhatsApp Cloud API, seven.io (SMS)

The three agents

Marlon — text agent with tool-use

The primary assistant. Runs on the Anthropic API with a curated tool catalog (e.g. create_quotation, lookup_customer, schedule_appointment, send_message, generate_pdf). Marlon plans and executes multi-step tasks autonomously: read a customer photo → identify required parts → draft a quotation → attach the PDF → reply on WhatsApp. Available over chat and WhatsApp.

Paula — voice agent

Handles inbound/outbound phone calls. Pipeline: audio → faster-whisper (STT) → agent reasoning + tool-use → Azure TTS / ElevenLabs (TTS) → audio. Shares Marlon's tool catalog so a phone call can trigger the same backend actions (book an appointment, look up an order) as a chat message.

Werner — local agent

A locally hosted Qwen-32B agent used where data must not leave the premises or where API cost/latency matters. Same tool-use contract as the API agents, but inference runs on local hardware. Used as a drop-in provider behind a provider switch (Anthropic ↔ local).

Integrations

External systems the agents and backend talk to:

  • Microsoft Graph — calendar & contacts sync (appointments land in Outlook)
  • Enable Banking (PSD2) — bank transaction access for reconciliation
  • IDS wholesale — supplier catalogs, live pricing, order numbers
  • Viessmann ViGuide — heating-system telemetry
  • WhatsApp Cloud API — customer messaging channel
  • seven.io — SMS delivery
  • WeasyPrint — server-side PDF rendering

Architecture

flowchart TB
    subgraph Clients
        WA[WhatsApp]
        PHONE[Phone / SIP]
        WEB[Web / PWA]
    end

    NGINX[Nginx / TLS]

    subgraph Backend["FastAPI Backend (~298 endpoints)"]
        API[REST API]
        TOOLS[Shared Tool Catalog]
        ORCH[Agent Orchestrator]
    end

    subgraph Agents
        MARLON[Marlon — Anthropic tool-use]
        PAULA[Paula — Voice: whisper + TTS]
        WERNER[Werner — local Qwen-32B]
    end

    DB[(PostgreSQL — 54 tables)]

    subgraph External["External APIs"]
        GRAPH[MS Graph]
        BANK[Enable Banking PSD2]
        IDS[IDS Wholesale]
        VIE[Viessmann ViGuide]
        SEVEN[seven.io SMS]
        PDF[WeasyPrint PDF]
    end

    WA --> NGINX
    PHONE --> NGINX
    WEB --> NGINX
    NGINX --> API

    API --> ORCH
    ORCH --> MARLON
    ORCH --> PAULA
    ORCH --> WERNER

    MARLON --> TOOLS
    PAULA --> TOOLS
    WERNER --> TOOLS

    TOOLS --> API
    API --> DB

    TOOLS --> GRAPH
    TOOLS --> BANK
    TOOLS --> IDS
    TOOLS --> VIE
    TOOLS --> SEVEN
    TOOLS --> PDF
Loading

Deep dives

License / usage

See LICENSE. This is an architecture showcase only; the underlying source code, prompts, and data models are proprietary and not included.

About

Architecture showcase: multi-tenant SaaS platform with autonomous tool-using AI agents (Marlon/Paula/Werner). Design + diagrams only, source proprietary.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors