AI Agents in Anvil
AI agents in Anvil let you build and edit your apps by describing what you want in the chat. The agent reads your code, makes the right changes across your files, and explains what it did. Everything is written in Python you can read, understand, and edit yourself.
AI agents in Anvil connect to your own Codex or Claude account. If you don’t have an AI subscription, Codex is the best place to start and you can use it for free with a ChatGPT account.
AI agents are available on all Anvil plans. See Connecting your account to get set up.
How the agent works
When you send a prompt, the agent reads your code, edits the relevant files, and checks its work before finishing. Changes are synced live to the Anvil Editor as they happen. You can review what changed at any time using Version History.
The agent can access:
- Forms and client code: create and edit Forms, Components, and Modules
- Server code: write Python logic in Server Modules
- Styling: edit your app theme and CSS
- App configuration: manage dependencies, services, and Data Tables schema
The agent does not have access to your app’s Secrets, and cannot perform git operations aside from the automatic commits it makes when editing your app. Any Data Tables schema changes must be applied manually in the Data Tables view. The agent cannot edit the data stored in your Data Tables.
Connecting your account
Connect your Codex or Claude account to your Anvil account to get started.
The Agent chat window
Learn about the agent chat interface and how to interact with the agent.
For tips on writing effective prompts, see Prompting best practices.
Do you still have questions?
Our Community Forum is full of helpful information and Anvil experts.