CLI — Deploy

The rivano init and rivano deploy commands let you define agents as code and deploy them declaratively from a rivano.yaml file — the same file used to configure the gateway.

Initialize a project

Run rivano init in the root of your project to create a starter rivano.yaml:

rivano init
# ✔ Created rivano.yaml

Generated file:

# rivano.yaml

agents:
  - name: my-agent
    description: Describe what this agent does
    modelProvider: openai
    modelName: gpt-4o
    environment: production

gateway:
  port: 8080
  providers:
    openai:
      apiKey: "${OPENAI_API_KEY}"
  middleware:
    pii: true
    injection: true
    audit: stdout
  cloud:
    apiKey: "${RIVANO_API_KEY}"
    baseUrl: "https://api.rivano.ai"

Edit the file to define your actual agents and provider configuration.

rivano.yaml — agents section

agents:
  - name: contract-summarizer
    description: Summarizes legal contracts for review teams
    modelProvider: openai
    modelName: gpt-4o
    environment: production

  - name: support-classifier
    description: Classifies support tickets by category and urgency
    modelProvider: anthropic
    modelName: claude-3-5-sonnet-20241022
    environment: production

  - name: code-reviewer
    description: Reviews pull request diffs for security issues
    modelProvider: openai
    modelName: gpt-4-turbo
    environment: staging

Agent fields

FieldRequiredDescription
nameYesUnique agent identifier within the tenant
descriptionNoHuman-readable description
modelProviderNoLLM provider: openai, anthropic, google, etc.
modelNameNoModel identifier
environmentNoproduction, staging, or development

Deploy

rivano deploy

Output:

Validating rivano.yaml...
✔ Schema valid
✔ 3 agents found

Deploying...
✔ contract-summarizer   → v4 (updated model: gpt-4o)
✔ support-classifier    → v2 (no changes, skipped)
✔ code-reviewer         → v1 (new)

3 agents processed. 2 deployed, 1 unchanged.

Dry run

Preview what would be deployed without making any changes:

rivano deploy --dry-run

Output:

Dry run — no changes will be made.

Validating rivano.yaml...
✔ Schema valid
✔ 3 agents found

What would change:
  contract-summarizer   UPDATED (model: gpt-4-turbo → gpt-4o)
  support-classifier    UNCHANGED
  code-reviewer         NEW

2 agents would be deployed.

Specify a config file

rivano deploy --file ./config/rivano.prod.yaml

CI/CD example

Deploy from a GitHub Actions workflow:

- name: Deploy Rivano agents
  run: rivano deploy --no-color
  env:
    RIVANO_API_KEY: ${{ secrets.RIVANO_API_KEY }}
💡

Run rivano deploy --dry-run in pull request checks and rivano deploy on merge to main. This gives you a preview of agent changes before they go to production.

Validation

rivano deploy validates rivano.yaml before deploying. Validation checks:

  • YAML syntax is valid
  • All required name fields are present
  • modelProvider values are recognized provider keys
  • No duplicate agent names

If validation fails, the deploy is aborted with an error message and a non-zero exit code.

rivano deploy
# ✗ Validation failed:
#   agents[1].name is required
# Aborted. No agents deployed.
echo $? # 1