Agent Commands
Manage the lifecycle of OpenFang agents: spawn from templates or custom manifests, list running agents, chat interactively, and terminate agents.openfang agent new
Spawn an agent from a built-in template.Arguments
| Argument | Description |
|---|---|
<TEMPLATE> | Template name (e.g., coder, assistant, researcher). If omitted, displays an interactive picker. |
Behavior
- Templates are discovered from:
- The repo
agents/directory (dev builds) ~/.openfang/agents/(installed)OPENFANG_AGENTS_DIR(env override)
- The repo
- Each template is a directory containing an
agent.tomlmanifest - Daemon mode: Sends
POST /api/agentswith the manifest. Agent is persistent. - Standalone mode: Boots an in-process kernel. Agent is ephemeral.
Examples
Output
openfang agent spawn
Spawn an agent from a custom manifest file.Arguments
| Argument | Description |
|---|---|
<MANIFEST> | Path to an agent manifest TOML file. |
Behavior
- Reads and parses the TOML manifest file
- Daemon mode: Sends the raw TOML to
POST /api/agents - Standalone mode: Boots an in-process kernel and spawns the agent locally
Example Manifest
Create a filemy-agent.toml:
my-agent.toml
Examples
openfang agent list
List all running agents.Options
| Option | Description |
|---|---|
--json | Output as JSON array for scripting. |
Output
Daemon mode (with provider/model info):Examples
openfang agent chat
Start an interactive chat session with a specific agent.Arguments
| Argument | Description |
|---|---|
<AGENT_ID> | Agent UUID. Obtain from openfang agent list. |
Behavior
- Opens a REPL-style chat loop
- Type messages at the
you>prompt - Agent responses display at the
agent>prompt, followed by token usage and iteration count - Type
exit,quit, or pressCtrl+Cto end the session
Example Session
openfang agent kill
Terminate a running agent.Arguments
| Argument | Description |
|---|---|
<AGENT_ID> | Agent UUID to terminate. |
Example
openfang chat (Quick Chat Alias)
Quick alias for starting a chat session. Works with or without a daemon.Arguments
| Argument | Description |
|---|---|
<AGENT> | Optional agent name or UUID. |
Behavior
- Daemon mode: Finds the agent by name or ID among running agents. If no agent name is given, uses the first available agent. If no agents exist, suggests
openfang agent new. - Standalone mode (no daemon): Boots an in-process kernel and auto-spawns an agent from templates. Searches for an agent matching the given name, then falls back to
assistant, then to the first available template.
Examples
openfang agent set
Set an agent property (e.g., model).Arguments
| Argument | Description |
|---|---|
<AGENT_ID> | Agent UUID. |
<FIELD> | Field to set (currently supports model). |
<VALUE> | New value. |
Examples
Complete Workflow Example
Quick Chat Workflow
Next Steps
Workflow Commands
Chain multiple agents together
Skill Commands
Extend agents with new capabilities
Config Commands
Configure default models and providers
CLI Overview
Back to CLI overview
