T4L Agent
t4l-agent runs one T4L connector and one coach loop against an existing OpenClaw agent.
OpenClaw owns the model, provider, reasoning mode, credentials, tools, and native session execution. T4L keeps those choices unchanged.
The whole runtime
T4L Trainer phone
|
| signed HTTPS
v
OpenClaw t4l-connect plugin
|
| narrow loopback proxy
v
t4l-agent run
├─ t4l-server + SQLite
└─ coach loop -> existing OpenClaw agent
There are two production commands:
t4l-agent installprepares an existing supported OpenClaw VPS.t4l-agent runruns the connector after setup.
Easy VPS setup
The normal user does not need to assemble Python or npm commands. Their trusted host agent reads the T4L install runbook and runs the pinned bootstrap:
curl -fsSL --proto '=https' --tlsv1.2 \
https://raw.githubusercontent.com/BigSlikTobi/t4l-agent/v0.3.2/install.sh \
| sudo bash -s -- \
--public-url https://coach.example.com \
--connector-owner-id webchat:gateway:operator-admin
The host agent supplies the real public URL and the exact verified
channel:account:sender identity. It also passes --openclaw-executable when
OpenClaw is installed outside the administrator's normal PATH. The script:
- creates one private Python environment under
/opt/t4l; - installs exactly
t4l-agent 0.3.2andt4l-server 0.8.1from PyPI; - checks the existing OpenClaw agent without sending a channel message;
- installs and pins the
t4l-connect 0.4.0plugin through OpenClaw; - creates the shared host-only token and loopback systemd service;
- checks the local connector and the restricted public HTTPS route.
This release supports Linux, Python 3.11+, and either a system-level or
current-user systemd OpenClaw Gateway owned by the administrator running the
installer. It stops safely when it cannot identify one exact Gateway service.
It never opens ports 18789 or 8787.
If the local service is ready but the existing reverse proxy still needs its
narrow T4L route, the installer reports LOCAL_READY. That is not full success.
The host agent finishes the proxy work and reruns the acceptance check.
What setup creates
The host setup does this once:
- Install the
@t4l-trainer/openclaw-t4l-connectplugin in the existing OpenClaw profile. - Configure its
agentIdand loopbackconnectorBaseUrl, normallyhttp://127.0.0.1:8787. - Give both the OpenClaw Gateway and
t4l-agentthe same randomT4L_CONNECTOR_RUNTIME_TOKEN. - Start
t4l-agent run.
The plugin contains only:
- the authenticated pre-model
/t4l connect CODEcommand; - a strict allowlist of phone routes;
- an HTTPS-to-loopback proxy.
The plugin itself does not install packages, choose releases, manage services, or receive provider credentials. The separate host installer owns that work.
For local plugin development:
cd openclaw_plugins/t4l-connect
npm test
npm pack --dry-run
Install a published version with OpenClaw's normal pinned-plugin flow. Configure it through the OpenClaw control surface for the selected profile.
Install the Python runtime
Python 3.11 or newer is required. Install t4l-server and t4l-agent into the same environment.
For local development:
python3 -m venv .venv
.venv/bin/pip install -e ../t4l-server
.venv/bin/pip install -e '.[dev]'
Run
export T4L_CONNECTOR_RUNTIME_TOKEN='replace-with-a-long-random-secret'
t4l-agent run \
--agent-id main \
--agent-name Atlas \
--agent-profile coach-01 \
--connector-owner-id 'slack:workspace-id:user-id' \
--data-dir /srv/t4l/coach-01 \
--host 127.0.0.1 \
--port 8787
The owner identity is exactly channel:account:sender. Repeat --connector-owner-id for multiple authenticated owner channels.
Use the existing OpenClaw profile and agent id. Optional --agent-home-dir, --agent-state-dir, and --agent-config-path flags point at that runtime. T4L never creates a second agent.
The connector binds to loopback by default. The phone enters the public HTTPS OpenClaw Gateway address, not the loopback connector address. Public binding requires --allow-public-bind and still requires trusted HTTPS.
T4L_SERVER_API_KEY may provide a stable host-only MCP key. Otherwise the process creates one. The phone never receives it.
Phone connection
- The phone enters the Gateway address.
- It creates an Ed25519 key and receives an eight-character pairing code.
- It shows
/t4l connect XXXX-XXXX. - The user sends that command in an authenticated OpenClaw owner channel.
- The plugin forwards only the code and verified owner identity to the loopback connector.
- The phone proves key possession and receives a device-bound token scoped to
chat,sync, andstatus.
There is no post-pair installer, release selection, rollback job, second code, API-key form, or model-driven host setup.
Coach behavior
The coach loop uses the existing OpenClaw agent with no provider, model, reasoning, or delivery override. Every turn uses a fresh isolated session key. It does not send a message through OpenClaw channels; the reviewed reply returns through T4L chat.
Purpose-specific instructions are embedded in the Python package:
core.mdonboarding.mdchat.mdtraining-block.md
The loop loads only the files needed for the current turn.
The phone remains authoritative:
- onboarding produces a pending
athlete_setup_draft.v1; - planning produces a pending
training_block_plan.v1; - the phone explicitly reviews and accepts both;
- the phone chooses the daily workout variant locally;
- agent chat cannot silently rewrite accepted state.
Exercise videos must be exact YouTube Shorts for the selected exercise. The host verifies the URL and live title before storing a plan.
The coach is training-and-recovery only. Nutrition, hydration, supplement, weight, and body-composition prescriptions are blocked before and after model execution.
Development
.venv/bin/ruff format --check .
.venv/bin/ruff check .
.venv/bin/mypy
.venv/bin/pytest -q
cd openclaw_plugins/t4l-connect
npm test
npm pack --dry-run
The tests use runtime fakes. Before production, also run one live OpenClaw smoke test for:
- runtime readiness;
- non-delivering coach execution;
- owner and non-owner pairing commands;
- the Gateway HTTPS proxy;
- a complete phone pairing and training-block review round trip.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file t4l_agent-0.3.2.tar.gz.
File metadata
- Download URL: t4l_agent-0.3.2.tar.gz
- Upload date:
- Size: 60.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19d5065d999dad5fc6de1092af575cdf57f029497bfccbfbdbb43a478afc6081
|
|
| MD5 |
6c43964639c9868f04cdba046bcc49f3
|
|
| BLAKE2b-256 |
2b1804e36542fafa52b38bf29cffb6523febc0aefe48f348c313ebd58a40b088
|
Provenance
The following attestation bundles were made for t4l_agent-0.3.2.tar.gz:
Publisher:
publish.yml on BigSlikTobi/t4l-agent
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
t4l_agent-0.3.2.tar.gz -
Subject digest:
19d5065d999dad5fc6de1092af575cdf57f029497bfccbfbdbb43a478afc6081 - Sigstore transparency entry: 2573341406
- Sigstore integration time:
-
Permalink:
BigSlikTobi/t4l-agent@9d241daa67f841e2b65852bd5a288db3d6f39c95 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/BigSlikTobi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9d241daa67f841e2b65852bd5a288db3d6f39c95 -
Trigger Event:
push
-
Statement type:
File details
Details for the file t4l_agent-0.3.2-py3-none-any.whl.
File metadata
- Download URL: t4l_agent-0.3.2-py3-none-any.whl
- Upload date:
- Size: 45.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44c752654a8ae5bd557dc390458ebac7b02152cd2afd52b71dbd877ce5ad20f1
|
|
| MD5 |
2ce98fe5d83127b9a373c05f0c450161
|
|
| BLAKE2b-256 |
601dc33f265757c5951d5586a6902ac557e51701ccd840e10b9f7b1b81d03bbc
|
Provenance
The following attestation bundles were made for t4l_agent-0.3.2-py3-none-any.whl:
Publisher:
publish.yml on BigSlikTobi/t4l-agent
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
t4l_agent-0.3.2-py3-none-any.whl -
Subject digest:
44c752654a8ae5bd557dc390458ebac7b02152cd2afd52b71dbd877ce5ad20f1 - Sigstore transparency entry: 2573342121
- Sigstore integration time:
-
Permalink:
BigSlikTobi/t4l-agent@9d241daa67f841e2b65852bd5a288db3d6f39c95 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/BigSlikTobi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9d241daa67f841e2b65852bd5a288db3d6f39c95 -
Trigger Event:
push
-
Statement type: