Agent Workflow
This workflow walks through the full lifecycle of deploying an agent using the Nestbox AI CLI. It includes environment setup, agent creation, deployment, execution, and cleanup.
Step 1: Project Setup
Start by creating a new working directory and initializing your CLI session.
mkdir my_project
cd my_project
nestbox login demo.nestbox.ai
nestbox project use sales
Step 2: Prepare Compute
List available compute instances or create a new one:
nestbox instance list
nestbox instance create groot
Step 3: Create Agent
Create a new agent with inputs and associate it with the instance:
nestbox agent create my-agent --input name,string,default
List agents to confirm:
nestbox agent list
Add a webhook to receive events:
nestbox agent webhook add "https://webhook.site/your-id" QUERY_COMPLETED
Step 4: Generate and Deploy Agent
Generate the agent project locally:
nestbox agent generate agents --lang=ts
cd agents
Deploy the agent to the compute instance:
nestbox agent deploy my-agent-id
Step 5: Run and Monitor
Invoke the agent with test input:
nestbox agent run name Roy
Tail the logs:
nestbox agent logs my-agent --tail 100
Step 6: Cleanup
Remove the agent and logout:
nestbox agent remove my-agent-id
nestbox logout demo.nestbox.ai