Overview
This guide covers common CLI workflows for day-to-day MeshAgent development. If you haven’t set up MeshAgent yet, start with the Getting Started Guide first. The MeshAgent CLI streamlines Room interactions and agent management right from your terminal. With the MeshAgent CLI you can easily:- Authenticate and activate projects
- Spin up live rooms and test your in progress agents and tools
- Deploy services to your project or room
- Inspect and manage existing projects, secrets, agents, and services
Before you begin
- Set up MeshAgent: If you haven’t installed MeshAgent yet, follow our Getting Started guide. This will walk you through how to set up your MeshAgent account, create your first project, install MeshAgent, and connect to your first room with your first agent.
-
Install the MeshAgent CLI: You can install the CLI globally on your system or in a virtual environment.
To install the CLI globally:
To install the CLI in a virtual environment: Ensure you are in the appropriate project folder and have activated your virtual environment. (The virtual environment is active when the terminal prompt starts with
venv.) If you need help with your machine setup check out our Machine Setup Guide for Python. Then you can install all the MeshAgent packages, or exclusively the MeshAgent CLI. -
Authenticate: Once the CLI is installed, authenticate and activate a project.
Optional: Alternatively, instead of running the
meshagent setupcommand you can run:You are now authenticated and ready to use the CLI!
Common Workflows
Test Agents Locally
Before deploying, test your agent locally in a room:Using CLI agents (no code required)
The MeshAgent CLI provides prebuilt ChatBot and VoiceBot agents you can test instantly:testroom, and start chatting with your agents.
Tip: Use--helpto see all available tools and options:meshagent chatbot join --help. The CLI ChatBot has built in tools you can turn on and off for things like image generation, web search, local shell, and mcp.
Note:chatbot join/voicebot joinare designed for local/dev usage. In containers or deployments, preferchatbot service/voicebot service.
Run your own MeshAgent service locally
Expose your agent/tool viaServiceHost (local webhook server). A request from MeshAgent spins up your agent, connects it to the Room, and manages lifecycle for the session.
bash
testroom, and start chatting with your agent. You can iterate on the code and restart the service to test your changes.
The agent will only exist for the current session unless deployed.
Package and Deploy Services
Once your agent works locally, you’ll need to package and deploy it as a project or room service. Once you’ve packaged the agent you can deploy it from the CLI to a project or room.bash
Manage Projects and Rooms
Switch projects:Work with Secrets
Secrets allow you to store credentials securely for agents and services to use: When deploying a custom agent, you will need to build and push a docker image. For an example of this, checkout the Deploying a ChatBot as a Project Service guide where you’ll learn how to build and deploy a chat agent as a project wide service. If your docker image is not public, then you will need to configure a secret so that the image can be pulled.Logout
Rooms will spin down automatically after you leave and they are inactive. If you wish to logout you can run:Frequently used commands
Note you will need to fill in the appropriate parameters for these commands| Command | What it does |
|---|---|
meshagent setup | Authenticate to MeshAgent and activate a project |
meshagent agents list-agents | List agents currently connected to a specific room |
meshagent chatbot join --room=myroom --agent-name=chatbot | Join a room with the built-in chatbot |
meshagent voicebot join --room=myroom --agent-name=voicebot | Join a room with the built-in voicebot |
meshagent service run "main.py" --room=myroom | Test a service locally |
meshagent service create --file=meshagent.yaml | Deploy an agent as a managed service |
meshagent service list | View deployed project services |
Next Steps
- Build a Chat Agent: Tutorial on creating a custom chatbot
- Introduction to Services: Understand project and room services and how to run ad-hoc code in a Room through the Containers API
- Packaging Services: Learn about meshagent.yaml configuration
- Deploying Services: Learn how to deploy project and room services
- CLI Commands Reference: Complete CLI command documentation
- Secrets Management: Working with credentials and OAuth