golem-multi-instance-agent-ts

Create distinct TypeScript agent instances with phantom UUID identities.

Updated May 17, 2026
One-click install
npx skills add https://github.com/Rust-soham/golem-claw --skill golem-multi-instance-agent-ts-rust-soham
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golem-multi-instance-agent-ts
Source: https://github.com/Rust-soham/golem-claw/tree/main/packages/golem/.agents/skills/golem-multi-instance-agent-ts
Command: npx skills add https://github.com/Rust-soham/golem-claw --skill golem-multi-instance-agent-ts-rust-soham

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the challenge of needing many distinct agent instances that share the same constructor parameters while still keeping independent identities and state separation.

Core Features & Use Cases

  • Phantom Agent Identity (UUID-suffixed): Create multiple agent instances that differ only by a phantom UUID appended to the agent ID.
  • Deterministic vs Phantom Instance Creation: Use get for non-phantom idempotent reuse, newPhantom for fresh instances, and getPhantom to reconnect to a previously saved phantom UUID.
  • HTTP-Mounted Phantom Requests: Automatically create a new phantom instance per incoming HTTP request using decorator options.
  • WithConfig Variants: Generate corresponding phantom/non-phantom methods when @config fields exist to scope identities by both parameters and config.

Quick Start

In TypeScript, call CounterAgent.newPhantom(sharedParams) to create a brand new independent agent instance and then call CounterAgent.getPhantom(phantomUuid, sharedParams) later to reconnect to the same instance by its saved phantom ID.

Frequently Asked Questions about golem-multi-instance-agent-ts

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

FAQPage Schema
How do I create multiple stateful agent instances in TypeScript that share constructor parameters?

You create multiple stateful TypeScript agent instances by using phantom UUIDs to spawn agents that share constructor parameters but maintain independent identities and separated state for multi-session workflows.

How do I reconnect to a previously persisted agent instance across time?

To reconnect to a previously persisted agent instance, call the getPhantom method with the saved phantom UUID and the original shared parameters to restore that specific independent agent identity.

Can I automatically create a fresh agent instance for each incoming HTTP request?

Yes, you can automatically create a fresh phantom agent instance for each incoming HTTP request by using optional HTTP-mounted phantom behavior and decorator options to handle parallel requests independently.

What is the difference between deterministic get and newPhantom methods for agent instances?

The get method provides non-phantom idempotent reuse of an agent instance, whereas newPhantom creates a completely fresh instance with a unique phantom UUID to ensure strict identity and state separation.

How do I scope agent identities by both constructor parameters and config fields?

You scope agent identities by both constructor parameters and config fields by using WithConfig variants, which generate corresponding phantom and non-phantom methods when @config fields exist in the agent definition.

When do I need phantom agent instances for parallel request handling?

You need phantom agent instances for parallel request handling when multiple distinct sessions require shared constructor logic but must remain identity-separated by UUIDs to prevent state collision across concurrent operations.