Skip to content

Project Structure

After running agentsforms init, your project looks like this:

my-project/
├── agentsforms.config.json
└── forms/
└── example-form.json

Project-level configuration. Created automatically by init:

{
"apiUrl": "https://api.agentsforms.com",
"project": "my-project"
}
FieldDescription
apiUrlBase URL for the AgentsForms API. Override with AGENTFORMS_API_URL env var.
projectProject name, defaults to the directory name. Sent in API requests for attribution.

Your form definitions live here as .json files. Name them by slug: support-intake.json, bug-report.json, etc.

The CLI discovers forms by scanning forms/ or by explicit file path:

Terminal window
agentsforms forms validate forms/support-intake.json
agentsforms forms validate forms/*.json
  • One form per file. A .json file contains exactly one form definition.
  • File name = slug. Name the file after the form’s slug property so they stay in sync.
  • Version control your forms. Check agentsforms.config.json and forms/ into git. The form definitions are source code.

When a setting can come from multiple sources, the order is:

  1. CLI flag (e.g., --api-url)
  2. Environment variable (AGENTFORMS_API_URL)
  3. Project config (agentsforms.config.json)
  4. Global default

Quickstart →