Skip to content

Deploy agent to Claude platform #4

Deploy agent to Claude platform

Deploy agent to Claude platform #4

Workflow file for this run

# Deploy agent + environment specs under `claude_platform/` to Claude Managed Agents platform.
# Manually dispatched (like deploy-skills.yml / deploy-images.yml) — a maintainer chooses which agent
# to publish after the spec change has been reviewed and merged. Resources are resolved by name
# (create-if-absent, else update in place); agents reference skills by name. deploy_agents.py deploys
# exactly the skills each selected agent references (create or new version), then attaches them at
# latest — only the skills an agent uses are published. See
# docs/plans/2026-07-24-001-feat-agent-spec-deploy-pipeline-plan.md.
#
# Prerequisites (set once in repo Settings, on the `prod` environment):
# - Secret ANTHROPIC_API_KEY = a standard org API key (sk-ant-api03-...) scoped to the workspace
# that holds the agents/skills. Not an admin key. (Shared with deploy-skills.yml.)
name: Deploy agents to Claude platform
on:
workflow_dispatch:
inputs:
agent:
description: Which agent(s) to deploy
type: choice
options:
- all
- lik-query-project-index
- lik-cross-source-reference
- lik-catalog-registration
default: all
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
# The prod environment scopes ANTHROPIC_API_KEY (and enables optional deployment protection
# rules). Env-scoped secrets only resolve when the job declares this.
environment: prod
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
# deploy_agents.py deploys exactly the skills each selected agent references (create or new
# version) before attaching them at latest — so only the skills an agent uses are published,
# and there's no separate skills step here. To publish a skill independently of any agent, use
# the "Deploy skills to Claude platform" workflow (deploy-skills.yml).
- name: Deploy agent(s), their skills, and environment(s)
working-directory: scripts
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: uv run python deploy_agents.py --agent "${{ inputs.agent }}"