Skip to main content

Agents

This page covers all commands related to agent management in the Nestbox AI CLI. Agents are at the core of the platform and represent deployable AI logic. This section includes commands for generating, creating, deploying, listing, removing agents, and monitoring their runtime events.

Generate Agent Structure

Scaffold a new agent directory structure with optional language and template parameters:

nestbox agent generate <folder> --lang=ts --template=basic

You can also specify the Node.js version and the project:

nestbox agent generate <folder> --lang=js --version=20 --project <project-id>

Create an Agent

Create a new agent on a specific compute instance:

nestbox agent create <agent-name> --parameters=name,string,default --instance <instance-id>

Use the --project flag to associate the agent with a specific project if needed.

List Agents

List all agents running on a given compute instance:

nestbox agent list --instance <instance-id>

To list agents in another project:

nestbox agent list --instance <instance-id> --project <project-id>

Deploy an Agent

Deploy an agent from your local directory to a running instance:

nestbox agent deploy <agent-id> --instance <instance-id>

The CLI will:

  • Find the project root
  • Run pre-deploy scripts defined in nestbox.config.json
  • Zip the directory (excluding node_modules)
  • Trigger the deployment

Remove an Agent

Remove an agent from an instance:

nestbox agent remove --instance <instance-id> <agent-id>

The CLI will prompt for confirmation before removing the agent.

Monitor Agent Events

Stream recent logs or events emitted by an agent:

nestbox agent events <agent-id>

To view only the latest N entries:

nestbox agent events <agent-id> --tail 100