Skip to main content
You can use Trigger.dev’s human-in-the-loop features to build permission flows for the tools your agents use. There are two main parts to this: connections and grants. You can manage these in your database or using tools like Composio. Trigger.dev can help you with the long waits for human approval. Your agent might request permission to send an email but not hear back for days. Trigger.dev helps you suspend that workflow and continue it once the user approves, without being charged while it’s suspended.

How it works

Before each tool call, check whether the user has a grant that covers it. If they do, the tool runs. If not, the agent asks the user and waits for an answer.

Where the agent waits

  • In a chat, a chat.agent tool approval ends the turn with the call waiting for an answer. The run releases compute while it waits.
  • Outside a chat, such as in a scheduled job or a background agent, a wait token suspends the run. Ask the user by email, Slack or your app, and complete the token from your backend when they answer.

Choose a guide

Both guides cover grants and approvals. They assume you already store the user’s connections.

In a chat

Check grants before each tool call and add approve once, always allow and deny buttons.

Outside a chat

Check grants in a task and wait for an answer with a wait token.