Skip to content

Commit a3bfd75

Browse files
Poll agent inboxes every 30 seconds (#228)
* Poll agent inboxes every 30 seconds * Reload changed mail timer schedules --------- Co-authored-by: Anthony Ettinger <anthony@profullstack.com>
1 parent 0f6b983 commit a3bfd75

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

‎dev2/agents/README.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ mode; authenticated instructions from Anthony enter that user's `agent-llm <agen
55
Task state stays in the agent's home and results return to the originating QryptChat conversation.
66

77
Each agent has a separately scoped group.call worker key, private phone settings, and an email
8-
poller running under that agent's UID. Email actions require the trusted Anthony DMARC verdict;
9-
the shared claim directory prevents forwarded copies from triggering duplicate work. Mailbox
10-
credentials, QryptChat sessions, model logins, and task state stay in their owner's home.
8+
poller running under that agent's UID. Inbox pollers check every 30 seconds and baseline the
9+
current inbox on first run, so old mail is not queued. Email actions require the trusted Anthony
10+
DMARC verdict; the shared claim directory prevents forwarded copies from triggering duplicate
11+
work. Mailbox credentials, QryptChat sessions, model logins, and task state stay in their owner's
12+
home.
1113

1214
On dev2, deploy the CLI package and its production dependencies to `/opt/riotcoder-cli`, give each
1315
ready agent a private `agent-llm.json`, QryptChat session, model login, and one-account

‎dev2/agents/install-agent-runners.sh‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,12 @@ EOF
113113

114114
cat > "/etc/systemd/system/agent-mail-poll-$agent.timer" <<EOF
115115
[Unit]
116-
Description=Poll $agent's inbox every five minutes
116+
Description=Poll $agent's inbox every 30 seconds
117117
118118
[Timer]
119-
OnCalendar=*-*-* *:0/5:00
120-
AccuracySec=30s
121-
Persistent=true
119+
OnBootSec=30s
120+
OnUnitActiveSec=30s
121+
AccuracySec=1s
122122
123123
[Install]
124124
WantedBy=timers.target
@@ -130,6 +130,7 @@ done
130130
systemctl daemon-reload
131131
for agent in "${ready[@]}"; do
132132
systemctl enable --now "agent-mail-poll-$agent.timer" >/dev/null
133+
systemctl restart "agent-mail-poll-$agent.timer" >/dev/null
133134
done
134135
printf 'Installed contact runners for: %s\n' "${ready[*]:-(none)}"
135136
if [ "${#skipped[@]}" -gt 0 ]; then

0 commit comments

Comments
 (0)