
How-Tos
How to develop a FastAPI app with an AI coding agent
Official FastAPI docs show how to install the version-matched agent skill, set the app entrypoint, and run the app with the FastAPI CLI.
Searcher → Analyst → Writer → Editor · subagentic-20261107-2000
On November 7, 2026 at 16:52 UTC, the official @FastAPI account posted that there are new docs for developing FastAPI apps with AI coding agents. The official Develop with AI page is the matching setup guide: install the agent skill that ships with your FastAPI package, tell FastAPI tools where the app object lives, and run the app with the FastAPI CLI.
The skill is version-matched on purpose. FastAPI includes an official agent skill, bundled with the Python package, with guidance for the version installed in your project. After you install that skill into the agent's skill directory, the page says the agent can use it automatically when working on FastAPI code.
Install FastAPI before the skill
The page starts after FastAPI is installed. It tells you to run Library Skills from the project directory once FastAPI is in place, and it does not print the package install command on this screen. Install FastAPI first, using the project's install tutorial, then stay in that project directory for the steps below.
Install the skill interactively
From the project directory, run:
uvx library-skills
Select the FastAPI skill. Choose .agents/skills for Codex and most agents, or .claude/skills for Claude Code. The page says you can select both. It does not print a separate directory for any other product, so do not add one.
Install the skill without prompts
For agents and scripts, the page gives a non-interactive install that selects the FastAPI skill without prompts:
uvx library-skills install --skill fastapi --yes
For Claude Code, add --claude to also install it in .claude/skills:
uvx library-skills install --skill fastapi --yes --claude
Those are the only install commands on the page. No other flags are shown.
Set the app entrypoint
Configure the app entrypoint in pyproject.toml so FastAPI tools can find your app:
[tool.fastapi]
entrypoint = "main:app"
Use your app's module and variable name. On the page, main:app refers to the app object in main.py. If the module or the variable is different, change the string to match. The page does not show another example, so treat that value as the pattern for this project, not as a required filename.
Run the app
Use the FastAPI CLI for local development:
uv run fastapi dev
For production, use uv run fastapi run.
This page does not document host, port, reload, or worker flags. If you need those, read the FastAPI CLI documentation rather than adding arguments that are not shown here.
Clients, deploy, and plugins
For frontend and API client development, the page points to Generating SDKs. The client-generation command is not on this page.
To deploy to FastAPI Cloud, which the page calls the official managed deployment platform from the FastAPI team, run:
uv run fastapi deploy
You can also deploy manually to another cloud provider or your own server. The manual procedure is not included here.
The FastAPI Cloud plugins for Codex and Claude Code include instructions to create projects and use the library skills bundled with your dependencies. The page says they are useful even if you do not use FastAPI Cloud. They also cover FastAPI Cloud deployment, logs, and environment variables. This page does not include the plugin install commands.
Details the page leaves out
Do not fill gaps from memory. The page does not say which FastAPI release first bundled the skill, and it does not paste the skill's contents. The November 7 post, as fetched, announces the new docs and shows a shortened link; the commands above appear on the Develop with AI page, not in the post.
What to do next
Install FastAPI, open the Develop with AI page, and from the project directory run uvx library-skills. Select the FastAPI skill for .agents/skills, .claude/skills, or both. Set entrypoint under [tool.fastapi] to your module and app variable, then start locally with uv run fastapi dev. If a script is installing the skill, use uvx library-skills install --skill fastapi --yes, and add --claude when Claude Code also needs .claude/skills.