Trigv home

Search docs

Getting started
  • Overview
  • How Trigv works
Help
  • Send test
  • API keys
  • Channels
  • Image attachments
Guides
  • All guides
  • cURL
  • Laravel
  • AI coding agents
  • Cursor
  • Claude Code
  • OpenAI Codex
  • Other agents
SDKs
  • All SDKs
  • JavaScript
  • Python
  • PHP
  • Go
  • Ruby
  • CLI
API reference
  • API overview
  • POST /api/v1/events
  • Errors & rate limits
  • API security
More
  • OpenAPI spec
Open in ChatGPT ↗ Ask questions about this page Open in Claude ↗ Ask questions about this page Open Markdown https://trigv.com/docs-md/learn/ai-agents.md

AI coding agents

Start a long agent task, walk away, get a push when Cursor, Claude Code, or Codex finishes — or when it needs your attention.

How it works

  1. You save a small shell script that calls Trigv.
  2. Your AI tool runs that script when the agent stops (via “hooks”).
  3. Trigv sends a push to your phone.

Before you start

  • API key exported as TRIGV_API_KEY in your shell (create one)
  • Optional: create an agents channel in the dashboard
  • curl and jq installed (macOS: usually pre-installed or via Homebrew)

Step 1 — Save the notify script

Create ~/.local/bin/trigv-notify.sh:

Code
#!/usr/bin/env bash
set -euo pipefail

TITLE="${1:-Agent finished}"
DESCRIPTION="${2:-}"
CHANNEL="${TRIGV_CHANNEL:-agents}"
LEVEL="${TRIGV_LEVEL:-info}"

: "${TRIGV_API_KEY:?Set TRIGV_API_KEY}"

PAYLOAD=$(jq -n \
	--arg channel "$CHANNEL" \
	--arg title "$TITLE" \
	--arg description "$DESCRIPTION" \
	--arg level "$LEVEL" \
	--arg event_type "agent.completed" \
	'{channel: $channel, title: $title, description: $description, level: $level, event_type: $event_type}')

curl -sS -X POST https://api.trigv.com/api/v1/events \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer ${TRIGV_API_KEY}" \
	-d "$PAYLOAD" >/dev/null

Then run: chmod +x ~/.local/bin/trigv-notify.sh

Step 2 — Test manually

Code
export TRIGV_API_KEY=trgv_...
~/.local/bin/trigv-notify.sh "Test" "Hooks will work"

Check your phone before wiring hooks.

Step 3 — Pick your tool

  • Cursor — hooks in .cursor/hooks.json
  • Claude Code — hooks in settings
  • OpenAI Codex — hooks in config.toml
  • Other agents — wrapper scripts

Keep keys out of git. Use environment variables — never commit API keys in hook config files.

Previous Laravel Next Cursor

On this page

    Native push alerts for developers. Send alerts from webhooks, cron jobs, and scripts. We deliver alerts to your devices, but don't keep the message or notification history on our servers.

    Follow @trigvapp →

    Built by Harish Chouhan

    Product

    • Features
    • How it works
    • Pricing
    • Docs
    • Integrations
    • SDKs
    • API
    • Full LLMs text

    Company

    • About
    • Support
    • Changelog

    Legal

    • Terms & Conditions
    • Privacy Policy
    • Cookie Policy
    • API Security
    All systems ok. Get back to coding.

    © 2026 Webtions OU (dba Trigv)