- Agents API
AgentsClient: Manages agent interactions. - Containers API
ContainersClient: Interact with containers on demand in a room. - Database API
DatabaseClient: Provides a simple relational-like API for data storage and retrieval through tables. - Messaging API
MessagingClient: Enables real-time chat messaging among participants. - Queues API
QueuesClient: Facilitates reliable data/message exchange with other agents or participants. - Secrets API
SecretsClient: Create and manage oauth tokens and user secrets. - Storage API
StorageClient: Manages file storage and retrieval. - Sync API
SyncClient: Offers document synchronization capabilities, listing remote participants, allowing participants to collaborate on shared documents.
Let’s connect to a room
First, be sure to have followed the Getting Started with MeshAgent Docs. Next, in your terminal authenticate to MeshAgent and export the environment variables needed to connect to your MeshAgent project. You can do this using the MeshAgent CLI.Room Class Overview
Rooms expose the same capabilities in every SDK, but the exact API mirrors the host language. Use the section below that matches your client library.Python
from meshagent.api import RoomClient
- Connect with
async with RoomClient(protocol=...) as room:; the async context manager starts and stops the connection for you. - Issue requests with
await room.send_request(...); session metadata is available viaroom.session_id,room.room_url, androom.room_name. - Register event handlers with
room.on("room.status", handler); useroom.emit(...)to publish custom events. - Access sub-clients through snake_case attributes such as
room.agents,room.database,room.messaging,room.sync,room.containers,room.queues,room.secrets,room.storage,room.developer, androom.livekit.
TypeScript / JavaScript
RoomClient in @meshagent/...
- Instantiate the client with
{ protocol }and callawait room.start({ onDone, onError })to wait forroom_ready. - Clean up with
room.dispose()when you are finished. - Send RPCs with
await room.sendRequest(type, payload, data?); readiness is exposed viaawait room.ready. - Emit events with
room.emit(event)and consume them usingfor await (const evt of room.listen()). - Sub-clients are camelCase properties:
room.agents,room.database,room.messaging,room.sync,room.containers,room.queues, androom.storage.
Dart / Flutter
RoomClient in package:meshagent/room_server_client.dart
- Call
await room.start(onDone: ..., onError: ...)after constructing the client;room.readycompletes when the server sendsroom_ready. - Dispose resources with
room.dispose(); useawait room.exec(...)for container execution helpers. - Send requests with
await room.sendRequest(type, payload, data: ...). - Observe room activity with
room.events.listen(handler)or by keeping theStreamSubscriptionreturned fromroom.listen(...). - Access sub-clients via camelCase getters:
room.agents,room.database,room.messaging,room.sync,room.containers,room.queues,room.secrets,room.storage,room.developer, androom.livekit.
.NET
Meshagent.RoomClient
- Construct
var room = new RoomClient(protocol);and callawait room.ConnectAsync();to wait for readiness. - Dispose with
await room.DisposeAsync();orawait using var room = new RoomClient(protocol);. - Send RPCs using
await room.SendRequest(type, payload, data);; session metadata is available viaroom.SessionId,room.RoomUrl, androom.RoomName. - Register handlers with
room.On("room.status", handler)and raise custom events throughroom.Emit(name, data). - Sub-clients are exposed as PascalCase properties:
room.Agents,room.Database,room.Messaging,room.Sync,room.Containers,room.Queues,room.Storage,room.Developer, androom.Livekit.