Running in CI
Last updated Nov 27, 2026 View as Markdown
Pandra runs in any CI system as it runs on your machine: install a pinned release, fetch and approve the agent, and run it. This GitHub Actions job runs a changelog agent, pinned to a full commit, on the checked-out repository. The agent has no MCP servers, so it needs no configuration file:
.github/workflows/agent.yml
yamlname: Agent
on: workflow_dispatch
jobs:
run:
runs-on: ubuntu-latest
env:
PANDRA_VERSION: "0.1.0"
AGENT: github.com/acme/changelog@<full-commit>
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Install Pandra
run: |
curl -fsSL "https://pandra.io/$PANDRA_VERSION/install.sh" | sh
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Fetch and approve the agent
run: pandra pull "$AGENT" && pandra agent trust "$AGENT"
- name: Run the agent
run: pandra run "$AGENT" --harness claude-code --harness-version 2.1.285 --prompt "Draft release notes for the changes since the last tag." > notes.md- Pandra's version.
PANDRA_VERSIONin the job'senvnames the release the install step downloads, so you change the version in that one place. To verify the script before it runs, use the lines in installation instead, with$PANDRA_VERSIONin place of0.1.0in the URL andGH_TOKEN: ${{ github.token }}in the step'senv. - Approval. A runner starts with no approvals, so the job approves the agent after pulling it. Pin the commit you reviewed, so the job never approves a revision you have not seen. A package in an OCI registry is pinned by digest, as in
ghcr.io/acme/changelog@sha256:<digest>. - The harness. Use one installed on the runner, or name a version with
--harness-versionorpandra harness use, which Pandra downloads and verifies on first use. With--offline, or withharnesses.downloadsset tomanual, Pandra downloads no harness, so install that version withpandra harness installin an earlier step that has network access (which installation runs). The harness reads its usual credential variables, such asANTHROPIC_API_KEY, from the job's environment variables, where the agent and its tools can read them too. A target credential keeps the key from the agent: the harness gets a placeholder, and Pandra's proxy puts the key only in requests to the provider's API. - MCP inputs. Commit a configuration file prepared with
pandra configcommands, which records the servers you allowed, and pointPANDRA_CONFIG_FILEat it. Pass each secret value from the job's secrets asPANDRA_SECRET_<NAME>(supplying a value without its store). Review every pull request in CI shows the whole setup. - Private repositories and registries. Pandra fetches Git with the
gitcommand, so a private repository needs a Git credential on the runner, asgit clonedoes. For a private registry, use your usual Docker login step, orpandra auth login HOST -u USER --password-stdinwith a token from the job's secrets.
To ship the agent as an image instead, see container images.