Skip to content

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
yaml
name: 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_VERSION in the job's env names 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_VERSION in place of 0.1.0 in the URL and GH_TOKEN: ${{ github.token }} in the step's env.
  • 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-version or pandra harness use, which Pandra downloads and verifies on first use. With --offline, or with harnesses.downloads set to manual, Pandra downloads no harness, so install that version with pandra harness install in an earlier step that has network access (which installation runs). The harness reads its usual credential variables, such as ANTHROPIC_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 config commands, which records the servers you allowed, and point PANDRA_CONFIG_FILE at it. Pass each secret value from the job's secrets as PANDRA_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 git command, so a private repository needs a Git credential on the runner, as git clone does. For a private registry, use your usual Docker login step, or pandra auth login HOST -u USER --password-stdin with a token from the job's secrets.

To ship the agent as an image instead, see container images.

Released under the Apache License 2.0