Docker log gateway for pi agents — tail complete raw logs from Docker containers using the docker CLI. Works with the wrok.in AI Factory.
For label-filtered structured logs (by agent/service), use pi-loki-gate.
pi install npm:@bytesbrains/pi-docker-logsAdd a .dockerlogs.yml to your repo root:
tail: 200| Key | Default | Description |
|---|---|---|
tail |
200 |
Default number of log lines to tail |
List running factory containers.
docker_container_list()
Fetch complete logs from a factory worker container. Captures all output (console.log + structured JSON).
docker_worker_logs(worker="1")
docker_worker_logs(worker="2", tail=500, search="error")
docker_worker_logs(worker="3", since="30m")
Fetch complete logs from any Docker container.
docker_container_logs(container="ai-factory-orchestrator")
docker_container_logs(container="ai-factory-worker-1", search="exit=")
docker_container_logs(container="ai-factory-gitea", tail=100, since="1h")
| Docker Logs | Loki | |
|---|---|---|
| Captures | All stdout/stderr | Structured JSON only |
| Per-container | ✅ | ❌ |
| Label filtering | ❌ (text search) | ✅ (agent, service) |
| Best for | Complete job output, console messages | Service/agent exploration, error patterns |
- Docker CLI (
docker) must be installed and on PATH - Current user must have Docker socket access
MIT
Built and maintained by BytesBrains — AI automation & agents, engineered to production standards. The model proposes, code guarantees.