Golem trigger agent go

From golemcloud/golem · View interactive version

Golem trigger agent go is an AI agent skill from the GitHub repository golemcloud/golem. Triggering a fire-and-forget invocation on a Go Golem agent from the CLI. Use when the user asks to trigger, enqueue, or fire-and-forget an agent method invocation in a Go Golem project.

How to use this skill

Skill file

Triggering a Fire-and-Forget Agent Invocation

Overview

The --trigger (or -t) flag on golem agent invoke sends the invocation request to the agent and returns immediately without waiting for the result. The invocation is enqueued and executed asynchronously by the Golem runtime.

Both golem and golem-cli can be used — every command below works with either binary.

Steps

  1. Identify the agent by its key — type name and constructor parameters (CounterAgent("my-counter")) — or by its agent ID (CounterAgent[<agent-id>]).
  2. Pick the method to enqueue (e.g. increment, add).
  3. Run golem agent invoke --trigger — the CLI returns as soon as the invocation is accepted.

Usage

golem agent invoke --trigger <AGENT_ADDRESS> <FUNCTION_NAME> [ARGUMENTS...]

When to Use Trigger

Examples

Trigger a method with no wait

golem agent invoke --trigger 'CounterAgent("my-counter")' increment

Trigger with an argument

add takes one parameter (the By field of AddIn), passed positionally:

golem agent invoke --trigger 'CounterAgent("my-counter")' add 5

Trigger in a specific environment

golem agent invoke --trigger 'staging/CounterAgent("my-counter")' increment

Trigger with an explicit idempotency key

golem agent invoke --trigger -i 'increment-2026-01-15' 'CounterAgent("my-counter")' increment

Available Options

| Option | Description |

|--------|-------------|

| -t, --trigger | Required. Trigger the invocation without waiting |

| -i, --idempotency-key <KEY> | Set a specific idempotency key; use "-" for auto-generated |

| --no-stream | Disable live streaming of agent stdout/stderr/log |

| --schedule-at <DATETIME> | Schedule the invocation at a specific time (ISO 8601 format, e.g. 2026-03-15T10:30:00Z) |

Difference from Regular Invoke

| | golem agent invoke | golem agent invoke --trigger |

|---|---|---|

| Waits for result | Yes | No |

| Returns value | Yes | Only the idempotency key |

| Streams output | Yes (by default) | No |

| Use case | Synchronous calls | Fire-and-forget / background work |

Value Syntax

Pass one Go literal per exported field of the method's input struct, in declaration order. Skip golem.Principal fields; do not supply a principal value or placeholder. Do not wrap all fields in a JSON object. A method whose input is golem.Unit takes no arguments, not '{}'. --format json controls output only. Load golem-invoke-agent-go for the string fallback and the different HTTP body rules. Awaited, triggered, and scheduled invocations share the same CLI argument parser.

Key parameters and method arguments use Go syntax, read against the agent's schema:

For example: golem agent invoke 'ShelfAgent({zone: "a", level: 2}, closed, {"x"})' describe '"fragile"' '{ "k" => 2 }'.

This example assumes type SendEmailIn struct{ Request EmailRequest } with type EmailRequest struct{ To, Subject, Body string }. Pass the single request value, not a wrapper containing request:

golem agent invoke --trigger 'MyAgent("user-123")' sendEmail '{to: "alice@example.com", subject: "Hello", body: "World"}'

Key Constraints

Related Skills

| Skill | When to Load |

|-------|--------------|

| golem-invoke-agent-go | Synchronous invocation that waits for the result |

| golem-schedule-agent-go | Combine --trigger with --schedule-at for future execution |

| golem-fire-and-forget-go | Fire-and-forget invocation from agent code (Trigger) |

| golem-create-agent-instance-go | Pre-create an agent instance (golem agent create) |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.