Fire-and-Forget Agent Invocation (TypeScript)

SkillAI & models

Shows your coding agent how to trigger background tasks between Golem agents in TypeScript without waiting for results.

Use Fire-and-Forget Agent Invocation (TypeScript) in Claude, ChatGPT or Ahel Desktop

Free. Sign in, add Fire-and-Forget Agent Invocation (TypeScript) and connect your AI. About a minute.

Also: Claude Code · Cursor · Codex

Then ask your AI: use the Fire-and-Forget Agent Invocation (TypeScript) skill

Details

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Add Ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.

Fire-and-Forget Agent Invocation (TypeScript)Start free
About this skill

Triggering an agent invocation without waiting for the result in a TypeScript Golem project. Use when the user asks about fire-and-forget calls, async triggers, or enqueuing agent work.

What this skill tells your AI

The instructions your AI receives, as published by golemcloud/golem in golem-skills/skills/ts/golem-fire-and-forget-ts/SKILL.md and read by Ahel’s review.

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 a definition RPC client has a .trigger() variant. It takes the same input record as the awaited call but returns void immediately:

import { CounterAgent } from './counter-agent.js';

const counter = CounterAgent.client.get({ name: 'my-counter' });

// Fire-and-forget — returns immediately
counter.increment.trigger();          // input: {}

// With arguments
const processor = DataProcessor.client.get({ name: 'pipeline-1' });
processor.processBatch.trigger({ batch: batchData });

For an agent in another component, the generated guest client exposes the same .trigger() method, but its constructor uses flattened id parameters:

import { CounterAgent } from 'counter-agent-guest-client';

CounterAgent.get('my-counter').increment.trigger();

See the golem-call-another-agent-ts skill for the required golem.yaml and tsconfig.json setup. Use the definition's .client for same-component calls.

When to Use

  • Breaking RPC cycles: If agent A calls agent B and B needs to call back to A, use .trigger() for the callback to avoid deadlocks
  • Background work: Enqueue work on another agent without blocking the current agent
  • Fan-out: Trigger work on many agents in parallel without waiting for all results
  • Event-driven patterns: Notify other agents about events without coupling to their processing time

Example: Breaking a Deadlock

import { AgentA } from './agent-a.js';
import { AgentB } from './agent-b.js';

// In AgentA — calls AgentB and waits
const b = AgentB.client.get({ name: 'b1' });
const result = await b.doWork({ data }); // OK: awaited call

// In AgentB — notifies AgentA without waiting (would deadlock if awaited)
const a = AgentA.client.get({ name: 'a1' });
a.onWorkDone.trigger({ result }); // OK: fire-and-forget

CLI Equivalent

From the command line, use --trigger (or -t) to enqueue an invocation without waiting:

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

Signals

GitHub stars
2k
Forks
210
Last commit
Oct 2026
Advanced
Item type
skill
Key
golem-fire-and-forget-ts
Source
github.com/golemcloud/golem