Skip to main content
Use human tasks when an agent needs a person to review a change, grant access, or make a decision. Each task is assigned to a person and explains what they need to do. Antigen delivers the request through your connected messaging and issue tracking tools, then tracks the response. Both use the same assignments and integrations configured in the platform.

Use human tasks from an agent

Agents assembled with the SDK have a human_tasks tool they can use to request help and follow the response. Describe when the agent should involve your team in its skills or task instructions. For example:
The agent creates the request with the relevant vulnerability context. When the person responds, the agent uses that response to continue its work. For an access request, it retries the operation after confirmation and follows up if access is still missing.

Create a task from your code

Call antigen.humanTasks.create() with the vulnerability, assignee, and request:
The assigned person receives a direct message through connected messaging tools and an assigned issue through connected issue trackers. If both are configured, they refer to the same human task. See Messaging and Issue tracking for delivery and assignment behavior.

Parameters

Returns the created task with an open status.

Complete a task automatically

Some actions can be confirmed through a connected integration. For a pull request review, specify the pull request whose merge completes the task:
The task completes when the GitHub integration detects that pull request’s merge. Its associated issue updates automatically. Without an automatic completion condition, the assigned person completes the action and confirms through the connected tool. Write each request around the action you need. If the agent needs a fix deployed, the request should ask for deployment confirmation.

Check a task

Retrieve a task by its ID:
response contains the person’s completion response when one was provided. Tasks completed through an integration may have no written response. For an external agent, your service uses the task’s status and response to decide when to continue. A completed access request, for example, tells your service to retry the operation that needed access.

List tasks

Retrieve tasks associated with a vulnerability:
Both filters are optional. Omit them to list tasks across your organization. Returns an array of tasks. If none match, the array is empty.

Update a task

Use antigen.humanTasks.update() to revise the request or change its assignee:
Only the supplied fields change. Updates are reflected in the connected tools. If the request is no longer needed, cancel it:

Continue work on the vulnerability

Completing a human task confirms the requested action. The next step depends on what the agent was waiting for: repository access may allow investigation to continue, while deployment confirmation may allow verification to begin. See Vulnerabilities for updating status and assignment, and Runs for launching an agent with the vulnerability.