Overview
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
- Deploy finished agents as MeshAgent services
- 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 throughhow to set up your MeshAgent account, create your first project, install MeshAgent, and connect to your first room with your first agent.
-
Install the CLI. Install the meshagent cli globally on your machine.
-
Optional. Using a virtual environment: Ensure you are in the appropriate project folder and have activated your virtual environment with MeshAgent installed. If you need help with your machine setup check out our Machine Setup Guide for Python.
The virtual environment is active when the terminal prompt start with
venv
.
CLI Fundamentals
The core MeshAgent workflow involves connecting to your MeshAgent project, calling in and deploying AI Agents.Authenticate
First, authenticate and activate a project. These commands will open a browser window for you to authenticate with your MeshAgent account.meshagent setup
command you can run:
Connect an agent to a Room
Connect a simple chat and voice agent without tools to a MeshAgent Room. This will give you a sense of how agents work and how to use them in the MeshAgent studio.Deploy an agent as a service
Deploying the agent as a service will make the agent avaialable in all the rooms inside of your project. This is useful when you are satisfied with the agent and want to make sure it is always available. Deploying the simple chatbot can be done with this command:Start an interactive terminal session inside a Room
There may be instances where you want to open an interactive terminal so that you can test things inside the MeshAgent server. For example, running python code or listing files inside a Room. You can do this by runningmeshagent tty connect
which creates a live shell inside the Room’s container over a secure WebSocket connection.
my-room
and allow you to run commands from your terminal that are executed inside the room. For example, running ls /data
will list any of the files that currently exist in the room, my-room
.
From the interactive terminal session you can also launch an agent with tracing enabled. Do this by running:
http://localhost:8081/agent
. This will add your agent to the participants list and you’ll be able to chat with it and see the logs, traces, and metrics from your chat.
Create MeshAgent Secrets
When deploying a custom agent, you will need to build and push a docker image. For an example of this, checkout the Build and Deploy a Chat Agent guide where you’ll learn how to build and deploy a custom chat agent with various tools. If your docker image is not public, then you will need to configure a secret so that the image can be pulled.Environment Helpers
Export Credentials
If you want to connect to a room directly without calling in an agent you will need to export your MeshAgent credentials to your environment. This is necessary if you are not using themeshagent setup
command.
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 commandsCommand | What it does |
---|---|
meshagent setup | One-shot login + project + API key wizard |
meshagent env | Print shell commands to export/unset credentials |
meshagent agents list-agents | List agents currently connected to a specific room |
meshagent chatbot join | Join a room with the built-in chatbot |
meshagent voicebot join | Join a room with the built-in voicebot |
meshagent call | Call an agent you are working on into a room |
meshagent service create | Deploy an agent as a managed service |
meshagent service list | View running services |
meshagent auth logout | Remove local credentials |