golem-create-agent-instance-rust

Creates Golem agent instances with constructor parameters, environment variables, and configuration via the golem CLI.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers working with Golem need to pre-create agent instances with specific environment variables, configuration, or WASI config before any method invocation, rather than relying on implicit creation during the first invoke call.

Core Features & Use Cases

  • Explicit Agent Creation: Run golem agent new with an agent ID like ChatRoom("general") to instantiate an agent in an idle state without invoking any method.
  • Startup Configuration: Attach environment variables (--env), typed configuration entries (--config), and WASI config (--wasi-config) at creation time.
  • Auto-Deploy: Automatically builds and deploys the agent's component if it has not been deployed yet and the CLI runs from an application directory.
  • Use Case: Pre-create an OrderProcessor("us-east") agent with a database URL and retry configuration so it is fully configured before receiving its first invocation.

Quick Start

Ask the assistant to create a new Golem agent instance with a given agent ID and any required environment variables or configuration values.

Frequently Asked Questions about golem-create-agent-instance-rust

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

FAQPage Schema
How do I create a Golem agent instance without invoking a method?▼

Run `golem agent new` followed by the agent ID, such as `golem agent new 'MyAgent()'`. This initializes the agent with its constructor parameters in an idle state, ready to receive invocations later.

What is the difference between golem agent new and golem agent invoke?▼

golem agent new explicitly pre-creates an agent with environment variables or configuration before any call, while golem agent invoke calls a method and implicitly creates the agent on first invocation if it does not exist.

How do I pass environment variables when creating a Golem agent?▼

Use the repeatable `--env KEY=VALUE` flag, for example `golem agent new 'MyAgent("user-123")' --env API_KEY=sk-abc123`. You can also pass typed config with `--config` and WASI config with `--wasi-config`.

What syntax do Golem agent constructor parameters use?▼

Agent ID parameters use Rust syntax: snake_case field names, Some(value)/None for options, records like `MyRecord { field: 1 }`, enum variants, tuples, and Ok/Err results. Agents without parameters use empty parentheses.

Does golem agent new deploy the component automatically?▼

Yes. If the agent's component has not been deployed yet and the CLI is run from an application directory, golem agent new automatically builds and deploys the component before creating the agent.