Skip to main content
Start with the Runloop Quickstart to understand the basics of agents.

Overview

Runloop’s deploy-agent GitHub Action automates agent deployment directly from your GitHub workflows. It provides a convenient way to deploy agents without writing custom API integration code, while maintaining the same functionality as the Agents API.

Key Features

  • Zero-config Git deployments - Automatically deploys your current repository
  • Release tag support - Deploys specific versions when releases are published
  • Multiple source types - Git repositories, npm packages, pip packages, tar archives, and single files
  • Flexible packaging - Create tar archives however you want in your workflow
  • Setup commands - Run custom setup commands after agent installation
  • Public/private agents - Control agent visibility
  • TTL support - Set expiration time for uploaded objects

Quick Start

Basic Git Deployment

Deploy your current repository as an agent with minimal configuration.

Authentication

Setting Up Your API Key

  1. Go to the Settings page in the Runloop Dashboard
  2. Create a new API key. For CI/CD workflows, consider using a restricted key scoped to only the resources the workflow needs (for example, Agents: write, Objects: write).
  3. Add it as a GitHub secret:
    • Go to your repository’s SettingsSecrets and variablesActions
    • Click New repository secret
    • Name: RUNLOOP_API_KEY
    • Value: Your Runloop API key
    • Click Add secret

Relationship to Agents API

The GitHub Action provides a convenient wrapper around the Agents API.
  1. For Git sources: Creates an agent with source.type: "git" and the repository/ref information. When using the API directly, use the ref field for versioning instead of the top-level version — see Agent Versioning.
  2. For Tar/File sources:
    • Can upload the file/archive as a storage object
    • Creates an agent with source.type: "object" referencing the uploaded object
    • Applies any setup commands as agent_setup in the object source

Equivalent API Calls

The GitHub Action deployment.
Is equivalent to this API call.
For tar/file sources, the action first uploads the object, then creates the agent.

Input Parameters

Outputs

Using Deployment Outputs

Capture and use the agent ID and other outputs from the deployment.

Deployment Examples

Git Source (Auto-detect)

Deploy the current repository as an agent. The action automatically detects the repository and tag.

Git Source (On Release)

Deploy an agent when a new release is published, using the release tag as the agent name:

Git Source (Custom Repository)

Deploy an agent from a specific Git repository and branch:

Tar Archive Deployment

Package your agent files into a tar archive and deploy it.

Tar Archive with Custom Build

Build your agent with custom steps, then deploy the resulting archive.

Single File Deployment

Deploy a single file as an agent.

npm Package Deployment

Deploy an agent from an npm package. Use agent-version to pin a specific package version.

pip Package Deployment

Deploy an agent from a PyPI package. Use agent-version to pin a specific package version.

Best Practices

Version Management

  1. Git agents: Use git-ref to pin to a branch, tag, or tag. The agent-version field is not used.
  2. npm/pip agents: Use agent-version to pin the installed package version (e.g., 2.1.123). When omitted, the latest version from the registry is installed.
  3. Tar/file agents: Each upload produces a new immutable object. The agent-version field is not used.

Workflow Organization

  1. Separate build and deploy: Create separate jobs for building and deploying
  2. Conditional deployment: Only deploy on specific branches or tags
  3. Error handling: Add error handling and notifications

Security

  1. Never commit API keys: Always use GitHub secrets
  2. Use environment-specific keys: Use different API keys for different environments
  3. Prefer restricted keys: Create keys with only the permissions your workflow needs to limit exposure if a key is compromised
  4. Limit secret access: Use environment protection rules for production secrets

Performance

  1. Cache dependencies: Use GitHub Actions caching for faster builds
  2. Optimize archive size: Only include necessary files in tar archives
  3. Use object TTL: Set object-ttl-days for temporary deployments

Troubleshooting

Common Issues

Deployment fails with authentication error
  • Verify your RUNLOOP_API_KEY secret is correctly set
  • Check that the API key is valid and has the necessary permissions
Agent creation fails
  • Verify the source repository/branch exists and is accessible
  • Check that the tar archive or file path is correct
  • For npm/pip sources, ensure agent-version is a valid package version string
Setup commands fail
  • Verify the commands are valid for the agent’s environment
  • Check that required dependencies are available
  • Review agent logs in the Runloop Dashboard

Getting Help