Invoking an Effect Golem Agent with golem agent invoke

SkillCloud & infra

Lets your agent call methods on a deployed Golem agent from the command line and see the results.

Use Invoking an Effect Golem Agent with golem agent invoke in Claude, ChatGPT or Ahel Desktop

Free. Sign in, add Invoking an Effect Golem Agent with golem agent invoke and connect your AI. About a minute.

Also: Claude Code · Cursor · Codex

Then ask your AI: use the Invoking an Effect Golem Agent with golem agent invoke 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.

Invoking an Effect Golem Agent with golem agent invokeStart free
About this skill

Invoking an Effect-based Golem agent method from the CLI. Use when asked to call, invoke, or run a method on a deployed Effect agent using golem agent invoke.

What this skill tells your AI

The instructions your AI receives, as published by golemcloud/golem in golem-skills/skills/effect/golem-invoke-agent-effect/SKILL.md and read by ahel’s review.

Both golem and golem-cli can be used — all commands below work with either binary. Effect agents use the ordinary Golem CLI; the guest-side typed Agent.client API is for calls from another agent, not shell invocation.

Usage

golem agent invoke <AGENT_ID> <FUNCTION_NAME> [ARGUMENTS...]

This invokes a method on a deployed agent and waits for the result. The agent is automatically created on first invocation if it does not exist yet. Standard output, error, and log streams from the agent are streamed live to the terminal by default.

For an Effect agent definition:

  • The agent type name is exactly the name passed to defineAgent.
  • Constructor arguments follow the declaration order in id.
  • The function name is exactly the key declared in methods, including its TypeScript casing.
  • Method arguments follow the declaration order in that method's input.

Do not translate names to kebab-case or snake_case. For example, a defineAgent named Counter with a methods key named incrementBy is invoked as:

golem agent invoke 'Counter("c1")' incrementBy 5

Output

Effect components report TypeScript as their source language, so text output renders return values using TypeScript syntax. Multiple return values are rendered as a TypeScript tuple, for example [1, "ok"]. Methods returning void or no value print void in text mode.

For machine-readable output, use --format json, --format yaml, or --format toon. Streaming methods emit invocation lifecycle documents in order: accepted, result, any stream item/terminal events, and finished. Scalar fields accompanying streams are in the result event's value.

In structured CLI formats, invocation output is a sequence of lifecycle documents rather than one object or array. Streaming invocation is durable: disconnecting or pressing Ctrl-C detaches the current transport without cancelling the invocation. The CLI does not retry automatically. Use --save-session <PATH> on the initial invocation, then --resume-session <PATH> after a detach or --takeover-session <PATH> to fence an attached transport explicitly.

Agent ID Format

The agent ID identifies the agent type and its agent id fields:

AgentTypeName(param1, param2, ...)

The agent ID can optionally be prefixed with environment or application paths:

FormatDescription
AgentTypeName(params)Standalone agent name
env/AgentTypeName(params)Environment-specific
app/env/AgentTypeName(params)Application and environment-specific
account/app/env/AgentTypeName(params)Account, application, and environment-specific

For agents with no agent id fields, use empty parentheses: AgentTypeName().

Examples

Invoke a method with no parameters

golem agent invoke 'MyAgent()' getStatus

Invoke a method with parameters

golem agent invoke 'MyAgent("user-123")' processOrder '"order-456"' 42

Invoke an Effect agent with agent id fields

golem agent invoke 'ChatRoom("general")' sendMessage '"Hello, world!"'

Invoke in a specific environment

golem agent invoke 'staging/MyAgent("user-123")' getStatus

Available Options

OptionDescription
-t, --triggerOnly trigger the invocation without waiting for the result (fire-and-forget)
-i, --idempotency-key <KEY>Set a specific idempotency key; use "-" for auto-generated
--no-streamDisable live streaming of agent stdout/stderr/log
--schedule-at <DATETIME>Schedule the invocation at a specific time (requires --trigger; ISO 8601 format)

Idempotency

Every invocation uses an idempotency key. If not provided, one is generated automatically. The same idempotency key guarantees that the invocation is executed at most once, even if the CLI call is retried.

golem agent invoke -i my-unique-key 'MyAgent()' doWork

Auto-Deploy

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

Value Syntax

Effect agent IDs, method arguments, and text results use TypeScript syntax:

  • Field names use camelCase
  • Options: raw value or undefined
  • Records: { fieldOne: 1, fieldTwo: "hello" }
  • Enums: "variant-name"
  • Variants: { tag: "variant-name", value: 42 }
  • Tuples: [1, "hello"]
  • Results: { ok: value } / { error: value }

Quote structured values as one shell argument, and quote string literals twice: once as a shell argument and once as a TypeScript string literal.

golem agent invoke 'MyAgent("user-123")' updateProfile '{ displayName: "Alice", age: 30 }'

Signals

GitHub stars
2k
Forks
209
Last commit
Oct 2026
Advanced
Item type
skill
Key
golem-invoke-agent-effect
Source
github.com/golemcloud/golem