@@ -52,14 +52,25 @@ channels:
5252 telegram :
5353 allow_from : ["123456789"] # STABLE user ids (not @handles); "*" = anyone
5454 # respond_to_all: true # act on every message in a group (default: mention required)
55+ # tier: strong # route this channel to a stronger model (strong|frontier)
5556 github :
5657 reply_to : " telegram:123456789" # where CI-failure results are posted
5758 whatsapp :
5859 phone_number_id : " 10012345"
5960 active : false # stays inert until Meta verification
6061 allow_from : ["+15555550123"]
62+ schedules :
63+ - name : standup
64+ cron : " 0 9 * * 1-5" # or every: "24h"
65+ task : " Summarize yesterday's commits and open PRs"
66+ deliver_to : " telegram:123456789"
6167` ` `
6268
69+ Conversations are **stateful**: each ` (channel, conversation)` keeps its own agent
70+ session, so follow-up messages continue with context instead of starting fresh.
71+ Per-channel `tier` routes a channel to a stronger model (a code-review channel can
72+ run strong while a status channel stays cheap).
73+
6374# # Authorization and triggering
6475
6576Two independent checks gate a chat message, matching what Hermes and OpenClaw do :
@@ -92,6 +103,13 @@ default locations when no path is given. Anything it can't carry automatically
92103unsupported channels, WhatsApp's non-transferable QR session) is reported as a
93104note — never silently dropped.
94105
106+ # # Schedules
107+
108+ The gateway isn't only reactive. A `schedules:` entry runs a task on a cadence
109+ (`every : " 24h" ` or a ` cron:` expression) and posts the result to a chat
110+ conversation. Each fire flows through the same durable inbox and reply path as a
111+ chat message, so scheduled work is autonomous but just as reliable.
112+
95113# # Run
96114
97115```
@@ -100,6 +118,18 @@ memcode gateway
100118
101119in the project the agent should operate in. It runs until interrupted (Ctrl-C).
102120
121+ ### As a background service
122+
123+ To keep it running across logout/reboot instead of a foreground terminal:
124+
125+ ```
126+ memcode gateway install
127+ ```
128+
129+ This writes a launchd LaunchAgent (macOS) or systemd `--user` unit (Linux) that
130+ runs the gateway in the current project, and prints the command to start it.
131+ `memcode gateway uninstall` removes it.
132+
103133Chat channels connect outbound (no public URL needed). GitHub and WhatsApp are
104134inbound webhooks served on `:8787` by default (`webhook.addr`); expose that
105135endpoint over HTTPS (a tunnel in local dev) and point the platform's webhook at
0 commit comments