Skip to content

Locking and building ​

Last updated Nov 30, 2026 View as Markdown

pandra.toml says where each component comes from, pandra.lock pins what each external source resolved to, and pandra build combines both with your local files into a package, which has a digest. These steps follow the example agent reviewer:

  1. Lock: pandra lock reads pandra.toml, which declares instructions from a Git repository, the skill ponytail-review at the tag v5.3.3, and the MCP server context7 from the MCP Registry at version 4.7.0. It writes pandra.lock, which pins the skill and the instructions to a commit each and the server to its registry entry, each with the digest of its content.
  2. Build: pandra build reads both files and the local files they name, such as instructions.md, and puts the package reviewer 0.1.0 in your store under its local name, reviewer. The package holds the instructions, the skill, and the MCP server, and its digest names it.

The lockfile ​

pandra add and pandra remove keep pandra.lock up to date; commit it together with pandra.toml. Pandra never moves a pin by itself. You choose when, with these commands:

JobCommand
Bring the lockfile up to date, keeping existing pinspandra lock
The same, as part of a commandpandra run . --lock-update ...; also build, sync, and push
Check it in CI, without changes or network; exits 1 when it is stale, or missing although it is requiredpandra lock --check
Move a branch to its newest commit, a tag to the commit it names now, and an MCP Registry server to its newest version, and download again the HTTPS sources without sha256pandra lock --upgrade

The commands that read the lockfile (run, build, sync, push) never change it without --lock-update. When a hand edit of pandra.toml changes a source, so that the lockfile no longer matches, they fail and list what changed:

text
error: pandra.lock does not match pandra.toml (2 differences)
  [skills.lint] differs from its pandra.lock entry in `tag`: v1.4.0 in pandra.toml, v1.3.0 in pandra.lock
  [[instructions]] #2 differs from its pandra.lock entry in `tag`: v2.1.0 in pandra.toml, v2.0.0 in pandra.lock
  To bring pandra.lock up to date with pandra.toml:
    pandra lock

To move one component, give its name, or the option pandra remove takes for it:

terminal
sh
pandra lock --upgrade test-driven-development
pandra lock --upgrade --mcp github
pandra lock --upgrade --prompt

pandra lock shows each component it pinned again as a diff, the old value on a - line and the new one on a + line, red and green on a terminal, as git diff shows them. After you change a skill's tag from v4.0.0 to v7.0.2 in pandra.toml, pandra lock prints:

text
Updated pandra.lock
  pinned again skill test-driven-development
      source  https://github.com/obra/superpowers/skills/test-driven-development
    - ref     tag v4.0.0
    - commit  95c6e1633630
    + ref     tag v7.0.2
    + commit  22f0b463e7a5

When a new version of an MCP server no longer offers the method you selected, pandra lock --upgrade fails and lists the supported methods with the command that selects one, because another method sends your users' values somewhere else.

Builds use the pinned revisions and verify every digest; a mismatch is an error, never a silent update. The lockfile pins MCP server definitions, not the software that npx, uvx, or docker downloads when the server starts. The lockfile reference shows what it records.

Building a package ​

A run of the project, such as pandra run ., builds it into a build cache and adds nothing to your store. pandra agent list shows what your store holds (inspect what you built). To keep a package, build it into the store:

terminal
sh
pandra build
text
Built reviewer 0.1.0
  Digest:  sha256:b2490e89975c...

pandra build gives the package a local name, by default the name in pandra.toml. Run it by that name from anywhere:

terminal
sh
pandra run reviewer --prompt "Review PR 12."

Rebuilding the project moves the name to the new package and shows the old digest as Previous:. Pandra deletes the old package once nothing else holds it, such as another name or a session, and then marks it (package deleted):

text
Built reviewer 0.1.0
  Digest:    sha256:f8281efd3e7e...
  Previous:  sha256:b2490e89975c... (package deleted)

When the name already belongs to something else, such as a package built from another directory, pandra build fails with the commands that pass --name, which assigns or moves a name without asking:

terminal
sh
pandra build --name reviewer-dev

A local name never contains /, so Pandra never mistakes it for a path or a remote reference, and never fetches an unknown name. reviewer@sha256:<digest> runs only while the name still points at that package. Settings in your configuration follow the agent's identity: pandra run . knows the project by its absolute path and a built package by its local name, so the two have separate settings (agent identity).

To write a package file instead, which needs no name:

terminal
sh
pandra build -o reviewer.agent.tar
text
Wrote reviewer 0.1.0
  File:    reviewer.agent.tar
  Digest:  sha256:f8281efd3e7e...

Package files shows how to share it.

To build a project in another directory, give its directory:

terminal
sh
pandra build ./agents/reviewer

The package and its local name are the same as from inside that directory. A path you give -o is read from the directory you are in, not from the project's, so pandra build ./agents/reviewer -o reviewer.agent.tar writes reviewer.agent.tar where you are. When the build fails with a step that runs pandra lock or pandra add, the step says the directory to run it in, since those commands act on the current directory.

What goes into the package ​

The package holds the components and the local files that pandra.toml refers to; skills carry their own directories. Nothing else from the project directory goes in, so a README.md or test data stays out, apart from license files:

  • License and notice files at the top of the project: LICENSE*, LICENCE*, COPYING*, and NOTICE*, with those prefixes in capital letters.
  • A top-level LICENSES/ directory, as REUSE projects keep, that holds only texts named after their license identifier, such as LICENSES/MIT.txt.

A build leaves out any other file it finds there, with a warning that names it:

text
warning: left out the license file LICENSES/README.md: LICENSES/ holds only files named by a license identifier with .txt, .md, or no extension
warning: left out the license file license.md: its name must start with LICENSE, LICENCE, COPYING, or NOTICE in capital letters

The agent package reference shows the files inside a package.

Inspect what you built ​

pandra agent list lists stored packages, one row per local name or reference, and whether each is ready to run:

text
$ pandra agent list
AGENT     REF  DIGEST        DESCRIPTION                READY  BLOCKERS
reviewer  -    f8281efd3e7e  Add your description here  no     env_missing,input_missing,runner_missing

BLOCKERS lists the codes of what would stop a run. harness_ambiguous among them means that several harnesses are installed and nothing selects one for the agent: which harness runs says how to choose one.

pandra agent inspect shows the details of a package in your store or of a local project, such as pandra agent inspect .; --json gives them in machine-readable form. To inspect the reviewer package:

terminal
sh
pandra agent inspect reviewer

It prints:

text
Name                reviewer
Version             0.1.0
Description         Add your description here
Digest              sha256:f8281efd3e7e...
Identities          reviewer (built from /home/me/agents/reviewer)
Pre-approved tools  superpowers:brainstorming: Read, Grep; lint: Bash(cargo clippy:*)

Instructions (38 bytes)
  Describe what the agent does and how.

Skills
  review
  lint                         git+https://github.com/acme/skills at 8879afad0ea7..., path skills/lint
  superpowers:                 git+https://github.com/obra/superpowers at 1a2b3c4d5e6f...
    superpowers:brainstorming
    ...
    superpowers:writing-plans
    ...

MCP servers
  github
    Server:   io.github.github/github-mcp-server 1.4.0 (MCP Registry, registry.modelcontextprotocol.io)
    URL:      https://api.githubcopilot.com/mcp/
    Methods:  oci:ghcr.io/github/github-mcp-server  not supported: a secret input in an environment variable of an oci package
              remote:https://api.githubcopilot.com/mcp/ (default)  supported
    Inputs:   Authorization  optional, secret  Authorization header with authentication token (PAT or App token)
  time
    Server:   pypi package mcp-server-time 2026.8.18
    Command:  uvx
    Args:     mcp-server-time==2026.8.18 --local-timezone=UTC
    Methods:  pypi:mcp-server-time (default)  supported
    Inputs:   timezone       optional          IANA time zone name

Environment variables
  GITHUB_REPOSITORY  required          Repository to review, as owner/name
  SENTRY_TOKEN       optional, secret  Token for reading Sentry issues

Each component shows its source beside it, and your project's own components show none. Each MCP server shows what it is (Server:), where it connects or what it runs on your machine (URL:, or Command: and Args: with each input's default filled in), and its methods. Inputs: lists what you can configure for it, and Environment variables lists the variables the agent expects; neither shows a value. To see which of them your configuration still lacks:

terminal
sh
pandra config show --agent reviewer

Check the file as you write it ​

The JSON Schema of pandra.toml is published at https://pandra.io/schemas/agent-definition/v0.schema.json. pandra init names it in the file's first line, #:schema https://pandra.io/schemas/agent-definition/v0.schema.json, so editors that read that line, such as Taplo and Even Better TOML, check the file as you edit it. pandra schema agent-definition prints the same schema without the network, for an AI agent or a tool that checks the file.

Released under the Apache License 2.0