Build Focused Actions
An action is one reusable executable operation. An HTTP action represents one HTTP request. Other action types cover code, model work, platform capabilities, and backend composition.
Choose the Action Type
Do not model every action as an API call. Keep the name aligned with the operation it actually performs.
Step 1: Define Typed Input Arguments
Input arguments make an action reusable. Define the values the caller must provide without coupling the action to a specific conversation.
For a Get feature requests HTTP action:
For an Update feature request HTTP action:
Name arguments for business data, not for where the data came from. A slot, webhook payload, schedule body, compound action, or another process can supply the same action input.
Step 2: Configure One HTTP Operation
An HTTP action defines:
Supplies the base URL and authentication configuration.
Matches the downstream API operation.
Begins with / and is appended to the connector base URL.
Adds operation-specific headers such as content type, version, tenant, or instance.
Adds filtering, pagination, sorting, or operation flags.
Sends the payload required by write operations.
Keeps only the fields the caller needs and establishes a stable output contract.
Build Along: Create the PurpleSuite Actions
Use the explorer to inspect the current Community API contract. It reads public catalog and OpenAPI metadata, then translates the selected operation into an Agent Studio action outline. It never requests credentials or executes the operation.
Choose a mock enterprise system and operation. The explorer reads public OpenAPI metadata and generates an Agent Studio action outline without requesting or storing credentials.
Follow one live feature request through the same three API calls and Agent Studio contracts in every chapter.
https://marketplace.moveworks.comX-Instance-ID.GET /api/purple-suite/community/feature_requests $filter: currentStatus ne 'Planned' $select: id,name,currentStatus,productArea $top: 10
/api/purple-suite/community/feature_requestsDynamic resolver retrieves live candidates/api/purple-suite/community/feature_requests/{id}Compound action updates the selected record/api/purple-suite/community/feature_requests/{id}Compound action verifies the stored resultCreate these three HTTP actions with the connector from the previous chapter:
Add X-Instance-ID as an action header for all three operations. For the update action, map a JSON body with only the field being changed:
Configure the list action with the query parameters used by the dynamic resolver:
Run the three actions in the same order the complete plugin uses:
- Run
List PurpleSuite feature requestsand save one returned record’sid,name, and originalcurrentStatus. - Run
Get PurpleSuite feature requestwith that ID and verify the same record is returned. - Run
Update PurpleSuite feature requestwith the ID andnew_status: Planned. - Run the get action again and verify
currentStatusisPlanned. - Restore the original status when appropriate for your development instance.
Your checkpoint is three independently tested actions with stable, minimal response schemas.
Step 3: Place Variables Safely
HTTP actions can reference inputs and supported runtime values in the endpoint, headers, query parameters, body, and JWT claims.
Escaped Mustache
Raw Mustache
Data Mapper
Use double braces when you need escaped string substitution:
Escaping can change characters such as @, /, quotes, or JSON punctuation.
Some existing quickstarts use double braces for HTTP values. Follow the current HTTP action guidance: use triple braces for raw request substitution, and use Data Mapper when the value must remain a list, object, number, or boolean.
Step 4: Use Runtime User Data Deliberately
In user-triggered execution, an HTTP action can reference supported user attributes through meta_info.user.
Use the bare meta_info.user.email_addr path only in Data Mapper or DSL contexts. Do not assume that user context exists in webhook or scheduled execution. Pass identity as an explicit input when backend work needs it.
Use meta_info.action_instance_id when the downstream API supports an idempotency key.
Step 5: Shape the Response Early
Every field you keep becomes part of a downstream contract. Prefer:
Avoid passing:
There are three useful pruning boundaries:
- The HTTP action Response Schema removes fields before returning to its caller.
- A compound action’s
return.output_mappercontrols its final return. - A conversation action activity’s Output Mapping controls what enters the conversation process and reasoning context.
Step 6: Test the Action in Isolation
Provide example values for every input argument and test:
- A successful response.
- No matching data.
- Invalid and boundary values.
- Unauthorized and forbidden responses.
- Rate limiting and timeouts.
- Malformed downstream data.
- A repeated write with the same idempotency key.
The action editor uses the currently logged-in builder for user runtime attributes. This does not prove that every end user has the same downstream access.
Action Quality Checklist
- The name begins with a clear verb.
- The action performs one focused operation.
- Input arguments are typed and reusable.
- The endpoint path begins with
/. - The connector supplies secrets; descriptions and mappings do not.
- Request variables use the correct substitution or mapping method.
- The response schema includes only useful fields.
- Errors preserve enough detail for deterministic handling without exposing secrets.
- The action passes isolated tests before composition.
Deep Dives
Next, map data and context.