Golem trigger agent moonbit

From golemcloud/golem · View interactive version

Golem trigger agent moonbit is an AI agent skill from the GitHub repository golemcloud/golem. Triggering a fire-and-forget invocation of a MoonBit Golem agent. Use when asked to trigger, fire, or enqueue a method call without waiting for the result.

How to use this skill

Skill file

Triggering a Fire-and-Forget Agent Invocation

Both golem and golem-cli can be used — all commands below work with either binary.

Usage

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

The --trigger (or -t) flag 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.

When to Use Trigger

MoonBit-Specific Notes

Examples

Trigger a method with no wait

golem agent invoke --trigger 'MyAgent()' start_background_job '"job-123"'

Trigger in a specific environment

golem agent invoke --trigger 'staging/MyAgent("user-123")' send_notification '"Your order is ready"'

Trigger with an explicit idempotency key

golem agent invoke --trigger -i 'job-run-2024-01-15' 'BatchProcessor()' run_daily_report

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 |

Idempotency

Triggered invocations also use idempotency keys. If the same idempotency key is used, the invocation will not be executed again.

Auto-Deploy

If the agent's component has not been deployed yet and the CLI is run from an application directory, the command will automatically build and deploy the component before triggering.

Value Syntax

Pass one native argument per user-supplied method parameter in signature order, excluding self and config parameters. Skip host-injected Principal fields; do not supply a principal value or placeholder. Do not wrap all parameters in a JSON object. No-parameter methods take no arguments, not '{}'. --format json controls output only. Load golem-invoke-agent-moonbit for the string fallback and the different HTTP body rules. Awaited, triggered, and scheduled invocations share the same CLI argument parser.

The key parameters and method arguments use MoonBit syntax:

This example assumes pub fn MyAgent::send_email(self : Self, request : EmailRequest) -> Unit, where EmailRequest has to, subject, and body string fields. Pass the single request value, not a wrapper containing request:

golem agent invoke --trigger 'MyAgent("user-123")' send_email 'EmailRequest::{ to: "alice@example.com", subject: "Hello", body: "World" }'
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.