Skip to main content

Overview

meshagent process is designed to grow one agent across multiple channels. The main command to learn is meshagent process join. Use meshagent process join for local development, and use that same command as the container command when you package a deployed multi-channel agent service. Each --channel flag adds another way to reach the same agent. The agent keeps one identity, one rules setup, and one shared tool configuration as you add those channels. This page walks through one example agent and grows it in stages:
  • start with chat
  • add mail
  • add a queue
  • deploy the same agent shape

Channel reference

Pass --channel once per entry point you want to attach:
  • --channel chat
  • --channel mail:news-agent@mail.meshagent.com
  • --channel queue:news-jobs
  • --channel toolkit:news-agent
ChannelWhat it is forWhat you need to test it
chatPeople talk to the agent directly from chat-style clientsa room and a chat client such as MeshAgent Studio
mail:EMAILEmail sent to that mailbox becomes work for the agenta mailbox configured for that address
queue:NAMEMessages sent to that room queue become work for the agentanother service, script, or user pushing queue messages
toolkit:NAMEOther agents or participants call the agent like a toolanother caller that invokes the toolkit
You can repeat --channel as many times as needed, including multiple queue channels.

Step 1: Start with one chat channel

Start with one chat-facing agent. This gives you a clean place to test the rules, the thread behavior, and built-in MeshAgent tools such as web search.
meshagent process join \
  --room quickstart \
  --agent-name news-agent \
  --channel chat \
  --threading-mode default-new \
  --thread-dir ".threads/news-agent" \
  --web-search \
  --rule "You are a news research agent. Use web search to find current reporting, summarize it clearly, and cite sources when possible."
This gives you one text agent that can answer in chat and use the MeshAgent web search tool. If you want the CLI itself to open an interactive chat session while testing, you can use meshagent process run with the same --channel chat setup.

Step 2: Add a mail channel

Next, add email as another entry point for the same agent. Before the agent can receive mail, create a mailbox:
meshagent mailbox create \
  --address news-agent@mail.meshagent.com \
  --room quickstart \
  --queue news-agent@mail.meshagent.com
Then start the agent with both chat and mail channels attached:
meshagent process join \
  --room quickstart \
  --agent-name news-agent \
  --channel chat \
  --channel mail:news-agent@mail.meshagent.com \
  --threading-mode default-new \
  --thread-dir ".threads/news-agent" \
  --web-search \
  --rule "You are a news research agent. Use web search to find current reporting, summarize it clearly, and cite sources when possible."
Now the same agent can:
  • answer in chat
  • receive email through the mailbox
  • keep using the same rules and tool configuration across both channels

Step 3: Add a queue channel

Now add a queue so the same agent can also handle scheduled or triggered news jobs in the background.
meshagent process join \
  --room quickstart \
  --agent-name news-agent \
  --channel chat \
  --channel mail:news-agent@mail.meshagent.com \
  --channel queue:news-jobs \
  --threading-mode default-new \
  --thread-dir ".threads/news-agent" \
  --web-search \
  --rule "You are a news research agent. Use web search to find current reporting, summarize it clearly, and cite sources when possible."
To test the queue channel, send a job into the room queue:
meshagent room queue send \
  --room quickstart \
  --queue news-jobs \
  --json '{"prompt": "Research the latest AI headlines and write a short digest."}'
At this point, one agent can:
  • answer in chat
  • receive mail
  • process queued news requests

Step 4: Deploy the same agent shape

The recommended deployment path is to package a service whose container command is the same meshagent process join ... command you used locally. That keeps local development and deployment aligned: the agent you test locally is the same agent shape you deploy. For a full packaging example, see Deploy a Multi-channel Agent.

Threads and context

Channels do not automatically collapse all work into one context. meshagent process still isolates work by thread_id. That means:
  • the running agent is shared
  • thread history is not shared unless inputs reuse the same thread path
If you attach a chat channel, --threading-mode and --thread-dir control the chat-oriented thread list behavior in the same way they do for a ChatBot. This is also what allows cross-channel continuity. A thread that starts from one channel can later be continued from another channel if they reference the same thread path.

Where to go next