DEV Community

Cover image for Lawful Agents, Part 2: Custom Agent Actions, connect from Workday to the rest of your stack
Obinna Ekwuno for Workday Developers

Posted on Edited on

Lawful Agents, Part 2: Custom Agent Actions, connect from Workday to the rest of your stack

In Part 1, I looked at Agent-Ready tools, the native Workday tools designed so a model can read and call them without tripping over itself, whilst saving tokens. They cover a lot of ground, but they are Workday's definition of what an agent can do.

As soon as you ask an agent to do something that belongs to your organisation, like paging the on-call person for an HR case, escalating a ticket to a team that uses Jira, or logging a daily backlog count to a spreadsheet, you are outside the catalogue and into your own stack.

You could give the agent credentials for each of those systems, but then it stops acting as the person who asked, nothing checks what it is about to write, and there is no longer one place that lists what it can touch which poses a Security and compliance issue.

Custom Agent Actions let you extend what your agent can do without giving any of the security and compliance up. You build the flow of work as an orchestration, describe it for the agent, and it becomes a tool the agent can call with the security of the person using it in delegate mode.

🚨 Note : connectors are only available to Extend AI customers, so you need a tenant with that subscription to build what is covered in this post. If you are on a developer tenant without it, the pattern still applies and is worth understanding before you get access.

What you are building

A Custom Agent Action is an orchestration exposed as a Model Context Protocol (MCP) tool so AI agents can execute deterministic multi-step business logic across Workday and external systems that you create from the Custom Agent Action template in Orchestration Builder.

The template is what makes it visible to an agent. Everything beneath it is a normal orchestration, so what the agent calls runs the same way every time, and you decide what it does.

To demonstrate, I will use an HR case management agent as the example. Picture an app with ten actions, six of them work over Workday Help cases: listing the queue, showing a case, summarising tasks.

The other four reach outside Workday to PagerDuty, Jira Service Desk, Slack, Gmail and Google Sheets.

To showcase this, we will be looking at the end to end process of "page on-call for a case". Say a case solver spots a new case that nobody has picked up and wants the on-call person paged.

The app's orchestrations listed in Developer Site, each one a Custom Agent Action

The page on-call orchestration open in Orchestration Builder, starting from the Custom Agent Action step

The orchestration reads the case from Workday, checks the urgency, and only sends the page when the request includes a confirm flag. In the case of a duplicate, the flow spots it and does not page again. None of that depends on the model's judgement.

Inside the flow you have three kinds of step. Connectors are prebuilt actions for third-party services, each tied to an account at that service, with no OAuth flow or credential storage for you to build. Your own logic covers transforming fields, calculating values and branching, including the duplicate check above. And Workday's REST and SOAP APIs cover anything the native tools do not.

PagerDuty also needs to know which service to page. If the agent does not say, the action looks it up through a sub-orchestration that any action in the app can call. It is never offered to the agent as a tool of its own, so shared logic stays in one place without widening what the agent can reach.

The PagerDuty service lookup built as a sub-orchestration

Reaching the rest of your stack

The connector catalogue covers hundreds of services across 22 categories, from CRM, help desk and productivity tools through to databases, cloud infrastructure and AI providers, and each connector comes with potentially dozens of actions. Search for PagerDuty and you get trigger an incident, list services, list who is on call, add a note to an incident and more.

The Connectors panel in Orchestration Builder with PagerDuty selected and its actions listed

To set one up, go to the Connectors tab on your app's home page, add the connector from the catalogue, and give it a descriptive name. Then connect at least two accounts: one for Production and one Default that your non-Production tenants fall back to. For OAuth services you sign in at the service as the account the app should act as. Never use a personal account, because every run of the app will use it.

Once the connector is on the app, every Custom Agent Action orchestration in that app can use it. You drag the action onto the canvas, pick the connected account, and fill in its properties with Expression Builder from upstream steps, the same as any other step.

The Create Incident step's properties, with a connected account and values built from upstream steps

Before you wire up the rest of the flow, open the Connector Explorer from the action's properties panel, pick an account and an action, set the properties and click Run Action. It shows you the JSON that step will return, which is what you need to configure everything downstream.

Run Action calls the live service as the connected account, so testing a create action creates an incident. Use a sandbox account for anything that writes.

Connector Explorer running the Create Incident action and showing the JSON it returns

There are two limits you may need to design around: an action has to finish within 5 minutes, and files passed into an action can total no more than 128 MB.

Describing the action for the agent

On the Start step, Configure Request has a Custom Agent Actions tab, and what you write there is everything the agent will ever know about your action.

The Custom Agent Actions tab on the Start step, with the action's description, annotation and request property descriptions

Write the description from the agent's point of view rather than the developer's. It needs to say what the action does and when to use it, because that is what the model goes on when it decides whether to call it.

The documented example is a good template: "Makes an ad-hoc percentage adjustment to an employee's base pay. Use this action when there is a request to increase or decrease an employee's base compensation by a percentage."

Every request property gets its own description, with the expected format and a sample value.

If a property has no default, the agent has to supply a value, so say what you expect. On the End step, Configure Response lets you describe each output in the same way.

You also choose an annotation, which tells the agent how careful to be.

Annotation Meaning
Read-Only Reads data and changes nothing
Destructive Can modify or delete data
Idempotent Safe to retry, same result every time
Open World May touch entities that are not fully known in advance

Workday agents ask the user to approve every call to an action that is not Read-Only, so label your reads as Read-Only and label anything that writes accurately.

⚠️ Note: the orchestration name can be at most 30 characters, and empty query parameter rows produce invalid tool schemas that stop MCP clients loading your tools, so delete any you are not using.

Connecting it to an agent

When you save and deploy the app, the actions exist in your tenant. Once you add one to an agent in the Agent System of Record, the agent can discover and call it through the Agent Gateway. For a Workday Custom Agent, that happens when you save and deploy the agent.

For an agent running somewhere else, it is a registration call to the Agent System of Record from any API client, the same step Part 1 covered for native tools.

The external agent in the Agent System of Record, with a write skill for agent administrators and a read skill for all employees

I recommend splitting the agent into two skills, one for reads and one for writes, so they can be given to different groups. Every employee gets the read skill and only agent administrators get the write skill. Each skill lists its tools by name (same name in your title with description), matching the action ID from Orchestration Builder.

Then you point your client at it. In Claude, that means adding a custom connector with the Workday MCP server URL and the client ID and secret from the agent definition, then choosing whether each tool is always allowed or needs approval.

Set both reads and writes to need approval and try it. Ask for the open cases, drill into one, then ask for a new free case and have the on-call paged. By doing so, you never name a tool. The agent reads the descriptions, picks the right action, and the sub-orchestration returns the PagerDuty services to choose from before anything is sent.

The approval prompt before the page on-call action runs

The PagerDuty services returned by the lookup, before anything is sent

Confirmation that the on-call has been paged, with the incident and service used

The same pattern escalates a different case to Jira Service Desk and posts to Slack, emails a case summary to a manager through Gmail, and appends a backlog count to a Google Sheet. Five external systems, no HTTP calls written, no credentials stored, and every call runs as the person asking and waits for their approval.

The escalation posted to Slack

The case update arriving in Gmail

The backlog digest the agent logged, with a link to the trend sheet

What changes for the agent

Before this, the agent could read and write Workday. Now it can page people, escalate tickets, post updates, send emails and keep a trend sheet, through logic you wrote and control, and the guardrails from Part 1 are unchanged. The action runs with the permissions of the person using the agent, it only runs if it is listed on the agent's definition, and anything that is not Read-Only waits for a human.

Connectors authenticate through Pipedream's official OAuth client, which is shared across the platform rather than unique to your organisation. If your admins control third-party app access in Google Workspace or Microsoft Entra, approving a connector means approving that shared client, so review the scopes each connector asks for and include connector connections in your regular access reviews.

Start here

  1. Pick one job your agent would need to "collaborate" with external services on that lives partly outside Workday.
  2. In your Extend AI app, add the connector you need and connect a sandbox account as the Default.
  3. Build the job as a Custom Agent Action orchestration, with your checks inside the flow.
  4. Describe the action and every property from the agent's point of view, and pick the annotation that matches what it does.
  5. Save, deploy, add the action to your agent in the Agent System of Record, and ask the agent to do the job without telling it which tool to use.

If you want to try this yourself, join the Workday Developer Program at developer.workday.com for the docs, the connector catalogue and a community of people building agents on Workday.

In Part 3, I look at Workday Developer Agent, which starts from what you want to build and plans the agent, its skills and its tools for you, then helps you ship it with an identity, permissions and a trace of everything it did.

Top comments (2)

Collapse
 
kiweely profile image
Kiweely •

The delegate-mode point is the part teams usually trip over once they move from testing as an admin to real case solvers.

Two gotchas we keep seeing in practice with Custom Agent Actions + Orchestrate:

  1. Even when the user has View/Modify on the Extend app's custom security domain, delegate mode still enforces the underlying Workday-delivered domains for every REST/WQL step inside the orchestration, and any edit to those policies sits inert until Activate Pending Security Policy Changes runs.
  2. Connector actions can work fine in Connector Explorer and still fail at runtime if the connected account is only mapped under Default instead of the target environment tier (Impl/Sandbox).

If anyone hits 403 Forbidden or S22 Permission Denied while wiring up custom domains, WQL scopes, or ISU/API client mappings on an Extend app, we put together a diagnostic breakdown here: kiweely.com/guides/workday-extend-...

Collapse
 
marten_de profile image
Marten •

Really interesting scenarios! I can definitely see the potential for AI agents in HR processes. However, from a European perspective, GDPR, the EU AI Act, and works council involvement add quite a bit of complexity. This creates uncertainty and can make implementation challenging, even when the technical possibilities are already there. I'd be curious to hear how others are approaching these challenges.