Logo di 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.

AutoreMr-DooSun
Repositoryfastapi-agent-blueprint
LinguaPython
Fork
10
Stelle
27
Strumenti disponibili
0
Tipo di trasportostdio
Categorie
LicenzaMIT
Link
  • Collega gli strumenti ai flussi di lavoro IA

    FastAPI Agent Blueprint mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • 0 strumenti disponibili

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni quando forniti dal server.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse open source

    27 stelle e 10 fork nel repository collegato.

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.


Installazione

TypingMind
Prerequisiti:

Node.js 18+

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

Usa MCP FastAPI Agent Blueprint con più modelli IA

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso FastAPI Agent Blueprint, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Questa integrazione MCP viene eseguita localmente sul tuo dispositivo tramite il connettore MCP di TypingMind.

Guida alla configurazione del connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura MCP.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura MCP e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con Questo dispositivo selezionato
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi FastAPI Agent Blueprint come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di FastAPI Agent Blueprint.
  4. Salva l'elenco dei server.
  5. Aggiorna per verificare che il connettore sia ancora pronto.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "mr-doosun-fastapi-agent-blueprint": {
      "command": "npx",
      "args": [
        "-y",
        "fastapi-agent-blueprint"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di FastAPI Agent Blueprint, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di FastAPI Agent Blueprint.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare FastAPI Agent Blueprint per aiutarmi con questa attività?
FastAPI Agent Blueprint
Certo. Ho letto.
Ecco cosa ho trovato con FastAPI Agent Blueprint.

Domande frequenti

A cosa serve il server MCP FastAPI Agent Blueprint?

FastAPI Agent Blueprint è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare FastAPI Agent Blueprint MCP con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare FastAPI Agent Blueprint con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP FastAPI Agent Blueprint con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando FastAPI Agent Blueprint, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego FastAPI Agent Blueprint MCP a TypingMind?

FastAPI Agent Blueprint funziona tramite il connettore MCP locale di TypingMind. È la soluzione ideale quando il server MCP deve accedere a file locali, app desktop, strumenti da riga di comando o risorse private sul tuo computer.

Quali strumenti offre FastAPI Agent Blueprint MCP in TypingMind?

FastAPI Agent Blueprint mette a disposizione funzionalità MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare FastAPI Agent Blueprint MCP?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se FastAPI Agent Blueprint richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇