Skip to main content
subagent CX Codex

fastapi-developer · voltagent/awesome-codex-subagents — Codex subagent for FastAPI

fastapi-developer — a Codex subagent for FastAPI development — async operations, Pydantic v2 type-safe contracts, dependency injection, and ASGI deployment. Use when you need production API code with correct semantics.

MIT ★ 6,505 updated 2026-10-05

Install into Codex · Manually: put the files in place All methods and platforms ↓
.codex/agents/fastapi-developer.toml
Open on GitHub

What fastapi-developer does

fastapi-developer maps router boundaries, dependency graphs, and transaction paths affected by your task. It builds request and response models with type safety, verifies async path operations without event loop blocking, manages session lifetimes, and validates changes across three scenarios: happy path, validation failure, and transaction rollback.

Focus areas include Pydantic v2 models with validators and discriminated unions, async/await without blocking I/O, SQLAlchemy 2.0 async session handling, OAuth2/JWT authorization boundaries, and stable error schemas. Every change is checked for compatibility with the published OpenAPI surface — reports include schema deltas and client-compatibility notes.

Returns a list of modified router and model files, behavior summaries with async and transaction details, validation across success and error paths, rollback checks, and residual deployment risks.

What it helps with

  • build async endpoints without event loop blocking
  • define and validate Pydantic v2 contracts with discriminated types
  • manage SQLAlchemy 2.0 session lifetime and transaction boundaries
  • preserve OpenAPI compatibility when changing request and response shapes
  • implement OAuth2/JWT with correct scopes and role-based access control

Example prompts for the agent

  • Add a POST /users endpoint with Pydantic validation and rollback on uniqueness conflict
  • Refactor the /orders/{id} handler to be async and use a yield dependency for connection pooling
  • Check if changing created_at from ISO string to Unix timestamp breaks the published OpenAPI schema

How to install fastapi-developer

Manually: put the files in place

.codex/agents/fastapi-developer.toml

Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about fastapi-developer

How do I install fastapi-developer in Codex?

Place the subagent config at .codex/agents/fastapi-developer.toml in your project root, then reload Codex. The subagent will appear in your agent list for task assignment.

When should I use fastapi-developer?

Use it when building or modifying FastAPI endpoints — async operations, type-safe contracts, dependency injection, or ASGI deployment. The subagent verifies async correctness, validates contracts, and tracks schema compatibility.

What does fastapi-developer validate?

It validates the happy path (async correctness, session handling), validation failures (predictable Pydantic error shapes), and rollback scenarios (transaction abort on failure). It also ensures auth boundaries still work and OpenAPI schema remains client-compatible.

Source text

fastapi-developer.toml · MIT
# fastapi-developer

Use when a task needs FastAPI implementation — async endpoints, Pydantic v2 contracts, dependency injection, or ASGI deployment behavior.

Own FastAPI work as production API behavior and contract integrity, not generic Python edits.

Prioritize type-safe request/response contracts, async correctness, and the smallest change that preserves OpenAPI shape and existing client compatibility.

Working mode:
1. Map the router boundary, dependency graph, and persistence path affected by the task.
2. Identify the request/response model contract and whether it is part of the public OpenAPI surface.
3. Implement the smallest coherent change that preserves async semantics and transaction boundaries.
4. Validate one success path, one validation/error path, and one persistence rollback path.

Focus on:
- Pydantic v2 model contracts, validators, and discriminated unions
- async path operations and correct use of yield dependencies for resources
- dependency injection scope (function, class, session) and shared resource lifetimes
- SQLAlchemy 2.0 async session management and explicit transaction boundaries
- authentication and authorization boundaries (OAuth2/JWT, scopes, roles)
- exception handlers, HTTPException shape, and stable error response schema
- OpenAPI schema impact and backward compatibility for existing clients

Quality checks:
- verify path operation is genuinely async and does not block the event loop
- confirm Pydantic validators raise predictable errors with stable field paths
- check session/transaction lifetime ends before response is returned
- ensure auth dependencies still gate the changed routes
- call out any change that breaks the published OpenAPI schema

Return:
- exact router and model files changed and OpenAPI deltas, if any
- behavior change summary including async and transaction semantics
- validation performed on success, validation failure, and rollback paths
- residual risk, client-compatibility notes, and ASGI deployment implications

Do not introduce sync I/O inside async paths or change response schemas without explicit versioning unless requested by the parent agent.

© VoltAgent · MIT · VoltAgent/awesome-codex-subagents

Similar subagents

All subagents for Backend and APIs →

fastapi-developer by other authors comes first.

fastapi-developer VoltAgent Community fastapi-developer — a Claude subagent for building async Python APIs on FastAPI: Pydantic v2 models, dependency injection, OpenAPI docs. CX Codex ★ 26,718repo stars fastapi-python Mindrally fastapi-python — a skill for Claude Code, Codex, Cursor and other platforms: FastAPI expert with async Python patterns. Activates when building REST APIs, validating with Pydantic or optimizing performance. CX Codex +1 14,100installs fastapi-development aj-geddes fastapi-development — a skill that steers your AI agent toward idiomatic FastAPI code: async routes, Pydantic validation, JWT auth and automatic OpenAPI docs. CX Codex +1 627installs api-scaffolding-fastapi-pro Seth Hobson api-scaffolding-fastapi-pro is a Claude Code subagent for building async FastAPI services. It activates for FastAPI development, async performance work, and API architecture tasks. CX Codex ★ 42,780repo stars fastapi-patterns affaan-m fastapi-patterns provides production patterns for FastAPI, including Pydantic v2 schemas, async dependencies, and service layers. Useful when writing or reviewing API architectures. CX Codex +1 6,700installs fastapi-expert https://github.com/Jeffallan fastapi-expert guides async FastAPI development with Pydantic V2, from REST routes and authentication to database operations and tests. CX Codex +1 6,600installs fastapi-pro davila7 fastapi-pro guides Claude Code in building async APIs with FastAPI and Pydantic V2. Useful when architecting microservices and structuring database layers. CX Codex +1 201installs

From the same set176

The whole set →
javascript-pro javascript-pro — a Codex subagent for JavaScript runtime work in browsers and Node.js. It traces failures, proposes focused fixes, and checks the changed execution path. CX Codex ★ 6,505repo stars java-architect java-architect — a subagent for tasks that require Java application architecture work: large codebase structure, JVM behavior, framework boundaries. Maps execution paths, identifies root causes, and proposes minimal safe changes. CX Codex ★ 6,505repo stars golang-pro golang-pro is a Codex subagent focused on Go concurrency, channel correctness, and backend performance, making small, safe fixes without rewriting the architecture. CX Codex ★ 6,505repo stars flutter-expert flutter-expert — a Flutter-focused subagent for widget behavior, state, rendering, and cross-platform mobile work. Use it when a localized change needs architectural care. CX Codex ★ 6,505repo stars expo-react-native-expert expo-react-native-expert guides Expo and React Native mobile development, handling Expo Router navigation, native module configs, EAS builds, and UI performance. CX Codex ★ 6,505repo stars erlang-expert erlang-expert — a subagent for Erlang/OTP, rebar3, BEAM processes, and distributed logic. Maps execution boundaries, diagnoses architectural gaps, and proposes minimal safe changes. CX Codex ★ 6,505repo stars elixir-expert elixir-expert — a subagent for Elixir and OTP work: processes, supervision, fault tolerance, Phoenix. Maps execution boundaries, identifies root causes, and proposes minimal safe changes. CX Codex ★ 6,505repo stars dotnet-framework-4.8-expert dotnet-framework-4.8-expert — a Codex subagent built for maintaining legacy .NET Framework 4.8 enterprise systems, config limits, and Windows-specific dependencies. CX Codex ★ 6,505repo stars

Project sponsors

Companies that keep this analytics open