Build actions with Backstage
Describe the action you need in plain language and let Backstage draft it, then review the request, test it in the Playground and turn it on.
Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.
Backstage can build actions for you. Describe what the agent should be able to do, and Backstage drafts the action, including the description, the parameters and the HTTP request for a Custom action. Use it when you know the outcome you want but not the exact settings.
Ask for an action
- Open Backstage and choose the agent.
- Describe the action. Name the system, the endpoint if you know it and what the agent should do with the result.
- Answer any questions Backstage asks, such as which field holds the order number.
- Review the proposal.
An example request:
Build an action that checks an order's status. Our API is
GET https://shop.example.com/api/orders/{orderNumber} with a bearer token.
Show the status and the delivery date.
You should see a proposal with the action name, a description for the agent and the request settings filled in.
Review before you approve
| Check | Why |
|---|---|
| Description | It tells the agent when to use the action. Make it specific. |
| Method and URL | Confirm they match your API. |
| Parameters | Each should say what the agent must ask the customer for. |
| Credentials | Add the token yourself. Backstage does not guess secrets. |
| Write operations | Anything that changes data needs a procedure with rules. |
Approve the action, or edit it first. See Approvals and auto mode.
Test the action
- Open the action in Actions and select Test with sample values.
- Open Test > Playground and ask the question that should trigger it.
- Read the trace. It shows the request, the status code and the reply.
- Ask Backstage to adjust anything that is wrong: "The reply should say shipped, not SHIPPED."
Warning: For actions that change data, such as cancellations or refunds, test against a staging system first and keep the action off until a procedure sets the rules.
What it can build
Backstage can draft Custom actions, Collect data and Collect leads actions, Custom buttons and suggested messages. Connected-system actions, such as Shopify or Stripe, need the integration connected first. Backstage will tell you when one is missing.
For the settings in detail, see Custom action. For other tasks Backstage handles, see What Backstage can do.