Golem interactive repl go

From golemcloud/golem · View interactive version

Golem interactive repl go is an AI agent skill from the GitHub repository golemcloud/golem. Using the Golem REPL for interactive testing and scripting of agents. Use when asked to test agents interactively, run a REPL, or execute test scripts against deployed agents.

How to use this skill

Skill file

Golem Interactive REPL (Go)

The golem repl command starts an interactive REPL for testing and scripting agents. It supports both an interactive mode and a script execution mode.

There is no Go REPL language in Golem. Use the TypeScript REPL (the default) to interact with your Go agents — all agent types are available as TypeScript classes regardless of the agent's source language.

Interactive Mode

golem repl

Starts a TypeScript REPL with all agent client classes preconfigured in the global scope — including your Go agents. You can get or create agent instances, invoke methods, and see logs streamed during invocations, all with full type safety.

Example: Invoking a Go counter agent from the TypeScript REPL

A Go CounterAgent whose ID is struct{ Name string } is addressed by that name, and its increment / add / value methods are exposed as camelCase client methods:

const c1 = CounterAgent.upsert("c1")
await c1.increment()
await c1.add(5)
const value = await c1.value()

Built-in Commands

The REPL provides built-in commands that mirror CLI functionality. Commands accept both . and : prefixes:

This lets you build, deploy, and test agents without leaving the REPL.

Script Mode

Run a TypeScript file non-interactively:

golem repl --script-file test.ts --yes

The --yes flag auto-confirms any prompts. The script has the same global scope as the interactive REPL — all agent client classes are available, including Go agents.

Run the script after creating it, unless the user explicitly asked not to.

Example script (`test.ts`)

const c2 = CounterAgent.upsert("c2")
await c2.increment()
await c2.increment()

Run it:

golem repl --script-file test.ts --yes

Available REPL Languages

| Language | Flag | Interactive | Script | Notes |

|----------|------|-------------|--------|-------|

| TypeScript | (default) | ✅ | ✅ | Recommended — works with all agent languages |

No Go REPL is available. The TypeScript REPL is recommended for interacting with Go agents.

Prerequisites

Related Skills

| Skill | When to Load |

|-------|--------------|

| golem-invoke-agent-go | Invoke an agent method from the CLI (non-REPL) |

| golem-add-agent-go | Define the agent you're testing |

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.