Runtime reflection with Effect

SkillAI & models

Lets your agent discover available Golem agent types and call their methods dynamically at runtime.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Runtime reflection with Effect skill

About this capability

Discovers and invokes Golem agents through Effect-native runtime reflection. Use when agent types or methods are selected dynamically or their schemas must be inspected at runtime.

What this skill tells your AI

The instructions your AI receives, as published by golemcloud/golem in golem-skills/skills/effect/golem-agent-reflection-effect/SKILL.md and read by ahel’s review.

Import Reflection from @golemcloud/effect-golem. Reflection operations are Effects and their host requirements flow through the agent dispatcher; compose them in Effect.gen rather than running them as promises.

import { Effect } from "effect"
import { Reflection } from "@golemcloud/effect-golem"

const callEcho = Effect.gen(function* () {
  const types = yield* Reflection.getAllAgentTypes
  const target = yield* Reflection.getAgentType("ReflectionTarget")
  if (!target) return yield* Effect.fail("ReflectionTarget is not visible")

  const echo = target.method("echo")
  if (!echo) return yield* Effect.fail("echo is not registered")
  if (target.mode !== "durable") return yield* Effect.fail("ReflectionTarget is not durable")
  const client = yield* target.client.get({ name: "target" })
  const method = yield* client.method("echo")
  const result = yield* method.invoke({ message: "hello" })
  return { listed: types.some((type) => type.name === target.name), value: result.value }
}).pipe(Effect.scoped)

getAgentType and getAgentTypeByAgentId return undefined when the type is not visible. Agent identity strings are environment-scoped. Use constructorInput and method input/output SchemaRef values to validate, pack, unpack, or render JSON schemas. Normal reflected calls use JSON; use the *Value variants only for schema-native values. Durable factories expose get and phantom operations; ephemeral factories only allocate with newPhantom, which returns the client directly. Reflected invocation results include host metadata and a value except for unit-returning methods, which omit it.

Signals

GitHub stars
2k
Forks
211
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
golem-agent-reflection-effect
Source
github.com/golemcloud/golem