HUB
Sign inSign up
pi-coding-agent logo

swaleio/pi-coding-agent

By swaleio

•Updated 1 day ago

Pi, the coding agent, run unattended in Swale workflows. Backs the pi-coding-agent task.

Image
0

247

swaleio/pi-coding-agent repository overview

⁠pi-coding-agent

Swale-built image backing the pi-coding-agent task definition. It runs Pi⁠, the coding agent, once and unattended in a directory the caller names, and emits the agent's final answer as a task output.

  • Base: node:24-trixie-slim
  • Installed: Pi from Earendil's npm package @earendil-works/pi-coding-agent, at the version pinned in the Dockerfile⁠, plus git and ripgrep
  • User: non-root swale (uid 1000)
  • Updates: Pi makes no network calls of its own at startup, the update check among them (PI_OFFLINE=1)
  • WORKDIR /mnt/workspace, ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

⁠Invocation

The entrypoint takes no arguments. It reads the task's inputs from the platform's INPUT_* environment variables, changes into INPUT_DIRECTORY and runs pi --print --no-session with the prompt as one argument and stdin closed:

Input envEffect
INPUT_PROMPTThe instructions, passed as a single argument. Required.
INPUT_DIRECTORYThe full path the agent works in. Required.
INPUT_MODELThe model as provider/model, such as anthropic/claude-haiku-5-5. With INPUT_BASE_URL, the name that server gives the model. Required.
INPUT_API_KEYThe provider's key. Pass a secret.
INPUT_BASE_URLWhen set, a provider for a server that speaks OpenAI's chat completions API, written to the per-task ~/.pi/agent/models.json.
INPUT_PERMISSIONPi asks for no approvals, so each level is the set of tools it gets. read: read, grep, find, ls. edit (default): also edit and write. full: also bash, and the extensions and settings a repository brings in its .pi folder load.
INPUT_RESULT_PATHWhen set, the final answer is also written to this file.
INPUT_MAX_MINUTESThe run stops after this many minutes (default 60) and the task fails.

⁠Output

After a successful run, the entrypoint appends

result=<the final answer as a JSON string>

to $WORKFLOW_TASK_OUTPUT. The consuming task must declare a result output.

⁠Tags

Each tag is the version of Pi the image packages, such as 1.7.0. A rebuild that keeps that version, to pick up a fixed base image or wrapper, adds -r1, -r2, and so on. A tag is never reused; latest follows the newest publish.

⁠Building

From the repository root:

docker build -t swaleio/pi-coding-agent:dev images/pi-coding-agent

Merging a change under images/pi-coding-agent publishes the image under its next tag; task definitions reference it by digest.


Built from images/pi-coding-agent⁠ in the swaleio/task-definitions⁠ repository. For how a task definition references an image, see the task definition reference⁠ in the Swale documentation⁠.

Pi is a product of Earendil. This image is built by Swale; Earendil does not build, endorse or support it.

The Dockerfile and entrypoint are covered by the MIT License⁠. Pi is MIT-licensed; its license is inside the image in /usr/share/licenses/pi-coding-agent.

This image also contains software from other projects, each under its own license. The license texts those projects ship are inside the image: /usr/share/doc/<package>/copyright for Debian packages, /usr/local/LICENSE for Node.js and the directory of each npm package under /usr/local/lib/node_modules. A few packages ship none, so their projects' licenses are in /usr/share/licenses: the AWS SDK for JavaScript, data-uri-to-buffer and standard-webhooks. proxy-agent-negotiate ships none and its project publishes none; its package.json declares the MIT License. Source code for its GPL and LGPL components: https://snapshot.debian.org/package/<source-package>/<version>/. We also provide that source code on request: see Third-party software⁠.

Tag summary
Recent tags
Content type
Image
Digest
sha256:81991f8e5…
Size
143.4 MB
Last updated
1 day ago
docker pull swaleio/pi-coding-agent:latest