golem-call-from-external-scala

Generate typed Scala bridge SDKs for calling Golem agents from external JVM applications.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

External JVM applications need a typed, compile-safe way to invoke Golem agents without hand-writing REST calls, and this Skill generates the Scala bridge SDK and client code that makes those calls.

Core Features & Use Cases

  • External Bridge Generation: Configure bridge.scala.external in golem.yaml or run golem generate-bridge --language scala to produce a self-contained sbt client project for any agent type.
  • Internal Component Clients: Generate Scala.js internal clients (<agent>-guest-client/) so one Golem component can call other agents or tools from Scala code.
  • Authentication Modes: Connect via GolemServer.Local, GolemServer.Cloud(token), or GolemServer.Custom(url, token) depending on the deployment target.
  • Use Case: A backend Scala service needs to increment a counter agent deployed on Golem Cloud; generate the bridge, depend on it from sbt, and call CounterAgentClient.get("my-counter").increment() as a Future.

Quick Start

Generate a Scala bridge SDK for my Golem agent and show me how to call it from an external sbt application.

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

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

FAQPage Schema
How do I call a Golem agent from an external Scala application?

Generate a Scala bridge SDK with `golem generate-bridge --language scala --agent-type-name MyAgent`, add the generated sbt project as a dependency, then use the generated client object such as `CounterAgentClient.get(...)` to invoke agent methods as Futures.

How do I configure Scala bridge generation in golem.yaml?

Add a `bridge.scala.external` section with `agents: "*"` to generate external clients for all agents, or use `bridge.scala.internal` with specific agents and tools to generate Scala.js clients for component-to-component calls.

Can a Scala bridge call agents written in Rust or TypeScript?

Yes. The bridge target language is independent of the agent's source language, so a generated Scala bridge can call agents written in Rust, TypeScript, Scala, or MoonBit.

What is the difference between external and internal Scala bridge clients?

External clients are standalone sbt projects for JVM applications calling agents over REST. Internal clients are Scala.js libraries linked into a Golem component for agent-to-agent or tool calls, and they use SDK types like `golem.schema.SchemaValue` instead of the REST runtime types.

How do I authenticate a Scala bridge client with Golem Cloud?

Pass `GolemServer.Cloud(token)` with your API token to the client's `configure` method. Use `GolemServer.Local` for a local server or `GolemServer.Custom(url, token)` for a custom deployment.