> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Build a Play with your agent

> Have your agent build a reusable Play around a defined result.

[Agent guide: CLI and SDK instructions →](/docs/sdk-v2/plays)

## 1. Have your context ready

Have example inputs, expected outputs, and rules for external writes. A Play can require custom code, which the agent will author.

## 2. Ask your agent

Paste this into your agent, then provide your task and example inputs when it asks:

```deepline-prompt theme={null}
/deepline-gtm Build a Deepline Play for the outcome I describe. First inspect existing Plays and tool contracts. Reuse a maintained Play when its contract fits; otherwise author a workspace-owned Play. Preserve source identity, define inputs and outputs, and implement my acceptance rules explicitly. Keep external writes disabled in the first pilot. Check the source before proposing a small run and show me the expected usage.
```

For a durable workflow with explicit states and transition rules, ask for an Engine instead of treating every scheduled Play as an Engine:

```deepline-prompt theme={null}
/deepline-engine Build an Engine for the state machine I describe. Confirm the states, allowed transitions, state-decision rules, transformations, and terminal behavior without inventing business policy. Preserve stable row identity and transition history. Reuse inspected transition Plays where their contracts fit. Show the state diagram and validation results before publication or a paid pilot. Do not activate triggers as part of building the Engine.
```

Complete any requested sign-in yourself. Give the agent the missing information before approving execution. Provider-backed work can incur usage.

## 3. Review the result

The checked Play produces the intended output or an explicit exception for each input. Review the exact conditions that enable external writes before approving them.

Ask your agent:

```deepline-prompt theme={null}
/deepline-gtm Compare the result with the acceptance rule we agreed. Show the evidence for accepted and rejected outcomes, unresolved questions, and recorded Deepline usage where work ran. If work is still running or a response is uncertain, inspect the original saved execution before proposing another request. Explain the next decision I need to make.
```

Approve a larger job, recurring work, or external changes only after reviewing that decision.

## Check your understanding

Does a successful authoring check prove your qualification rule is correct?

> **Show the answer**
>
> No. It validates supported structure and contracts. Domain correctness still
> needs representative inputs and acceptance checks.

## Related guides

* [Prebuilt Plays](/docs/human/sdk-v2/prebuilt-plays)
* [Batch CSV enrichment](/docs/human/sdk-v2/batch-csv)
* [Webhooks and schedules](/docs/human/sdk-v2/webhooks-and-schedules)
* [Deepline Engines](/docs/plays/engines)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.