Octavus CLI
The @octavus/cli package provides a command-line interface for validating and syncing agent definitions from your local filesystem to the Octavus platform.
Current version: 0.2.0
Installation
Configuration
The CLI requires an API key with agent management permissions.
Environment Variables
| Variable | Description |
|---|---|
OCTAVUS_CLI_API_KEY | API key with agent management permissions (recommended) |
OCTAVUS_API_KEY | Fallback if OCTAVUS_CLI_API_KEY not set |
OCTAVUS_API_URL | Optional, defaults to https://octavus.ai |
Two-Key Strategy (Recommended)
For production deployments, use separate API keys:
This ensures production servers only have session permissions (smaller blast radius if leaked), while agent management is restricted to development/CI environments.
Multiple Environments
Use separate Octavus projects for staging and production, each with their own API keys. The --env flag lets you load different environment files:
Example environment files:
Each project has its own agents, so you'll get different agent IDs per environment.
Global Options
| Option | Description |
|---|---|
--env <file> | Load environment from a specific file (default: .env) |
--help | Show help |
--version | Show version |
Commands
octavus sync <path>
Sync an agent definition to the platform. Creates the agent if it doesn't exist, or updates it if it does.
Options:
--json— Output as JSON (for CI/CD parsing)--quiet— Suppress non-essential output
Example output:
octavus validate <path>
Validate an agent definition without saving. Useful for CI/CD pipelines.
Exit codes:
0— Validation passed1— Validation errors2— Configuration errors (missing API key, etc.)
octavus list
List all agents in your project.
Example output:
octavus get <slug>
Get details about a specific agent by its slug.
Agent Directory Structure
The CLI expects agent definitions in a specific directory structure:
settings.json
protocol.yaml
See the Protocol documentation for details on protocol syntax.
CI/CD Integration
GitHub Actions
Package.json Scripts
Add sync scripts to your package.json:
Workflow
The recommended workflow for managing agents:
- Define agent locally — Create
settings.json,protocol.yaml, and prompts - Validate — Run
octavus validate ./my-agentto check for errors - Sync — Run
octavus sync ./my-agentto push to platform - Store agent ID — Save the output ID in an environment variable
- Use in app — Read the ID from env and pass to
client.agentSessions.create()