harbor-openclaw
OpenClaw agent adapter for Harbor.
Run the OpenClaw agent against
Harbor tasks on the upstream pip install harbor by supplying
--agent-import-path harbor_openclaw:OpenClaw.
Install
pip install harbor harbor-openclaw
Usage
harbor run \
--agent-import-path harbor_openclaw:OpenClaw \
-p path/to/task \
-m openai-codex/gpt-5.4
Do not pass -a. Harbor's factory prefers a known -a name over
--agent-import-path, so -a nop --agent-import-path harbor_openclaw:OpenClaw
would silently run the no-op agent instead of OpenClaw.
Optional runtime env vars (via --ae)
All three are opt-in; omit them for a vanilla API-key run.
| Var | Purpose |
|---|---|
OPENCLAW_AUTH_PROFILES_PATH |
Path on the host to an auth-profiles.json for OAuth/subscription providers. Base64-injected into $HOME/.openclaw/agents/<id>/agent/auth-profiles.json in the container, then scrubbed at teardown so a leaked image cannot exfiltrate the token. |
OPENCLAW_AUTH_B64 |
Pre-encoded base64 blob of the same auth-profiles.json. Takes precedence over OPENCLAW_AUTH_PROFILES_PATH. |
OPENCLAW_MEMORY_DIR |
Path inside the container to seed into <workspace>/memory/ before the run; openclaw memory index --force is run after seeding (best-effort — falls back to keyword search if the optional vector-index deps aren't installed). |
OPENCLAW_PERSONALITY_DIR |
Path inside the container; files are flat-copied (by basename, -maxdepth 1) into the workspace root — useful for task-supplied AGENTS.md / persona files. |
Running with Codex CLI subscription (OAuth)
If you want to run OpenClaw with a Codex model (e.g. openai-codex/gpt-5.4)
backed by your ChatGPT subscription, you need an openclaw-format
auth-profiles.json on the host containing the OAuth credential.
The fastest path is to reuse the credential the Codex CLI
already stored after you logged in with ChatGPT. The Codex CLI keeps it in
~/.codex/auth.json; we re-shape a few fields with jq into the
openclaw-format file that this adapter understands. No local OpenClaw
install is required.
1. Make sure you've logged into the Codex CLI
After running codex at least once and completing the browser OAuth,
~/.codex/auth.json will exist with tokens.access_token,
tokens.refresh_token, tokens.id_token, and tokens.account_id set.
2. Convert ~/.codex/auth.json into openclaw's auth-profiles.json
mkdir -p /tmp/openclaw-auth && jq '{
version: 1,
profiles: {
"openai-codex:default": {
type: "oauth",
provider: "openai-codex",
access: .tokens.access_token,
refresh: .tokens.refresh_token,
expires: ((now | floor) * 1000 + 3600000),
idToken: .tokens.id_token,
accountId: .tokens.account_id
}
}
}' ~/.codex/auth.json > /tmp/openclaw-auth/auth-profiles.json \
&& chmod 600 /tmp/openclaw-auth/auth-profiles.json
Re-run this any time the Codex CLI refreshes its token.
3. Point the adapter at that file
End-to-end command that runs a Harbor task against your subscription:
harbor run \
--agent-import-path harbor_openclaw:OpenClaw \
-p path/to/task \
-m openai-codex/gpt-5.4 \
--ae OPENCLAW_AUTH_PROFILES_PATH=/tmp/openclaw-auth/auth-profiles.json \
--ae OPENCLAW_MEMORY_DIR=/app/optional_memory \
--ae OPENCLAW_PERSONALITY_DIR=/app/persona
Or with a pre-encoded blob:
AUTH_B64=$(base64 -w0 /tmp/openclaw-auth/auth-profiles.json)
harbor run \
--agent-import-path harbor_openclaw:OpenClaw \
-p path/to/task \
-m openai-codex/gpt-5.4 \
--ae OPENCLAW_AUTH_B64=$AUTH_B64 \
--ae OPENCLAW_MEMORY_DIR=/app/optional_memory \
--ae OPENCLAW_PERSONALITY_DIR=/app/persona
If you leave both OPENCLAW_AUTH_PROFILES_PATH and OPENCLAW_AUTH_B64 out
and the default file ($HOME/.openclaw/agents/main/agent/auth-profiles.json)
exists, the adapter picks it up automatically.
At teardown the adapter scrubs the injected blob from the container so a leaked image can't exfiltrate the OAuth token.
Alternative: Codex via API key
If you'd rather use a metered API key, drop the auth-profiles.json step
entirely and pass the key via --ae:
harbor run \
--agent-import-path harbor_openclaw:OpenClaw \
-p path/to/task \
-m openai-codex/gpt-5.4 \
--ae OPENAI_API_KEY=$OPENAI_API_KEY
Development
uv sync --group dev
uv run pytest tests/
License
Apache-2.0
Metadata
Release files for harbor-openclaw 0.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| harbor_openclaw-0.1.8.tar.gz | 189.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| harbor_openclaw-0.1.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 204.4 kB
Release files / harbor_openclaw-0.1.8.tar.gz
| Download URL | harbor_openclaw-0.1.8.tar.gz |
|---|---|
| Size | 189.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
72c2414aca73aa88f83118dc3f3736419f4620d57afe8ccc684861e908864905
|
|
BLAKE2b-256 checksum How to use checksums |
e4fa2bcbff5b1950d11d5d793a6e433760503e3541588942fc23c5f687c50313
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / harbor_openclaw-0.1.8-py3-none-any.whl
| Download URL | harbor_openclaw-0.1.8-py3-none-any.whl |
|---|---|
| Size | 15.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b05d3122fea2c8316651abcffcfb52ab6d663eee9f3b2c7eeb509d8a8a774a3b
|
|
BLAKE2b-256 checksum How to use checksums |
14de26321800dbe1287a5e3819bbf26e1ea43ecc6c6e884772156db7883564f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for harbor-openclaw 0.1.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.