# 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. Example task ```text Build a product-detail page in this storefront. Read the Thor product-page and request-context guides first. Use the existing Storefront transport and generated GraphQL documents. Resolve the project's configured store, currency, country, and price channel. Keep credentials and customer tokens on the server. Show the selected variant's image, price, and purchase availability together. Handle a missing product, missing image, and unavailable variant. Do not change live catalog, prices, inventory, or payment configuration. Regenerate types after changing operations and verify the page in the browser. Report what was checked and any behavior that still needs a test project. ``` 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](/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.