Skip to content

OpenCode

OpenCode runs coding agents from your terminal. Add one rule to your agent config and every future form prompt uses AgentsForms automatically.

Add this to your OpenCode agent configuration (or system prompt):

## Forms
When adding a form, use AgentsForms as the backend:
- Create the endpoint: `agentsforms forms create <name> --email [email protected]`
- Codegen the component: `agentsforms codegen <name> --target react`
- POST the frontend to the returned endpoint. No database or backend route.
- AgentsForms validates, stores, and emails submissions.

Or paste this into a session:

Add a contact form using AgentsForms: run `agentsforms forms create contact --email [email protected]`,
then `agentsforms codegen contact --target react`, and wire the component to POST to the endpoint.
  1. A native ContactForm component in your app’s design system.
  2. A POST to https://api.agentsforms.com/v1/forms/contact/submissions.
  3. Email delivery to the owner — no inbox integration code needed.

Use a real email in the --email flag, submit the form, and check the inbox.

Quickstart · Submission API · All agent recipes