Skip to main content

Agents calling Jobs

An agent can now invoke a Job mid-conversation — triggering a full multi-agent workflow without leaving the chat interface. This turns a conversational agent into a controller for complex, multi-step processes.

What this enables

Previously, Jobs and agent conversations were separate: you ran a job manually, or on a schedule, or via a trigger. Now an agent can kick off a job from within a conversation when a human asks it to, turning a single agent into a coordinator for richer workflows.

Example: You're working with a sales agent in chat to qualify a new account. When you're ready, you ask the agent to "draft a full proposal" for that opportunity. The agent invokes a "Draft Sales Proposal" job — which runs a Research agent to collect account context, a Writer agent to draft the proposal, and a Reviewer agent to tighten the messaging. The sales agent then returns the complete proposal to you in the same conversation so you can review and send it.

How it works

  1. The user sends a message to an agent
  2. The agent determines that a job should be invoked (based on its instructions and the context of the conversation)
  3. The agent triggers the job, passing any relevant inputs from the conversation
  4. The job runs autonomously — its agents complete their tasks
  5. The job's output is returned to the calling agent
  6. The agent incorporates the output and continues the conversation

The conversation is not interrupted. The agent handles the coordination transparently.

How to enable an agent to call a job

Step 1: Create or select a job

Ensure the job you want the agent to invoke exists and is working correctly. See Create a job.

Step 2: Configure the agent

  1. Open Agent Builder or edit an existing agent
  2. In the Integrations or Jobs tab, select the jobs this agent is allowed to invoke
  3. In the agent's Instructions or Backstory, describe when and how it should invoke each job

Example instruction:

When a user requests a refund, invoke the "Process Refund" job with the following inputs:
- order_id: extracted from the user's message
- reason: extracted from the user's message
Report the job's output to the user once it completes.

Step 3: Test the interaction

Start a conversation with the agent and trigger the condition described in its instructions. Verify that:

  • The agent invokes the correct job
  • The job receives the correct inputs
  • The job output is returned and reported accurately

Inputs and outputs

When an agent invokes a job:

  • Inputs are passed from the conversation context — the agent extracts them based on its instructions
  • Outputs are the final result produced by the job's last task, returned to the calling agent as a text response

Define the expected input fields in your job configuration to ensure the agent knows what to extract and pass.

Error handling

If a job fails:

  • The agent receives an error notification
  • The agent's instructions should specify how to handle failures (e.g., "If the job fails, tell the user there was an issue and offer to escalate to a human")
  • The conversation continues — the failure is not silent

Use cases

  • Sales: Agent invokes a proposal or account-planning job when you ask for a full plan or document
  • Customer support: Agent invokes a structured support workflow job when you want a documented outcome
  • Research: Agent invokes a multi-agent research job for deep analysis, then presents the findings
  • HR: Agent invokes an onboarding workflow when a new employee checks in
  • Departments: A Head of Department agent invokes departmental jobs based on incoming requests — see Head of Department

To understand how jobs are organized and discovered, see Departments.