Build with an AI agent
Build with an AI agent
A coding agent works best with a specific outcome, the relevant Thor context, and a way to verify the result. Use the same public guides and API contracts you would use when implementing the feature yourself. Do not give an agent production secrets as prompt text.
Start with the task and context
State whether you are building a Storefront feature, an Admin integration, or an embedded app. Identify the repository, target environment, and intended behavior. Keep credential values in the application’s configured secret environment. Provide IDs only for the resources the task requires.
Adapt the outcome and constraints to your actual work. An agent should ask for missing configuration rather than inventing a store ID or a schema field.
Read focused sources
llms.txt indexes the documentation.
Content pages provide Copy as Markdown, View as Markdown, and Copy prompt actions.
For a readable source URL, use /markdown followed by a guide path, such as /markdown/guides/storefront/product-pages.
Read the concept page for behavior and the guide for the ordered task. Use the selected API’s reference to verify operation names, required inputs, enum values, nullability, and error types. Do not infer Storefront capabilities from Admin types.
Verify before acting
Schema checks establish that an operation is structurally valid. They do not establish permission, stock, configured gateways, or a real project’s business outcome. Use test data and inspect the returned resource and errors when executing a workflow.
Treat IDs and cursors as opaque. Keep money in its returned currency and minor-unit representation. Preserve merchant-owned values when updating lists or synchronization fields. After an uncertain write response, reconcile existing state before retrying.
Finish with evidence
Ask the agent to identify the files changed, the behavior verified, and any untested dependency. For a storefront, verify the actual page and cart state. For an integration, verify identity mapping, retries, and reconciliation. For an app, verify authentication and session behavior in the dashboard. Do not describe a schema-only example as a completed live purchase.