# Automation (/en/docs/developers/automation)



Automation combines platform capabilities into scripts and workflows that you run on demand or start with a trigger.

| Object   | Purpose                                                                                |
| -------- | -------------------------------------------------------------------------------------- |
| Script   | TypeScript that executes from start to finish and returns one result.                  |
| Workflow | A YAML process with step checkpoints, waiting and suspension.                          |
| Action   | A reusable capability with input and output schemas, called from a script or workflow. |
| Run      | One execution of a script or workflow, including its input, output, status and calls.  |
| Trigger  | Starts a published script or workflow on a schedule or when a webhook arrives.         |

## Choose an entry point [#choose-an-entry-point]

Use a script for a calculation, batch job or sequence of API calls. Use a workflow when work must wait across time or resume from checkpoints. Package a shared capability as an action. Actions are called inside scripts or workflows; they have no standalone run endpoint.

Rerunning a failed script executes it from the beginning. Effects that already occurred are not rolled back. Add a trigger to a published target when it should run automatically.

## Run once [#run-once]

Create a develop API Key in [Console](https://console-develop.deepraxis.ai/keys) and set `PRAXIS_API_KEY`. In Bash with curl and jq installed, this sends a Bearer-authenticated request and adds one without calling a model:

```bash
export PRAXIS_API_URL="https://api-develop.deepraxis.ai"
: "${PRAXIS_API_KEY:?Set PRAXIS_API_KEY to your develop API Key}"
curl --fail-with-body -sS "$PRAXIS_API_URL/automation/v1/runs" \
  -H "Authorization: Bearer $PRAXIS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{"source":"export default async (input: { n: number }) => ({ answer: input.n + 1 });","language":"ts","input":{"n":41},"wait":60}' \
  | jq '{id,status,output,error}'
```

Expected: `status: "completed"` and `output: {"answer":42}`. If still pending or running, save the returned `id` as `RUN_ID` and [read the result](/en/docs/developers/automation/quickstart#read-result). The [quickstart](/en/docs/developers/automation/quickstart) also shows how to save and publish this script.

## Next steps [#next-steps]

* [Quickstart](/en/docs/developers/automation/quickstart): get a result with curl, then publish the script.
* [Concepts](/en/docs/developers/automation/concepts): versions, run trees, idempotency and costs.
* [Write a script](/en/docs/developers/automation/guides/write-script): schemas, platform APIs, actions and logs.
* [Triggers](/en/docs/developers/automation/guides/triggers): schedules and webhooks.
* [Limits and errors](/en/docs/developers/automation/limits-and-errors): capacity, timeouts and troubleshooting.

[API reference →](/en/docs/api/native/automation) · [Cookbook →](/en/docs/cookbook)
