golem-interactive-repl-moonbit

Tests MoonBit agents interactively through the Golem TypeScript REPL.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Testing deployed Golem agents written in MoonBit requires repeatedly invoking agent methods and inspecting results, which is slow with manual CLI calls. This Skill explains how to use the Golem REPL to interactively test and script MoonBit agents through the TypeScript REPL.

Core Features & Use Cases

  • Interactive Testing: Start a TypeScript REPL with all agent client classes preconfigured, including MoonBit agents, and invoke methods with full type safety.
  • Script Execution Mode: Run TypeScript test scripts non-interactively against deployed agents using golem repl --script-file.
  • Built-in Commands: Build and deploy components without leaving the REPL using commands like .build and .deploy.
  • Use Case: You have deployed a MoonBit counter agent and want to verify its behavior. Start the REPL, get the agent instance with CounterAgent.get("c1"), call increment() twice, and confirm getValue() returns the expected result.

Quick Start

Ask the AI to start the Golem REPL and interactively test your deployed MoonBit agent by invoking its methods and checking the returned values.

Frequently Asked Questions about golem-interactive-repl-moonbit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test MoonBit agents interactively in Golem?

Run `golem repl` to start the TypeScript REPL, which preconfigures all agent client classes in the global scope, including MoonBit agents. Get an agent instance with its class's `get` method and invoke its methods directly with full type safety.

Is there a MoonBit REPL language in Golem?

No, Golem does not provide a MoonBit REPL language. The TypeScript REPL is the only REPL available, and it works with agents written in any language, including MoonBit, since all agent types appear as TypeScript classes.

How do I run a test script against deployed Golem agents?

Use script mode with `golem repl --script-file test.ts --yes` to execute a TypeScript file non-interactively. The script shares the same global scope as the interactive REPL, so all agent client classes are available, and `--yes` auto-confirms prompts.

What prerequisites does the Golem REPL need?

The Golem server must be running via `golem server run`, and your components must be deployed with `golem deploy`. Without a running server and deployed components, agent invocations in the REPL will not work.

Can I build and deploy agents without leaving the Golem REPL?

Yes, the REPL provides built-in commands that mirror CLI functionality. Use `.build` or `:build` to build the project and `.deploy` or `:deploy` to deploy components, letting you iterate on agents within a single session.