Creating a Golem Agent Instance with golem agent new
SkillAI & modelsCreates a new Scala Golem agent instance via the command line so it exists and waits for calls.
Use Creating a Golem Agent Instance with golem agent new in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add Creating a Golem Agent Instance with golem agent new and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the Creating a Golem Agent Instance with golem agent new skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; Ahel provides instructions and does not run this skill.
No other account needed.
Add Ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
About this skill
Creating a new Scala Golem agent instance with golem agent new. Use when asked to create, instantiate, or pre-create an agent without invoking a method.
What this skill tells your AI
The instructions your AI receives, as published by golemcloud/golem in golem-skills/skills/scala/golem-create-agent-instance-scala/SKILL.md and read by Ahel’s review.
Both golem and golem-cli can be used — all commands below work with either binary.
Usage
golem agent new <AGENT_ID> [OPTIONS]
This creates a new agent instance without invoking any method on it. The agent is initialized with its constructor parameters and starts in an idle state, ready to receive invocations. If the agent's component has not been deployed yet and the CLI is run from an application directory, it will automatically build and deploy the component first.
Unlike golem agent invoke, which implicitly creates the agent on first call, golem agent new explicitly pre-creates the agent — useful when you need to set environment variables or configuration at creation time.
Agent ID Format
The agent ID identifies the agent type and its constructor parameters:
AgentTypeName(param1, param2, ...)
The agent ID can optionally be prefixed with environment or application paths:
| Format | Description |
|---|---|
AgentTypeName(params) | Standalone agent name |
env/AgentTypeName(params) | Environment-specific |
app/env/AgentTypeName(params) | Application and environment-specific |
account/app/env/AgentTypeName(params) | Account, application, and environment-specific |
For agents with no constructor parameters, use empty parentheses: AgentTypeName().
Examples
Create an agent with no constructor parameters
golem agent new 'MyAgent()'
Create an agent with constructor parameters
golem agent new 'ChatRoom("general")'
Create an agent with environment variables
golem agent new 'MyAgent("user-123")' --env API_KEY=sk-abc123 --env LOG_LEVEL=debug
Create an agent with configuration
golem agent new 'MyAgent()' --config maxRetries=5 --config timeoutSeconds=30
Create an agent in a specific environment
golem agent new 'staging/MyAgent("user-123")'
Combine environment variables and configuration
golem agent new 'OrderProcessor("us-east")' \
--env DATABASE_URL=postgres://... \
--config batchSize=100 \
--config retryPolicy.maxAttempts=3
Available Options
| Option | Description |
|---|---|
-e, --env <ENV=VAL> | Environment variables visible to the agent (can be repeated) |
-c, --config <PATH=VALUE> | Configuration entries for the agent, using dot-separated paths (can be repeated). Only configuration declared by the agent can be provided. If not provided, the default from the manifest (agents.*.config) is used. |
Auto-Deploy
If the agent's component has not been deployed yet and the CLI is run from an application directory, golem agent new will automatically build and deploy the component before creating the agent.
Value Syntax
The agent ID parameters use Scala syntax:
- Field names use
camelCasewith=separator - Options:
Some(value)/None - Records:
MyRecord(fieldOne = 1, fieldTwo = "hello") - Enums/Variants:
MyEnum.VariantNameorMyEnum.VariantName(value) - Tuples:
(1, "hello")orTuple1(value)for single-element - Results:
WitResult.Ok(value)/WitResult.Err(value)
golem agent new 'UserManager(MyConfig(region = "us-east", maxConnections = Some(10)))'
When to Use golem agent new vs golem agent invoke
- Use
golem agent newwhen you need to pre-create an agent with specific environment variables or configuration before any invocation. - Use
golem agent invokewhen you want to call a method — the agent is created automatically on first invocation if it doesn't exist. - An agent created with
golem agent newcan be invoked later withgolem agent invokeusing the same agent ID.
Signals
- GitHub stars
- 2k
- Forks
- 210
- Last commit
- Oct 2026
Advanced
- Item type
- skill
- Key
golem-create-agent-instance-scala- Source
- github.com/golemcloud/golem
More in AI & models
Skill · anthropics
More in AI & modelstriage
Skill · mattpocock
More in AI & modelswayfinder
Skill · mattpocock
More in AI & modelsalgorithmic-art
Skill · anthropics
More in AI & modelscode-review-and-quality
Skill · addyosmani
More in AI & modelsmarketing-psychology
Skill · coreyhaines31
More in AI & models