Logo von FastAPI Agent Blueprint

FastAPI Agent Blueprint

Community
Mr-DooSun

FastAPI backend blueprint for AI agent apps: DDD, SQLAlchemy, Taskiq, admin UI, RAG infra, and Claude/Codex collaboration harness.

HerausgeberMr-DooSun
Repositoryfastapi-agent-blueprint
SprachePython
Forks
10
Sterne
27
Verfügbare Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Links
  • Tools mit KI-Workflows verbinden

    FastAPI Agent Blueprint stellt MCP-Funktionen bereit, die kompatible KI-Clients und Agenten nutzen können.

  • 0 verfügbare Tools

    Sehen Sie sich unten die aufrufbaren Aktionen an, einschließlich Namen und Beschreibungen, sofern der Server diese bereitstellt.

  • Konfiguration zum Kopieren

    Nutzen Sie die Installationsbeispiele, um diesen Server in Ihrem bevorzugten MCP-Client zu konfigurieren.

  • Open-Source-Kennzahlen

    27 Sterne und 10 Forks im verlinkten Repository.

Backend foundationAI collaboration harness
Domain logic shared by HTTP APIs, background tasks, and an admin UI. Optional AI and infrastructure adapters let you start locally and add services as needed.Repository rules, task-specific skills, hooks, and review procedures guide changes to that backend across Claude Code, Codex, and Antigravity.
Run it locally · See the architectureFollow an API change · Read the shared workflow

Why this blueprint

Use it when you need multiple business domains, API + worker + admin surfaces, or a shared development workflow for teammates using AI coding tools. The backend and harness are designed together: the harness references this repo's layering, contracts, and verification commands.

Budget time to learn the domain layout, dependency-injector containers, and plan/review workflow. A small single-purpose API may not need that structure; a project needing a bundled customer frontend needs a different starting point. The harness is repository-specific, not a standalone drop-in package.

You can develop without AI tools using the manual domain tutorial. For incremental adoption and trade-offs, see the adoption guide and selection guide.

Quickstart

Prerequisites: Python >=3.12.9, uv, Git, and make. The demos also use curl and python3 on your PATH. No Docker, PostgreSQL, cloud credentials, or AI coding tool required.

Terminal 1 — start the backend:

bash
git clone https://github.com/Mr-DooSun/fastapi-agent-blueprint.git
cd fastapi-agent-blueprint
make quickstart

This installs the quickstart dependencies, creates a SQLite database, and keeps the server running on port 8001. Use a fresh checkout for evaluation: quickstart syncs the admin extra and can remove other installed extras. For development dependencies and commit hooks, use make setup when moving to the development setup.

Terminal 2 — from the same repository directory:

bash
make demo       # JWT auth, admin-realm login, user CRUD, refresh and logout
make demo-rag   # document upload, retrieval and an answer with citations

Keep terminal 1 running. Both demos check their API responses and report failure if a request does not succeed. The default RAG demo uses a keyword-based stub embedder and a templated stub answer agent; it demonstrates the pipeline without calling an external model.

These defaults are for local evaluation. Follow the development and deployment guides before using real data or exposing the service.

Backend demo: authentication and user CRUD

Backend foundation

CapabilityWhat it provides
Domain structureRouter → Service → Repository, with an optional UseCase for orchestration; automatic domain registration and reusable CRUD base classes.
API, worker, adminFastAPI endpoints, Taskiq background tasks, and NiceGUI admin pages consuming domain services.
Optional infrastructureSQL databases, DynamoDB, object storage, vector storage, and AI providers behind adapters and configuration. Start with SQLite + InMemory.
OperationsJWT/RBAC, structured logging, opt-in OpenTelemetry, AI usage accounting, and error notifications.

Worked example: document QA

The docs domain composes document upload, chunking, embedding, retrieval, and answers with citations. Its shared RAG pipeline can be reused by other domains (ADR 040).

For real model calls, install the pydantic-ai extra, configure EMBEDDING_PROVIDER + EMBEDDING_MODEL and LLM_PROVIDER + LLM_MODEL, and supply the selected providers' credentials. See the configuration reference for optional extras and settings; the RAG walkthrough shows the flow.

HTTP, worker, and admin interfaces are implemented. The MCP server interface is planned, not part of the runnable backend today.

AI collaboration harness

The harness helps contributors work within the same backend conventions:

CapabilityWhat it provides
Shared rulesAGENTS.md and shared references define architecture, contracts, security constraints, and the development workflow.
Task-specific skillsGuides for domains, APIs, worker tasks, admin pages, migrations, testing, review, and documentation sync.
Workflow boundariesPlanning and execution are separate steps. Scope changes, missing verification, and completion checks have explicit handling.
Checks and reviewCommit/CI checks inspect deterministic rules; reviews assess behavior, architectural fit, and documentation drift.

Worked example: add an API to an existing domain

For a request such as “add a filtered list endpoint to the order domain,” the workflow is:

StepContributor and agent actions
Frame and planClarify the contract and affected layers with /plan-feature (Claude) or $plan-feature (Codex). Review the resulting execution packet.
Start executionThe contributor explicitly invokes /execute-plan or $execute-plan with that packet. The executor routes API implementation through the add-api skill.
Implement and verifyReuse the existing layer patterns, add relevant tests, and run the packet's verification commands. Surface unplanned capability gaps before expanding the work.
Review and syncReview the diff; reconcile affected documentation with sync-guidelines when needed. Record verification and any unresolved items before PR completion.

This is an illustrative workflow, not a command that runs every step automatically. Human decisions remain part of the process.

What is enforced? Configured pre-commit/CI checks block detected violations such as prohibited imports, broken documentation links, or shared-file language policy failures. Workflow reminders are advisory in many cases. For example, the plan-to-execution gate blocks matching source edits in Claude, while Codex receives a Stop-time advisory. Tool adapters share policy but do not provide identical enforcement. See the operating model for current coverage and exceptions.

Domain scaffolding is another supported task:

Domain scaffolding through the new-domain skill

Set up Claude Code or Codex · Antigravity harness · Shared rules · Manual development path

Architecture at a glance

Every domain separates Interface, Domain, Infrastructure, and optional Application code. Runtime CRUD follows Router → Service → Repository; dependency arrows below describe imports, not request execution order.

Request schemas can pass directly to services when fields match. Model-to-DTO conversion belongs in repositories. Detailed write/read flows and storage variants are in the architecture guide (SVG versions).

Learn more

Roadmap

See the full roadmap and issue tracker.

Contributing

See CONTRIBUTING.md for setup and the PR workflow. The examples and good first issues are entry points for new contributors.

License

MIT — free for commercial use, modification, and distribution.


Installation

TypingMind
Voraussetzungen:

Node.js 18+

{
  "mcpServers": {
    "mr-doosun-fastapi-agent-blueprint": {
      "command": "",
      "args": []
    }
  }
}

FastAPI Agent Blueprint MCP mit mehreren KI-Modellen nutzen

TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. Sobald FastAPI Agent Blueprint verbunden ist, können Sie die Integration mit verschiedenen KI-Modellen in TypingMind verwenden, statt sie für jedes Modell separat einzurichten. Diese MCP-Integration läuft lokal über den TypingMind-MCP-Konnektor auf Ihrem Gerät.

Einrichtungsanleitung für den lokalen Konnektor

Nutzen Sie diese Option, wenn der MCP-Server Zugriff auf lokale Dateien, Apps oder private Ressourcen auf Ihrem Computer benötigt.

1

MCP-Einstellungen öffnen

Gehen Sie in TypingMind zu „Einstellungen“, „Erweiterte Einstellungen“ und dann „Model Context Protocol“ und wählen Sie „Konnektor-Setup“.

  1. Öffnen Sie TypingMind in Ihrem Browser.
  2. Klicken Sie auf das Symbol „Optionen“.
  3. Gehen Sie zu „Erweiterte Einstellungen“.
  4. Öffnen Sie den Abschnitt „Model Context Protocol“.
  5. Klicken Sie auf „Konnektor-Setup“ und wählen Sie „Dieses Gerät“.
Einrichtungsbildschirm des TypingMind-MCP-Konnektors mit ausgewählter Option „Dieses Gerät“
2

Konnektor-Befehl ausführen

Wählen Sie „Dieses Gerät“, kopieren Sie den Befehl aus TypingMind und führen Sie ihn im Terminal aus. Lassen Sie den Prozess laufen, solange Sie MCP verwenden.

  1. Kopieren Sie den in TypingMind angezeigten Einrichtungsbefehl.
  2. Öffnen Sie unter macOS Terminal bzw. unter Windows Windows Terminal.
  3. Fügen Sie den Befehl ein und führen Sie ihn aus.
  4. Bestätigen Sie die Paketinstallation, wenn Sie im Terminal zum Fortfahren aufgefordert werden.
  5. Lassen Sie das Terminalfenster geöffnet und den Prozess darin laufen, solange Sie MCP-Tools verwenden.
3

FastAPI Agent Blueprint als Server hinzufügen

Wenn der Konnektorstatus „Bereit“ anzeigt, klicken Sie auf „Server ändern“ und fügen Sie die MCP-Server-Konfiguration ein.

  1. Warten Sie, bis der Konnektorstatus „Bereit“ anzeigt.
  2. Klicken Sie auf „Server ändern“.
  3. Fügen Sie die MCP-Server-Konfiguration für FastAPI Agent Blueprint ein.
  4. Speichern Sie die Serverliste.
  5. Aktualisieren Sie die Ansicht, um bei Bedarf zu prüfen, ob der Konnektor weiterhin bereit ist.
MCP-Einstellungen in TypingMind mit aktivem Server und der Schaltfläche „Server ändern“
{
  "mcpServers": {
    "mr-doosun-fastapi-agent-blueprint": {
      "command": "npx",
      "args": [
        "-y",
        "fastapi-agent-blueprint"
      ]
    }
  }
}
4

Verbindung modellübergreifend nutzen

Speichern Sie die Serverliste, öffnen Sie „Plugins“ und aktivieren Sie die MCP-Tools von FastAPI Agent Blueprint. Wählen Sie dann ein beliebiges unterstütztes KI-Modell in TypingMind und verwenden Sie die Tools im Chat oder weisen Sie sie einem KI-Agenten zu.

  1. Öffnen Sie die Seite „Plugins“ in TypingMind.
  2. Aktivieren Sie die MCP-Tools von FastAPI Agent Blueprint.
  3. Starten Sie einen Chat und wählen Sie das KI-Modell, das Sie verwenden möchten.
  4. Nutzen Sie die MCP-Tools im Chat oder weisen Sie sie einem KI-Agenten zu.
  5. Wechseln Sie bei Bedarf zu einem anderen KI-Modell, ohne die MCP-Verbindung erneut herzustellen.
TypingMind-Chat mit aktivierten MCP-Tools und einem ausgewählten KI-Modell
Können Sie mir mit FastAPI Agent Blueprint bei dieser Aufgabe helfen?
FastAPI Agent Blueprint
Gerne. Ich habe es gelesen.
Das habe ich mit FastAPI Agent Blueprint gefunden.

Häufig gestellte Fragen

Wofür wird der MCP-Server FastAPI Agent Blueprint verwendet?

FastAPI Agent Blueprint ist ein MCP-Server, über den kompatible KI-Clients auf externe Tools und Kontext zugreifen können. In TypingMind können Sie diesen MCP-Server einmal hinzufügen und seine Tools in Ihrem KI-Arbeitsbereich verfügbar machen.

Kann ich FastAPI Agent Blueprint MCP mit mehreren KI-Modellen in TypingMind verwenden?

Ja. TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. So können Sie FastAPI Agent Blueprint mit verschiedenen KI-Modellen wie Claude, ChatGPT, Gemini oder anderen in TypingMind konfigurierten Modellen verwenden, ohne den MCP-Server für jedes Modell separat einzurichten.

Warum FastAPI Agent Blueprint MCP mit TypingMind nutzen?

TypingMind ist eine der besten Oberflächen für LLM-Chats, da es mehrere KI-Modelle, Prompts, Plugins, KI-Agenten, API-Schlüssel und MCP-Tools in einem Arbeitsbereich vereint. Sobald FastAPI Agent Blueprint verbunden ist, können Sie die zugehörigen MCP-Tools mit Ihren bevorzugten Modellen nutzen und Ihre Chat-Abläufe in TypingMind übersichtlich organisieren.

Wie verbinde ich FastAPI Agent Blueprint MCP mit TypingMind?

FastAPI Agent Blueprint wird über den lokalen MCP-Konnektor von TypingMind angebunden. Das ist die beste Wahl, wenn der MCP-Server auf lokale Dateien, Desktop-Apps, Befehlszeilentools oder private Ressourcen auf Ihrem Computer zugreifen muss.

Welche Tools stellt FastAPI Agent Blueprint MCP in TypingMind bereit?

FastAPI Agent Blueprint stellt MCP-Funktionen bereit, die Sie auf der Plugins-Seite in TypingMind aktivieren und im Chat verwenden oder KI-Agenten zuweisen können.

Muss ich meine API-Schlüssel mit TypingMind teilen, um FastAPI Agent Blueprint MCP zu verwenden?

Nein. TypingMind arbeitet vorrangig lokal, sodass Sie die Kontrolle über Ihre Modellanbieter, API-Schlüssel, Prompts und MCP-Konfiguration behalten. Falls FastAPI Agent Blueprint eine Authentifizierung erfordert, fügen Sie beim Erstellen der Verbindung die erforderlichen Header, OAuth-Einstellungen oder die lokale Konfiguration für diesen MCP-Server hinzu.

Ähnliche MCP-Server

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇