golem-invoke-agent-rust

Invokes methods on deployed Golem agents from the CLI with Rust-syntax arguments.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Calling a method on a deployed Golem agent requires correctly formatting agent IDs, constructor parameters, and Rust-syntax arguments, plus handling streaming, idempotency, and session recovery. This Skill provides the exact command patterns and options for golem agent invoke so invocations succeed on the first attempt.

Core Features & Use Cases

  • Agent Method Invocation: Run golem agent invoke <AGENT_ID> <FUNCTION_NAME> [ARGUMENTS...] with Rust-syntax values such as records, enums, options, and results.
  • Streaming Support: Bind stream parameters to stdin with --stdin-format value|raw and render stream results with --stdout-format value|raw, including durable sessions via --save-session, --resume-session, and --takeover-session.
  • Idempotency and Scheduling: Control execution guarantees with --idempotency-key, fire-and-forget triggers via --trigger, and scheduled invocations using --schedule-at.
  • Use Case: Invoke a chat agent method by running golem agent invoke 'ChatRoom("general")' send_message '"Hello, world!"' and receive the result streamed live to the terminal.

Quick Start

Ask the AI to invoke a method on your deployed Golem agent by providing the agent ID, function name, and arguments, for example invoking get_status on MyAgent().

Frequently Asked Questions about golem-invoke-agent-rust

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 with the agent ID and function name, such as golem agent invoke 'MyAgent()' get_status. The agent is created automatically on first invocation if it does not exist, and the command waits for the result by default.

How do I pass arguments to a Golem agent method?

Arguments use Rust syntax: records like MyRecord { field_one: 1 }, options as Some(value) or None, enums as MyEnum::VariantName, and tuples like (1, "hello"). Quote each argument so the shell passes it intact to the CLI.

Can I stream data to and from a Golem agent invocation?

Yes, use - as the argument for one direct stream parameter to bind it to stdin, with --stdin-format value or raw. For results, --stdout-format raw writes raw bytes for stream<binary> or stream<u8> results.

What happens if a streaming Golem invocation disconnects?

Streaming invocation is durable: disconnecting or pressing Ctrl-C detaches the transport without cancelling the invocation. Use --save-session on the initial call, then --resume-session to reattach or --takeover-session to fence an attached transport.

How does idempotency work in golem agent invoke?

Every invocation uses an idempotency key, generated automatically if not provided. Passing the same key with -i guarantees the invocation executes at most once, even if the CLI call is retried.