# x-digest: a morning digest of the X accounts you follow

A Hermes profile. It reads a short list of X accounts a few times a day, picks the posts worth your time, and appends them to a dated note. Private model on Venice: Venice keeps no prompt or reply on private models. That is their retention policy, not a proof, and the key tells them which seat paid.

## what it uses

- Agent: Hermes 0.21.5 or newer, with the quotum provider plugin (source at https://github.com/qvotvm/hermes-quotum, MIT).
- Model: `deepseek-v4-pro`, a private model on Venice.
- Skills:
  - `x-research` reads the list through twitterapi.io, one request per account.
  - `memory-index` appends one section per run to `~/notes/x-digest/x-digest-<date>.md`.
- Schedule: digests at 06:00, 12:00 and 16:00 UTC, then a notes run at 19:55 UTC.
- Keys:
  - `QUOTUM_SEAT_KEY`: a quotum seat key, or a day key cut from a seat.
  - `TWITTER_API_KEY`: from twitterapi.io.
  - `TELEGRAM_BOT_TOKEN` and `TELEGRAM_HOME_CHANNEL`: optional, to get each run on your phone.

## measured cost

These are numbers from one real run on quotum seat 1, a profile identical to this one apart from its own watchlist.

The run on 01.10 at 22:32 UTC:
- read 57 posts from 24 accounts over a 2.6 hour window.
- used 135,296 prompt tokens, 123,904 of them cached, and 4,275 completion tokens, over 7 model calls.
- cost $0.074 at Venice list prices, the same amount the quotum keeper metered on the key.

Expect four runs a day to cost well under $0.50. The full day's figure is published after the 19:55 UTC run.

Cost grows with the number of accounts and posts on your list. twitterapi.io credits are billed separately.

## install

```bash
hermes plugins install qvotvm/hermes-quotum --enable
hermes profile install ./morning-digest -y
cp ~/.hermes/profiles/x-digest/.env.EXAMPLE ~/.hermes/profiles/x-digest/.env
chmod 600 ~/.hermes/profiles/x-digest/.env        # fill in QUOTUM_SEAT_KEY and TWITTER_API_KEY
cp ./morning-digest/watchlist.json ~/.hermes/profiles/x-digest/watchlist.json   # then edit: your accounts
hermes -p x-digest -z "Run the X digest for the last 6 hours." -s x-research,memory-index
```

The jobs in `cron/jobs.json` fire from a Hermes gateway (`hermes -p x-digest gateway`). Without a gateway, run the one-shot line from cron or launchd.

## get it on your phone

The jobs send each run's section to Telegram when two values are set. The note on disk is written either way.

1. In Telegram, message @BotFather, send `/newbot` and pick a name. It replies with a token.
2. Open a chat with your new bot and press Start. A bot cannot write to you first.
3. Message @userinfobot. It replies with your numeric id, which is the chat id of your chat with the bot.
4. In `~/.hermes/profiles/x-digest/.env`, set `TELEGRAM_BOT_TOKEN` to the token and `TELEGRAM_HOME_CHANNEL` to the id.
5. Start the gateway: `hermes -p x-digest gateway`, or `hermes -p x-digest gateway install` to keep it running in the background.

If a run logs `python-telegram-bot not installed`, add it to Hermes once: `~/.hermes/hermes-agent/venv/bin/python -m pip install "python-telegram-bot[webhooks]==22.6"`. On 02.10 our cron run hit this on Hermes 0.15.1. After the install, `hermes -p x-digest send --to telegram` delivered.

No gateway: `hermes -p x-digest cron tick` from cron or launchd, once a minute, fires the jobs that are due and sends them the same way. The one-shot line above does not send.

The bot only posts. A message to it gets a pairing code back, and nothing runs until you approve that code.

## what is in it

- `SOUL.md`: the agent's rules.
  - Report only what the reader returned.
  - Print links exactly as the reader printed them.
  - Write to one file.
- `config.yaml`: the model and its settings.
  - The quotum provider, so `hermes usage` shows the seat's cap, spend, what is left and the 20:00 UTC bell.
  - Tools limited to terminal and file.
  - Memory and compression off.
  - Every call, auxiliary ones included, on the same key.
  - Runs sent to Telegram as written, without Hermes's header and footer.
- `skills/x-research/scripts/xwatch.mjs`: the reader, about 30 lines of Node.

## where it connects

The setup's own calls go to three hosts, four with Telegram on:
- `api.venice.ai`, for the model.
- `quotum.org`, for the seat's meter. The plugin sends a short hash of the key, never the key itself or a prompt.
- `api.twitterapi.io`, for the reader script.
- `api.telegram.org`, for delivery, only when the two Telegram values are set. A running gateway keeps a connection open there to poll the bot.

With Telegram on, the gateway also looks up `api.telegram.org` through `dns.google` and `cloudflare-dns.com` when it connects, to keep spare addresses in case the direct route fails.

In a check on 02.10 we watched one Hermes call with `lsof`, sampled every half second. The agent's only outbound connections went to `api.venice.ai`. That check was made before the quotum plugin, which adds the meter call to `quotum.org`. Sampling can miss a very short connection. That check was made without Telegram, and we have not watched the Telegram path the same way.

We have not audited Hermes itself (updates, other features). To be sure, run it behind your own firewall and watch the hosts.

No keys ship in this folder.
