Post-trigger hooks aren’t meant for configuring dependencies. See Tembo Projects instead.
Prerequisites
- Agent post-trigger hooks must be enabled for your organization or user account.
- You need permission to edit the agent.
Configure a post-trigger hook
- Open the agent you want to configure.
- Add any valid shell command to the field labeled “Post-trigger hook”.
- Save the agent.
- Trigger the agent.
/workspace, after Tembo sets up the repository and before the agent session starts.
How output affects the agent
Post-trigger hooks impact triggered agent runs in two ways:- When the script succeeds, Tembo captures what the script prints and adds it to the agent’s starting thread as context.
- When the script fails (exits with a non-zero
exitcode), Tembo stops the run before the agent starts.
echo). Markdown, plain text, and compact JSON all work well.
Example Usage
Trigger payloads
For triggered agent runs, Tembo exposes the trigger payload to the script through theTRIGGER_PAYLOAD environment variable. For most integration triggers, Tembo provides the payload shape automatically.
Use the payload to decide what extra context to fetch, print, or validate. The agent receives both the trigger payload and the hook’s standard output, so there is no need to restate fields that are already in the payload.