Local

Deploy an agent from agentregistry to your local environment.

To deploy an agent to a local environment, you must install agentregistry by using Docker as shown in the Get started guide. If you installed agentregistry on Kubernetes, you cannot deploy to local environments.

Local deployments spin up Docker containers on your local machine from images that exist on your machine or that can be pulled from the image location reference that agentregistry points to.

Before you begin

  1. Follow the Get started guide to set up agentregistry and start the agentregistry daemon.
  2. Publish an agent.

Deploy the agent

  1. Save your Gemini API key as an environment variable. To retrieve your API key, log in to the Google AI Studio and select API Keys. The key is used to interact with the agent via the Gemini LLM provider.

    export GOOGLE_API_KEY=<apikey>
  2. Deploy the agent to your local environment. The following command spins up a Docker container by using Docker compose.

    arctl deployments create myagent --type agent

    Example output:

    Agent 'myagent' version 'latest' deployed to local provider (providerId=local)
    
    If the deployment fails, a deployment entry is still created in the database and set to failed. You can view failed deployments by using the arctl deployments list command. Note that you cannot re-deploy a failed deployment to fix it. Instead, remove the failed deployment with arctl deployments delete <deployment-ID> and then re-run the arctl deployments create command.
  3. Verify that the deployment was created.

    arctl deployments list

    Example output:

    ID         NAME      VERSION   TYPE    PROVIDER   STATUS     AGE
    be6b09e5   myagent   latest    agent   local      deployed   1m
    
  4. Optional: Open the agentregistry UI and go to the Deployed view. Verify that you see the deployed agent.

Cleanup

You can remove a deployment from the UI or CLI.

  1. Open the agentregistry UI and go to the Deployed view.
  2. Find the agent deployment that you want to remove and click the trash icon.
  1. List the deployments in your environment and find the one that you want to delete.

    arctl deployments list
  2. Remove the deployment.

    arctl deployments delete <deployment-ID>