golem-annotate-agent-scala

Adds prompt and description annotations to Scala agent methods for LLM tool discovery.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Golem agents written in Scala need metadata so LLM-based systems can discover and invoke their methods as tools. Without annotations, agent methods are invisible to AI tool-calling workflows, forcing developers to manually document method behavior elsewhere.

Core Features & Use Cases

  • @prompt Annotation: Attaches a short natural-language instruction telling an LLM when to call a specific agent method.
  • @description Annotation: Documents what a method does, its parameters, return values, and edge cases for accurate LLM tool selection.
  • Use Case: You have a Scala inventory agent with methods like checkStock and restock. Adding @prompt and @description annotations lets an LLM-based assistant automatically match user requests like "how many units of SKU-123 are in stock?" to the correct agent method.

Quick Start

Add @prompt and @description annotations to my Scala Golem agent methods so they can be discovered as tools by LLM systems.

Frequently Asked Questions about golem-annotate-agent-scala

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

FAQPage Schema
How do I add prompt and description annotations to Scala agent methods?

Import prompt and description from golem.runtime.annotations, then place @prompt and @description directly above each method in your agent trait. The @prompt tells an LLM when to call the method, while @description explains its behavior and parameters.

What is the difference between @prompt and @description in Golem agents?

@prompt is a short natural-language instruction telling an LLM when to invoke the method, matched against user requests. @description is a longer explanation of what the method does, including parameters, return values, and edge cases.

Do Golem agent annotations affect runtime behavior?

No, @prompt and @description are purely metadata and have no effect on runtime behavior. They exist only to support AI and LLM tool discovery, so annotated and unannotated methods execute identically.

Should every Scala agent method have annotations?

No, both annotations are optional and should be omitted for internal methods not intended for LLM discovery. Annotate only the methods you want external AI systems to find and invoke as tools.

Can annotated Golem agents be used as LLM tools?

Yes, agents with annotated methods can be used as tools by LLM-based systems. The annotations provide the discovery metadata an LLM needs to match user requests to the appropriate agent method.