Build image or store source code
Build the container image for your agent or store the Dockerfile and source code in a GitHub repository.
Before you can add an agent to the Solo Enterprise for agentregistry catalog so that registry users can access and deploy the agent to a connected environment, you must create a Docker image for the agent or store the agent’s source code in a GitHub repository. The method that you need to use depends on the environment that you plan to deploy your agent to.
| Deployment target | Example provider | Docker image vs. GitHub repo |
|---|---|---|
| AI runtimes in Kubernetes | Solo Enterprise for kagent | Build the Docker container image and push it to a container registry. |
| Agentic cloud platforms | AWS Bedrock AgentCore | Store the Dockerfile and source code in a GitHub repository. |
Build a Docker image
To deploy an agent to an AI runtime in Kubernetes, such as Solo Enterprise for kagent, agentregistry requires a Docker container image that is stored in a container registry. You can use the arctl CLI to build the image on your local machine and push it to your local or remote container registry.
Later when you add the agent to the Solo Enterprise for agentregistry catalog, you create a reference to its container image location, including the image repo and tag. This way, Solo Enterprise for agentregistry can retrieve the image and spin up the Kubernetes pod for your agent during the deployment to your Kubernetes environment.
To build a Docker image, you can choose between the following options:
- Build the image locally. This option assumes that you want to build the agent image on your local machine only, such as for local test setups. The image is not pushed to your container registry. While you can still create a catalog entry for the agent image in Solo Enterprise for agentregistry, you cannot deploy the image to a Kubernetes cluster, unless you manually load the image to the cluster.
- Build and push: This process allows you to build the agent image on your local machine and push it to your container registry. Note that this option requires you to be logged into the container registry that you want to use and that the
agent.yamlfile includes the correct container registry and image tag details.
Create and run an agent on your local machine.
Review the image location and tag that was set for the agent in the
agent.yamlfile.By default, agentregistry uses
localhost:5001as the container registry andlatestas the image tag, such aslocalhost:5001/myagent:latest. If you want to use agentregistry to push images to your container registry, make sure to update this file with the registry and image tag that you want to use. Note that this update is not required if you want to build images locally only without pushing them to your container registry.cat myagent/agent.yamlExample output:
apiVersion: ar.dev/v1alpha1 kind: Agent metadata: name: myagent spec: source: image: localhost:5001/myagent:latest modelProvider: gemini modelName: gemini-2.5-flash description: myagent agentBuild the agent image on your local machine. The following command builds the image with the Dockerfile that is included in your
myagentscaffold and tags it with the container registry and version information that is provided in theagent.yamlfile. If you followed the instructions in the Create and run an agent guide,localhost:5001/myagent:latestis used.arctl build myagentExample output:
Building agent image: localhost:5001/myagent:latest ✓ Successfully built Docker image: localhost:5001/myagent:latestTo also use Solo Enterprise for agentregistry to push the image to your container registry, include the--pushoption. You can also set the platform, for which you want to build the image, such aslinux/amd64by using the--platformoption. Note that you must log in to your container registry first, such as by usingdocker loginfor DockerHub. For more information, see the arctl build command.Verify that the image is built.
docker images | grep myagentExample output:
localhost:5001/myagent latest f7ba3e98adaa 11 minutes ago 2.93GBIf you did not push the image to a container registry, load the Docker image to your cluster. This step is required in local test setups, such as kind, to test the deployment of your agent later. Note that this step is not required if you pushed the image to a container image registry that your cluster can pull from.
kind load docker-image localhost:5001/myagent:latest --name <cluster-name>
Store source code
To deploy an agent to an agentic cloud platform, such as AWS Bedrock AgentCore, you must store the source code and Dockerfile for your agent in a GitHub repository. When you add your agent to the Solo Enterprise for agentregistry catalog, you provide the link to the GitHub repository. During the deployment to an agentic cloud platform, Solo Enterprise for agentregistry automatically compiles the source code into an image that is compatible to run on the cloud platform that you target.
Create a GitHub repository and get the URL to your repository, such as
https://github.com/myorg/agent.git. For more information, see the GitHub docs.Install the
gitCLI.Link your local machine to your remote repository on GitHub.
git remote add origin <github-repo-url>Push your agent source code and Dockerfile to GitHub.
cd myagent git checkout main git add -A git commit -m 'initial commit' git push origin mainGo to your GitHub repository and verify that you see the files of your agent scaffold.