Bog Agents Daemon
The patient watcher. Wakes itself. Pass through in harmony.
Quiet ambient runner for bog-agents.
Schedules. File watches. Inbound webhooks. Git pushes. Sits in the
background, fires the agent when something happens, writes the result
wherever you point it.
No terminal needed. No hand-holding. It keeps watch through the night and goes the distance.
Why a daemon
The CLI is great when you're at the keyboard. The daemon is what you reach for when you want an agent that watches for you — and reports back when something matters.
- Five trigger types:
cron,interval,file_change,webhook,git_push. - Seven output targets:
log,stdout,file,slack,webhook,email,github_comment. - Auth + integrity: token-authenticated REST API; HMAC-validated
inbound webhooks; tokens stored with
0o600permissions. - Durable:
os.fsync()-durable job persistence so a hard kill never loses a freshly-created job. - Cross-platform: systemd (Linux) / launchd (macOS) service install via
bog-agents daemon install, or justbog-agents-daemon runin a shell on any platform (Windows included). Same config either way.
If the CLI passes through in harmony, the daemon is what keeps watch through the night.
Install
pip install bog-agents-daemon
Pulls in bog-agents automatically.
Add provider extras you need:
pip install "bog-agents-daemon[anthropic]"
pip install "bog-agents-daemon[openai]"
pip install "bog-agents-daemon[bedrock]"
30-second tour
Start the daemon (foreground for a quick test):
bog-agents-daemon run --port 7878
Add a job that runs every weekday morning:
bog-agents daemon jobs create \
--name morning-brief \
--cron "0 9 * * 1-5" \
--prompt "Summarize what changed in this repo since yesterday." \
--output slack --output-slack "$SLACK_WEBHOOK_URL"
The job persists to ~/.bog-agents/daemon/jobs.json. The scheduler picks it
up on the next tick and fires it on the configured cadence.
Triggers
# A cron job
triggers:
- type: cron
cron: "0 9 * * 1-5" # 9am Mon–Fri
# An interval
triggers:
- type: interval
interval_seconds: 1800 # every 30 min
# A file watcher
triggers:
- type: file_change
watch_dir: src
watch_patterns: ["**/*.py"]
debounce_seconds: 5
# An inbound webhook (HMAC-validated when a secret is set)
triggers:
- type: webhook
webhook_path: /hooks/incident
webhook_secret: "<shared secret for X-Hub-Signature-256>"
# A git push (fired by the post-receive hook that
# `bog-agents daemon install-git-hook <repo>` installs)
triggers:
- type: git_push
git_branch_pattern: main
A job can have multiple triggers. The agent fires on any of them.
Outputs
Where the result of an agent run goes. Configure one or many:
outputs:
- target: log # systemd journal / stderr
- target: file
file_path: ~/.bog-agents/runs/morning-brief.md
append: true
- target: slack
slack_webhook_url: https://hooks.slack.com/services/T000/B000/XXXX
slack_channel: "#engineering" # optional override
- target: webhook
webhook_url: https://hooks.example.com/agent-output
webhook_headers: { X-Source: bog-agents } # optional extra headers
- target: email
to_addrs: [oncall@example.com]
from_addr: bog-agents@example.com
smtp_host: smtp.example.com
smtp_port: 587 # 587=STARTTLS, 465=SSL, 25=plain
smtp_username: bog
smtp_password: "<password>" # persisted to jobs.json (owner-only)
- target: github_comment
github_repo: example/api
github_issue_or_pr: 1234
github_token: "<token>"
REST API
Once the daemon is running, you've got a small authenticated REST API for managing jobs:
| Endpoint | Method | What |
|---|---|---|
/jobs |
GET | List all jobs |
/jobs |
POST | Create a job |
/jobs/{id} |
GET | Job detail |
/jobs/{id} |
DELETE | Delete a job |
/jobs/{id}/runs |
GET | Run history |
/jobs/{id}/run |
POST | Fire the job manually |
/health |
GET | Liveness probe |
/metrics |
GET | Counter snapshot |
Every endpoint requires Authorization: Bearer <daemon_token>. The token
is generated on first start, stored at ~/.bog-agents/daemon/.token
with 0o600 permissions, and printed once to the foreground log so you
can copy it.
Running as a service
The bog-agents-daemon binary itself only knows start (alias run),
stop, and status. The service installer ships with the
bog-agents-cli package
(pip install bog-agents-cli):
bog-agents daemon install # auto-detects systemd (Linux) / launchd (macOS)
bog-agents daemon install --platform systemd # or force a specific init system
systemd (Linux)
bog-agents daemon install writes a user unit to
~/.config/systemd/user/bog-agents-daemon.service and prints the follow-up
commands:
systemctl --user daemon-reload
systemctl --user enable bog-agents-daemon
systemctl --user start bog-agents-daemon
systemctl --user status bog-agents-daemon
macOS launchd
bog-agents daemon install --platform launchd writes
~/Library/LaunchAgents/com.bogware.bog-agents-daemon.plist and prints the
load command:
launchctl load ~/Library/LaunchAgents/com.bogware.bog-agents-daemon.plist
launchctl list com.bogware.bog-agents-daemon
Windows
There is no Windows service installer yet. Run the daemon in a shell
(bog-agents-daemon run) or launch it in the background from the CLI
(bog-agents daemon start). If you want it to start at logon, point a Task
Scheduler task at the bog-agents-daemon executable yourself.
Security model
- Token-authenticated API. Every request needs
Authorization: Bearer. Tokens generated withsecrets.token_urlsafe, compared withhmac.compare_digest, stored at0o600. - HMAC-validated inbound webhooks. A webhook trigger configured with a
webhook_secretrequires a validX-Hub-Signature-256header (HMAC-SHA256 of the raw body) on every request. - Secrets stored owner-only. Provider API keys are read from env vars
and never persisted. Secrets that live inside job configs (SMTP
passwords, GitHub tokens, webhook HMAC secrets) are persisted to
~/.bog-agents/daemon/jobs.json, which — like the API token — is restricted to owner-only permissions (POSIX0o600/ Windows ACL). - Resource limits. Configurable per-job CPU / memory / wall-clock caps via the same FeatureConfig shape as the SDK.
What's new in 0.9.x
The daemon rides the synchronized monorepo version, so it inherits every SDK hardening as it lands.
- 0.9.4 — deepagents parity and provider resilience flow up from the SDK: Anthropic, AWS Bedrock, and OpenAI are live-tested, so scheduled jobs survive a provider's bad night.
- 0.9.1 — Bedrock, seamless. Automatic inference-profile resolution and auto SSO-credential refresh mean a long-lived daemon keeps firing Bedrock jobs without a stale-credential outage.
- 0.9.0 — repo-wide security sweep; compliance auditing groundwork.
- Carried forward —
JobRun.dispatch_errorsper-target capture (capped at 20 entries with an(overflow)summary) so a wide-fanout outage shows up in the runs table without blowing up the record JSON; patient-by-default execution (provider retries,stdin=/dev/nullfor interactive commands,virtual_mode=Truefilesystem confinement, structured event logs ready for log shippers).
When to use this vs. /peat in the CLI
| Daemon | /peat |
|
|---|---|---|
| Survives reboot | ✓ | ✗ (only while CLI open) |
| Fires while you're asleep | ✓ | ✗ |
| Webhook / git-push triggers | ✓ | ✗ |
| Slack / email / GitHub-comment outputs | ✓ | ✗ |
| Reuses your interactive agent | ✗ | ✓ |
| Zero ops (no service install) | ✗ | ✓ |
/peat is the right tool when you're at the keyboard and want a personal
assistant for the duration of the session. The daemon is the right tool
when you want an agent that wakes itself.
Documentation
- Full docs: https://github.com/bogware/bog-agents/tree/main/docs — daemon quickstart, security model, troubleshooting
- Repo: https://github.com/bogware/bog-agents
- Issues: https://github.com/bogware/bog-agents/issues
- Changelog:
CHANGELOG.md
License
MIT. See LICENSE.
Pass through in harmony.
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 bog_agents_daemon-0.9.13.tar.gz.
File metadata
- Download URL: bog_agents_daemon-0.9.13.tar.gz
- Upload date:
- Size: 377.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fa06bcb19e77fc75d3f1111e24b691089a62fe535573a06c87473d7d7368dd6
|
|
| MD5 |
7e7cb3674db589a8f7a51827518009de
|
|
| BLAKE2b-256 |
04abd296add519943af488ce0a9e45ece54a964622af88982cb3a44e0deefd69
|
File details
Details for the file bog_agents_daemon-0.9.13-py3-none-any.whl.
File metadata
- Download URL: bog_agents_daemon-0.9.13-py3-none-any.whl
- Upload date:
- Size: 59.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d42fa8c7fdd20c06af5c62985baf4983ef5b72d2757f34c2faaf6cf92fa6d92b
|
|
| MD5 |
49dfefe5bcd22e6fde2e1b941a7d2e66
|
|
| BLAKE2b-256 |
662309be61deefd454b9921ca8223d0747dbc9288edaf17bf3cff6391253dcc5
|