docs

Triggers

Start agents automatically via HTTP webhooks or cron schedules, both built into the container with no external orchestrator required.

Webhook trigger

agentfile.yaml
triggers:
  - type: webhook
    endpoint: /run        # POST to this path to invoke the agent
    port: 9100            # optional, defaults to 9100

Invoke the agent via HTTP:

Bash
curl -X POST http://localhost:8000/run \
  -H "Content-Type: application/json" \
  -d '{"message": "Generate the weekly status report"}'

# Response: {"run_id": "abc123", "status": "started"}

When using ninetrix run, the port is automatically forwarded and the container runs in detached mode.

Schedule trigger

YAML
triggers:
  - type: schedule
    cron: "0 9 * * MON-FRI"        # 9am on weekdays
    message: "Generate daily standup summary"

  - type: schedule
    cron: "0 0 * * 0"              # midnight on Sundays
    message: "Send weekly digest email"
Cron syntax
Uses standard 5-field cron: minute hour day month weekday. The schedule runs inside the container via APScheduler.

Routing in multi-agent files

Use target_agent to route a trigger to a specific agent instead of the entry agent:

YAML
triggers:
  - type: webhook
    endpoint: /research
    target_agent: researcher    # goes directly to this agent

  - type: schedule
    cron: "0 9 * * 1"
    message: "Monday morning briefing"
    target_agent: orchestrator

Both triggers together

YAML
triggers:
  - type: webhook
    endpoint: /run
  - type: schedule
    cron: "0 8 * * *"
    message: "Daily morning run"
On this page