A GitHub Action to deploy agents to the Runloop platform. Supports multiple source types including Git repositories and file uploads.
- Zero-config Git deployments - Automatically deploys your current repository
- Release tag support - Deploys specific versions when releases are published
- Multiple source types - Git repositories, tar archives (.tar, .tar.gz, .tgz), 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
- name: Deploy agent
uses: runloopai/deploy-agent@main
with:
api-key: ${{ secrets.RUNLOOP_API_KEY }}
source-type: git
agent-version: 1.0.0That's it! The action will automatically use your current repository and commit SHA.
| Input | Required | Default | Description |
|---|---|---|---|
api-key |
✅ | Runloop API key (store in secrets) | |
source-type |
✅ | Agent source type: git, tar, or file |
|
agent-version |
✅ | Agent version (semver string like 2.0.65 or git SHA) |
|
agent-name |
repo name | Name for the agent (defaults to repository name) | |
git-repository |
current repo | Git repository URL (auto-detected) | |
git-ref |
current commit/tag | Git ref (branch/tag/commit SHA, auto-detected) | |
path |
Path to tar archive or single file (required for tar/file) |
||
setup-commands |
Newline-separated setup commands to run after installation | ||
is-public |
false |
Whether the agent should be publicly accessible | |
api-url |
https://api.runloop.ai |
Runloop API URL | |
object-ttl-days |
Time-to-live for uploaded objects in days |
| Output | Description |
|---|---|
agent-id |
The ID of the created agent (e.g., agt_xxxx) |
agent-name |
The name of the created agent |
object-id |
The ID of the uploaded object (if applicable, e.g., obj_xxxx) |
💡 See the examples/ directory for complete, ready-to-use workflow files!
- uses: actions/checkout@v4
- uses: runloopai/deploy-agent@main
with:
api-key: ${{ secrets.RUNLOOP_API_KEY }}
source-type: git
agent-version: 1.0.0
setup-commands: |
chmod +x scripts/agent.sh
npm installon:
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: runloopai/deploy-agent@main
with:
api-key: ${{ secrets.RUNLOOP_API_KEY }}
source-type: git
agent-version: ${{ github.event.release.tag_name }}
agent-name: my-agent-${{ github.event.release.tag_name }}📋 See examples/tar-agent.yml for complete workflow examples with tar creation!
Basic example:
# Create your own tar.gz archive first
- name: Create agent archive
run: |
tar -czf agent.tar.gz -C ./agent-code .
# Then deploy it
- name: Deploy agent
uses: runloopai/deploy-agent@main
with:
api-key: ${{ secrets.RUNLOOP_API_KEY }}
source-type: tar
agent-version: 1.0.0
path: agent.tar.gz
object-ttl-days: 30You can also use .tar format or reference output from a previous step:
- name: Build and package
id: build
run: |
# Your custom build process
make package
echo "archive-path=dist/my-agent.tar.gz" >> $GITHUB_OUTPUT
- uses: runloopai/deploy-agent@main
with:
api-key: ${{ secrets.RUNLOOP_API_KEY }}
source-type: tar
agent-version: 1.0.0
path: ${{ steps.build.outputs.archive-path }}- uses: runloopai/deploy-agent@main
with:
api-key: ${{ secrets.RUNLOOP_API_KEY }}
source-type: file
agent-version: 1.0.0
path: ./scripts/agent.shStore your Runloop API key as a GitHub secret:
- Go to Settings → Secrets and variables → Actions
- Create a new secret named
RUNLOOP_API_KEY - Paste your Runloop API key
- Reference it:
api-key: ${{ secrets.RUNLOOP_API_KEY }}
pnpm installYou can test the action locally using act:
act -j deploy --secret RUNLOOP_API_KEY=your_api_keyThe action uses @vercel/ncc to bundle all dependencies into a single file.
pnpm run build # Bundle with ncc (creates dist/index.js)
pnpm run rebuild # Clean and buildAfter building, commit the dist/ folder as it's required for the action to run.
pnpm run lint # Check for lint issues
pnpm run lint:fix # Auto-fix lint issues
pnpm run format # Format code with Prettier
pnpm run format:check # Check formatting
pnpm run typecheck # Run TypeScript type checking
pnpm run check # Run all checks (format + lint + typecheck)MIT