Documentation Index
Fetch the complete documentation index at: https://docs.meshagent.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
meshagent build and meshagent deploy are the main CLI commands for working with OCI images in MeshAgent.
Use them when you want to:
- build an image inside a room from a local directory streamed as build context
- publish that image into a project registry repository
- deploy an image directly as a room service
- build and deploy from a local directory in one command
registry.meshagent.com/<project-key>/<repository>:<tag> tag, make sure the target repository exists in the project. See Registries.
How image build and deploy fit into MeshAgent
The image workflow sits between source files and a deployable MeshAgent service:meshagent build PATH --tag ...streams a local directory into a room and builds an image there.meshagent deploy --tag ...creates or updates a room service from an existing image.meshagent deploy PATH --tag ...does both in one command.
- prepare files in the room
- build an image from those files inside the room
- deploy a service that uses that image
Commands
meshagent build
Use build when you want MeshAgent to build an image inside a room.
meshagent build streams a local directory into the room as the build context. If that directory contains a Dockerfile, MeshAgent uses it during the room-side build. The build runs in MeshAgent rather than requiring a local Docker daemon on the machine that started the command.
Example:
PATHis required and becomes the streamed build context--tagis required--roomis required unlessMESHAGENT_ROOMis already set--context-pathand--dockerfile-pathlet you point at a different directory or Dockerfile inside the streamed context- build logs stream back through the CLI while the build runs
- this is a good fit for agent-driven build workflows inside a room because the build happens in MeshAgent, not on the local machine
meshagent deploy
Use deploy when you already have an image and want to create or update a room service from it, or when you want to build and deploy from a local directory in one step.
Example deploying an existing image:
- mount room storage with
--room-mount - mount project storage with
--project-mount - mount another image with
--image-mount - mount scratch storage with
--empty-dir-mount - inject a
MESHAGENT_TOKENwith--meshagent-token - override the deploy identity for
--meshagent-tokenand--env-secretwith--identity - inject a secret-backed environment variable with
--env-secret NAME=SECRET_ID - publish a route with
--domainwhen the service exposes exactly one published port
PATH, meshagent deploy builds first and then deploys the resulting image tag. When you omit PATH, it deploys the image tag directly. In both cases the service name is derived from the image tag, and MeshAgent updates the existing room service when one already exists.
How image build and deploy work with service packaging
meshagent build and meshagent deploy are complementary to service packaging.
Use this workflow when:
- your workflow is image-first
- you want to build inside a room
- you want a fast path from image tag to room service
- you want an agent in the room to participate in building and shipping the service
- you are writing or reviewing a
meshagent.yaml - you need a fuller service spec with more explicit deployment structure
- you are working with ServiceTemplates or broader service configuration
meshagent build and meshagent deploy are the room-native image workflow, while service manifests are the broader service-definition workflow.