Golem fire and forget rust

From golemcloud/golem · View interactive version

Golem fire and forget rust is an AI agent skill from the GitHub repository golemcloud/golem. Triggering an agent invocation without waiting for the result in a Rust Golem project. Use when the user asks about fire-and-forget calls, async triggers, or enqueuing agent work.

How to use this skill

Skill file

Fire-and-Forget Agent Invocation (Rust)

Overview

A fire-and-forget call enqueues a method invocation on the target agent and returns immediately without waiting for the result. The target agent processes the invocation asynchronously.

Usage

Every method on the generated <AgentName>Client has a corresponding trigger_ variant:

let counter = CounterAgentClient::upsert("my-counter".to_string());

// Fire-and-forget — returns immediately
counter.trigger_increment();

// With arguments
let processor = DataProcessorClient::upsert("pipeline-1".to_string());
processor.trigger_process_batch(batch_data);

When to Use

Example: Breaking a Deadlock

// In AgentA — calls AgentB and waits
let b = AgentBClient::upsert("b1".to_string());
let result = b.do_work(data).await; // OK: awaited call

// In AgentB — notifies AgentA without waiting (would deadlock if awaited)
let a = AgentAClient::upsert("a1".to_string());
a.trigger_on_work_done(result); // OK: fire-and-forget

CLI Equivalent

From the command line, use --trigger:

golem agent invoke --trigger 'CounterAgent("my-counter")' increment
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.