Agent Commands
All agent commands are under theopenfang agent namespace.
Creating Agents
openfang agent new
Spawn an agent from a built-in template.
Behavior:
- Templates are discovered from:
- Repository
agents/directory (dev builds) ~/.openfang/agents/(installed)OPENFANG_AGENTS_DIR(environment override)
- Repository
- Each template is a directory containing an
agent.tomlmanifest - In daemon mode: sends
POST /api/agentswith the manifest (agent is persistent) - In standalone mode: boots an in-process kernel (agent is ephemeral)
Agents spawned in daemon mode persist across restarts. Agents spawned in standalone mode are ephemeral.
openfang agent spawn
Spawn an agent from a custom manifest file.
Behavior:
- Reads and parses the TOML manifest file
- In daemon mode: sends the raw TOML to
POST /api/agents - In standalone mode: boots an in-process kernel and spawns the agent locally
Listing Agents
openfang agent list
List all running agents.
Example Output (Daemon Mode):
JSON Output
Interactive Chat
openfang agent chat
Start an interactive chat session with a specific agent.
Behavior:
- Opens a REPL-style chat loop
- Type messages at the
you>prompt - Agent responses display at the
agent>prompt - Shows token usage and iteration count after each response
- Type
exit,quit, or pressCtrl+Cto end the session
@lru_cache decorator automatically caches results.
[tokens: 189 | iterations: 1]
you> exit
Session ended.
One-Shot Messages
openfang message
Send a single message to an agent without entering interactive mode.
Options:
Example:
Agent Lifecycle Management
openfang agent kill
Terminate a running agent.
Example:
openfang agent set
Modify agent properties (currently supports model changes).
Example:
Session Management
openfang sessions
List conversation sessions for agents.
Options:
Example:
Agent Templates
OpenFang includes several built-in agent templates:Built-in Templates
Custom Templates
Create custom agent templates in~/.openfang/agents/:
Advanced Usage
Batch Agent Creation
Agent Health Monitoring
Clean Up Stale Agents
Next Steps
Workflow Commands
Orchestrate multi-step agent workflows
Skill Commands
Install and manage agent skills