Skip to content

Publish an agent to ghcr.io ​

Last updated Nov 27, 2026 View as Markdown

Push the my-agent project of the quickstart, with its description set to Writes code test first, to the GitHub Container Registry as a versioned package, then run one version of it. you stands for your GitHub account. Your digests, session IDs, answers, and loaded skills differ.

Sign in ​

Pandra uses the login of docker login when you have one. Otherwise sign in with a GitHub token that can write packages, here in GHCR_TOKEN, which Pandra reads from standard input:

terminal
sh
echo "$GHCR_TOKEN" | pandra auth login ghcr.io -u you --password-stdin

Push a version ​

pandra push builds and publishes the agent project in the current directory, the one with its pandra.toml, so change to the project's directory first. The version in pandra.toml becomes the tag:

terminal
sh
cd my-agent
pandra push ghcr.io/you/my-agent
text
Pushed my-agent 0.1.0
  From:    /home/you/my-agent
  To:      ghcr.io/you/my-agent:0.1.0
  Digest:  sha256:08578faa113f7debe10cd50576b4863c89a3e5819fb028462454007d5707a720

For the next release, change version to 0.2.0 in pandra.toml and push again, which pushes ghcr.io/you/my-agent:0.2.0. GitHub makes a new package private; to let anyone run it, make it public in the package's settings on GitHub.

Run a version ​

Run a version by its tag. The first run of a package from a registry asks you to approve it, even your own, and shows what the package contains (shortened here):

terminal
sh
pandra run ghcr.io/you/my-agent:0.1.0 --headless \
    --prompt "Write a failing test for an add function."
text
  Source:                ghcr.io/you/my-agent
  Digest:                sha256:08578faa113f7debe10cd50576b4863c89a3e5819fb028462454007d5707a720
  Description:           Writes code test first
  Skills:                test-driven-development
  ...
✓ Approve this agent? Yes
...
  Session:  81d6c0e9dc16 (my-agent)
...
Wrote tests/add_test.py with one failing test for add().
  Skills loaded:      test-driven-development
  Skills not loaded:  pandra

The approval also covers later versions that add no MCP server, change none, and pre-approve no new tool, so pandra run ghcr.io/you/my-agent:0.2.0 starts without asking.

Learn more about OCI registries →

Released under the Apache License 2.0