golem-call-from-external-rust

Generate typed Rust client SDKs for calling Golem agents from external applications.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Calling Golem agents from outside the Golem platform normally requires hand-writing REST API calls against the Golem server. This Skill generates fully typed Rust bridge SDKs so external Rust applications—CLIs, web servers, background jobs—can invoke agents with compile-time type safety.

Core Features & Use Cases

  • Manifest-Driven Bridge Generation: Declare a bridge section in golem.yaml and let golem build produce a Rust client crate per agent type automatically.
  • Typed Agent Invocation: Generated clients expose typed methods matching agent definitions, including custom records, variants, enums, and flags.
  • Flexible Server Configuration: Connect to a local Golem server, Golem Cloud with an API token, or a custom deployment URL.
  • Phantom Agents and Configuration: Create multiple instances with shared constructor parameters via phantom agents, and pass local config with _with_config variants.
  • Use Case: You have a Golem agent handling billing logic and want a native Rust CLI to trigger it. Declare the bridge in golem.yaml, run golem build, add the generated crate as a path dependency, and call agent methods directly with async/await.

Quick Start

Add a bridge section for Rust external agents to golem.yaml, run golem build, then add the generated client crate as a path dependency and call the agent's typed methods from your Rust application.

Frequently Asked Questions about golem-call-from-external-rust

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

FAQPage Schema
How do I call Golem agents from an external Rust application?

Add a bridge section to golem.yaml specifying rust external agents, then run golem build to generate a typed client crate. Add that crate as a path dependency in your Cargo.toml and call the agent's typed methods using async/await.

How do I generate a Rust bridge SDK for Golem agents?

Declare the bridge in golem.yaml with agents set to "*" or a list of agent names, plus an optional outputDir. Running golem build produces one Rust crate per agent type in the configured directory, kept in sync on rebuilds.

Can I connect the generated Rust client to Golem Cloud?

Yes, the GolemServer enum supports three modes: Local for the development server, Cloud with an API token, and Custom with a deployment URL and token. Pass the chosen mode to the generated configure function.

What are phantom agents in Golem Rust clients?

Phantom agents let you create multiple agent instances sharing the same constructor parameters. Use get_phantom with a UUID and shared name, or new_phantom to generate a random phantom ID automatically.

Should I run golem generate-bridge manually?

No, the manifest-driven flow is the supported approach. Declare the bridge in golem.yaml and let golem build generate the SDK; golem generate-bridge exists only as a low-level escape hatch.