cortex service

Manage Cortex micro-services — persistent agent-powered services that run on specific ports with health checks and automatic restart capabilities.

Usage

cortex service <subcommand> [options]

Subcommands

SubcommandDescription
listList all services
showShow service details and runtime status
createCreate a new micro-service
updateUpdate an existing service
deleteDelete a service
startStart a service
stopStop a running service

Create Options

OptionDescription
--description, -dService description
--agent, -aAgent to use for this service
--port, -pPort to listen on
--model, -mLLM model
--providerLLM provider
--toolsComma-separated tool list
--auto-startAuto-start service on Cortex startup
--max-restartsMaximum restart attempts before giving up
--health-intervalHealth check interval in seconds
--system-promptCustom system prompt

Update Options

OptionDescription
--name, -nNew service name
--description, -dUpdated description
--agent, -aChange agent
--port, -pChange port
--model, -mChange model
--providerChange provider
--toolsUpdate tool list
--auto-startToggle auto-start
--max-restartsUpdate max restarts
--health-intervalUpdate health check interval
--system-promptUpdate system prompt

Examples

# Create a REST API service
cortex service create api-server -a code-reviewer -p 3001 --auto-start

# Create with custom model
cortex service create docs-bot -a writer --model gpt-4o -p 3002

# List all services
cortex service list

# Show service details
cortex service show api-server

# Start a service
cortex service start api-server

# Stop a service
cortex service stop api-server

# Update a service
cortex service update api-server --port 8080 --auto-start

# Delete a service
cortex service delete old-service