golem-invoke-agent-moonbit

Invokes MoonBit Golem agent methods from the CLI with streaming and idempotency support.

1.5k|212|Updated Nov 24, 2023
One-click install
npx skills add https://github.com/golemcloud/golem --skill golem-invoke-agent-moonbit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golem-invoke-agent-moonbit
Source: https://github.com/golemcloud/golem/tree/main/golem-skills/skills/moonbit/golem-invoke-agent-moonbit
Command: npx skills add https://github.com/golemcloud/golem --skill golem-invoke-agent-moonbit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Calling methods on deployed Golem agents requires knowing the correct CLI syntax, agent ID format, argument encoding, and streaming options. This Skill provides the exact commands and conventions for invoking MoonBit-based Golem agents without trial and error.

Core Features & Use Cases

  • Agent Method Invocation: Run golem agent invoke <AGENT_ID> <FUNCTION_NAME> [ARGUMENTS...] to call any deployed agent method and wait for the result.
  • Streaming Support: Pipe data into stream parameters via stdin (--stdin-format value|raw) and render stream results with --stdout-format value|raw, including durable sessions with --save-session and --resume-session.
  • Idempotency and Scheduling: Control execution guarantees with --idempotency-key, fire-and-forget triggers via --trigger, and scheduled invocations with --schedule-at.
  • Use Case: Invoke a chat agent method by running golem agent invoke 'ChatRoom("general")' send_message '"Hello, world!"' and receive the rendered MoonBit return value directly in the terminal.

Quick Start

Ask the AI to invoke the get_status method on a deployed MoonBit agent using golem agent invoke with the agent ID 'MyAgent()'.

Frequently Asked Questions about golem-invoke-agent-moonbit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I invoke a Golem agent method from the CLI?

Run `golem agent invoke <AGENT_ID> <FUNCTION_NAME> [ARGUMENTS...]`, for example `golem agent invoke 'MyAgent()' get_status`. The agent is created automatically on first invocation, and the CLI waits for and prints the result.

How do I pass arguments to a Golem agent invoke command?

Arguments use Rust-style value syntax: strings in quotes, records like `MyRecord { field_one: 1 }`, options as `Some(value)` or `None`, and results as `Ok(value)` or `Err(value)`. Agent constructor parameters go inside the agent ID, such as `MyAgent("user-123")`.

Does golem agent invoke support streaming input and output?

Yes. Use `-` as the argument for one direct stream parameter to bind it to stdin, with `--stdin-format value` or `raw`. Stream results render with `--stdout-format value` or `raw`, and sessions can be saved and resumed with `--save-session` and `--resume-session`.

What is the agent ID format for golem agent invoke?

The agent ID is `AgentTypeName(param1, param2, ...)`, optionally prefixed with environment or application paths like `env/AgentTypeName(params)` or `app/env/AgentTypeName(params)`. Agents without constructor parameters use empty parentheses.

How do I ensure a Golem agent invocation runs only once?

Pass an idempotency key with `-i` or `--idempotency-key`, for example `golem agent invoke -i my-unique-key 'MyAgent()' do_work`. The same key guarantees at-most-once execution even if the CLI call is retried; one is auto-generated if omitted.