Before you start
- The Guild CLI, logged in.
- Zendesk connected in your workspace by a Zendesk admin. Guild creates a webhook in your Zendesk account when the trigger is enabled, and only admins can manage webhooks. See Zendesk setup.
1. Create the agent
PROMPT.md with the agent’s instructions:
guild.yaml with the tools the prompt uses:
public: false makes the comment an internal note. The agent answers from your workspace context, so add your help articles and policies there.
2. Save it and install it in your workspace
3. Create the trigger
service_config to narrow them. The agent receives a prompt that names the event and action, followed by the ticket as JSON. Guild trims it to fields such as the ID, subject, description, status, priority, tags and requester ID.
--action created matters. The agent’s note fires a comment_added event, and Guild doesn’t filter out the agent’s own changes, so a trigger with no action would run the agent again on its own note.
4. Try it
Create a ticket in Zendesk. The draft appears on it as an internal note from the connected Zendesk user. To see what the agent did, runguild trigger sessions <trigger-id> and open the session URL. Find the trigger ID with guild trigger list.
Events for the same ticket share one session, across every trigger and agent in the workspace.
Variations
- Tag what it drafted. Add
"tags": ["guild-draft"]to theticketobject, so a Zendesk view can list the tickets waiting for review.tagsreplaces the ticket’s tags, so tell the agent to include ticket.tags too. - Draft for some tickets only. Tell the agent to stop without writing when the ticket doesn’t match, for example when ticket.tags doesn’t include
billing. - Answer follow-ups. Add a trigger with
--action comment_added. The event includes the comment and its author, so tell the agent to stop when comment.author.is_staff is true; otherwise its own notes and your team’s replies trigger it.
Related
- Zendesk integration: every tool and webhook event
- Event triggers: agent input and placeholders
- Workspace context: what the agent answers from