Workbot: Your agent
Generally available:
workbotProactiveis retired; its enabled behavior is standard on Cloud and self-hosted. Actual settings, permissions, billing rules and consent remain enforced. Rollout/off-state instructions below are historical; see the retirement guide.
Feature workbotProactive (cloud and self-hosted, off by default). Author: benjaminshafii.
It also needs Workbot on the deployment (DEN_WORKBOT_URL), the headless runner (DEN_HEADLESS_RUNNER_URL) and, for
the default destination, the Workbot Slack app (Slack assistant) installed for the organization.
Every member gets one persistent background agent, "Your agent", running in the cloud on the standard headless runner. With no events at all it is still useful: a morning pass, then a check about every three hours inside working hours, reading the member's sources since its last look: their calendar (Google or Microsoft, whichever they connected) and any connection they turned on, such as Slack. Calendar events only wake it sooner. It sends one short message when something needs the member, and stays quiet otherwise. It only reads: it never sends, accepts or edits anything for them.
Your agent's brief and check rhythm is now standard on Cloud and self-hosted. The agent checks on a fixed rhythm and follows the organization's brief plus each member's own lines. The older schedule, preset responsibilities and calendar wake design below are retained as historical context.
Architecture
wake: schedule (morning + ~3h) ─┐
calendar event (5-min diff)┴▶ one turn in the agent's own session ─▶ NO_REPLY | {message, items}
│
delivery step in Den (plain code) ◀──────┘
quiet hours · snooze · mutes · one message per item · daily limit
│
a DM from the Workbot Slack app, to the member only ◀┘
- Wake (
den-api/src/workbot-proactive/worker.ts). A Den loop claims agents whosenext_wake_atis due, with a row lease, so replicas never run one agent twice.next_wake_atis the earlier of the next scheduled pass and the next calendar look. Only the schedule and calendar events wake an agent; the model never schedules its own. - Gates (
wake.ts). Feature (with member overrides), Workbot deployed, the organization switch, the member's own on/off and snooze, a destination that can arrive (for a Workbot DM: the Slack app installed and the member's Slack account linked), at least one active responsibility, working days and hours in the member's calendar time zone. A blocked destination skips the turn and is shown in the member's settings, so no model call is wasted. - Event source (pure,
@openwork/automations/proactive). One read-onlyevents.listas the member every five minutes, diffed against a checkpoint: a meeting with people from outside the company inside the lead time, or a meeting today or tomorrow someone else added, moved or cancelled. Each event wakes the agent once. The prompt names the event by id, time and attendee counts only: titles, descriptions and organizer names are written by whoever sent the invite, so the agent reads them itself, as data, with its tools. - Sources (
sources.ts). Before a turn, Den resolves the member's sources: the admin's policy per source, the member's own choices, and whether their account on each connection is ready (a database read, no provider call). A source that is on but can't be read gets one DM with the single action that fixes it ("Reconnect Google Workspace", linking to the connection in the Library), is paused, and is told again only after it worked once more (state.notices). With nothing readable no turn runs. - The turn (
turn.ts). The agent's own durable session (hs_agent_<hash>), never the member's Workbot chat and nevermemoryOfit. Standard runner tools only, plus Connect tools with a read-scoped MCP token (mcp:read) that carries the turn's read allowlist (see Safety). Notcredentials.readOnly, which would remove the file tools, so the agent keeps its notes inmemory/. Den starts each turn with a short prompt: why it woke, each source it may read with the member's instruction for it and when it was last read ("since last look" per source), what is on but unreadable, and the presets. The default answer isNO_REPLY; anything unparsable is silence. - Delivery step (
wake.ts, pure rules indecideAgentDelivery). Quiet hours, snooze, the sources it read (an item from anywhere else is dropped), presets that are off or muted, the ledger (one message per item: source plus the item's id there, such as a Slack permalink, a Gmail thread or a calendar event), and the daily limit. Past the limit, items are recorded ascappedand never retried later. - Deliver (
deliver.ts). Den, not the model, sends after policy, and the model never picks recipients. Always a DM from the Workbot Slack app's own bot:sendWorkbotDirectMessageinslack-assistant/direct-message.tsopens the member's DM with the app and posts there, so Slack notifies them like any DM. It is the shared helper for anything that notifies a member. Never a channel: the agent reads private email, so its messages go only to the member. Text is cleaned first: no@channel/@here/user mentions, and links only to the member's own Google workspace and the sites of the services behind the sources it read, from a fixed list (slack.com, linear.app…).
Enable connected connectors together
On Cloud and self-hosted, members can open My bot → What it reads → Enable all connected apps. This turns on the connected connectors they can choose, skipping any known to have no read-only tools. Members can turn all their optional sources off together, including the calendar when their admin lets them choose. Admins can enable all allowed apps for everyone or turn them off together in the connector policy for Everyone or a team. Bulk enable preserves explicit bans. The workbotEnableAllConnectors rollout switch is retired. Owner: reachjalil.
Sources, not categories
Items are a source and an id there, not one of four categories. The four responsibilities are presets the agent always watches for, plus "anything else worth catching" (a direct ask in chat, a security notice, a decision due tomorrow, something that changed after it told them), which has no preset. Mutes apply to presets.
| Source | Read through | Default policy |
|---|---|---|
| Calendar | Google Calendar or Outlook calendar (Den's Google Workspace and Microsoft 365 connectors). No admin picks the app: each member's agent reads the one they picked, else the one most members connected | On for everyone |
| Any connection whose read tools are reviewed | Slack (DMs to the member, mentions, threads they're in), Linear, Notion, GitHub and Granola today: only their reviewed read tools | Members choose (off until they turn it on) |
Email and team chat are not sources of their own (they were, each on for everyone). Chat is read through the Slack connector. Mail and Teams chats are read through the Google Workspace or Microsoft 365 connector, which is a source under the current brief and connector model. The older policy read Den's own providers for calendar only. An organization that had email or team chat on for everyone follows each connector's setting now.
| Preset | What the member gets | Woken early by |
|---|---|---|
| Morning brief | What today needs from them, at most three points, nothing routine. Morning pass only | The schedule |
| Meeting prep | Before a meeting with people from outside the company: what they asked for or are waiting on, from email and chat | A meeting with outsiders entering the lead time |
| Calendar changes | A meeting today or tomorrow that someone else added, moved or cancelled, and what it changes | The calendar diff |
| Waiting on you | Someone outside the company asked by email or chat more than about 4 hours ago and is still waiting | The schedule |
How it writes
AGENT_INSTRUCTIONS in @openwork/automations/proactive:
- One finding per message; two only if they share a deadline. The morning brief is the exception: three points at most, nothing routine.
- Open with why it matters now ("Worth catching:", "Before 9 AM:", "Decision needed by tomorrow:", "Quick check:"). Never category labels like Today, Waiting on a reply, Still open or FYI.
- Connect the sources: check the calendar before suggesting or endorsing a time, tie a Slack ask to its email thread or meeting, follow the member's instruction per source, and leave out what its notes say they already did.
- Say what was checked and what wasn't ("I haven't verified the amount.").
- End with one concrete next step, or one thing it can actually do. No generic offer to draft replies.
- Link the source with a short label (Slack message, Email thread, Calendar event). Never mention anyone.
- Follow up once when something it told them changes ("Update to yesterday's note: …").
- Plain sentences: no headers, no bold labels, no trivia.
Silence by default (NO_REPLY), the daily limit and quiet hours are unchanged.
Ignored: the member's own changes, declined meetings, all-day events, focus time, out of office, working location, meetings with nobody else, anything after tomorrow.
The template: a versioned agent config object
agent config objects are markdown agent definitions today (Library imports AGENT.md / agents/*.md: frontmatter
with name and description, then the agent's instructions), the OpenCode/Claude agent format. "Your agent" uses that
format and extends the frontmatter (template.ts):
---
name: your-agent
description: Reads each member's calendar and the connections they turn on, on a schedule, and tells them only what needs them.
mode: primary
sources: calendar, connections
responsibilities: morning_brief, meeting_prep, calendar_changes, waiting_on_you
schedule: morning pass, then every 3 hours in working hours
---
<the agent's instructions>
## Organization instructions
<the admin's short text>
The built-in default is version 1 and lives in code. An admin edit (responsibility toggles, organization instructions)
adds a config_object_version to the organization's one "Your agent" object (openwork/agents/your-agent.md). Each
member's agent is a small agent_instance row: the template version it last ran, the member's allowed overrides
(muted responsibilities, destination), status, snooze, next_wake_at, encrypted state and a lease.
Admin settings (Manage › Workbot › Members' agents)
| Setting | Stored in | Default |
|---|---|---|
| Proactive Mode | organization metadata workbot.proactive.enabled |
off |
| Send messages to | workbot.proactive.destination: a DM from Workbot, or nowhere yet (never a channel) |
a DM from Workbot |
| Morning brief, Meeting prep (+ how early), Calendar changes, Waiting on you | the template (meeting lead time in metadata) | all on, 15 min |
| Instructions for every agent | the template | empty |
| Working hours | workingDays, startHour, endHour |
weekdays, 8–19 |
| Daily limit | dailyCap |
3 per person |
| Members start | membersStart |
opted in |
| Calendar (with Workbot's own rows) | sources.calendar: everyone, members or off |
on for everyone |
| Connectors | sources.connections by id, each everyone, members or off |
members choose |
"Calendar" is one row beside Workbot's own settings: On for everyone, Members choose or Not allowed, with the calendar apps in use named under it ("Uses Google Workspace"). "Connectors" lists the connections agents may read, each with On for everyone, Members choose or Not allowed, and the footer "Read only. Agents never send, edit or delete through these." The server enforces it: a member can't turn on what isn't allowed or turn off what is on for everyone, and the turn's token only carries what the policy and the member allow.
The page previews each kind of message as plain text, as the DM from the Workbot app. The switch stays visible but locked, with the reason, when there is nowhere to send messages, when the Slack app is not installed, or when the headless runner is missing (DESIGN.md P4, C5).
Health
Included in workbotProactive; there is no separate health rollout.
Under the settings, a "Last 7 days" table shows per responsibility: checks (passes that asked the agent about it), the
share that stayed quiet, messages sent, and how many members muted it. It reads agent_check, daily counters per
organization and responsibility (migration 0162) that each completed pass adds to, and the members' mutes. Counts
only: no member names, message text or email content. GET /v1/org/workbot-settings/proactive/health.
Member controls
GET /v1/me/agent answers "what will my agent tell me about?": each responsibility with whether the organization
turned it on and whether the member muted it, where messages go, the hours and limit. PUT /v1/me/agent takes plain
choices: on, snooze: "tomorrow" | null, mute / unmute. destination.blocked says why messages can't arrive
yet (slack_app_not_installed, member_not_linked). Both are tagged for Connect, so a member
can say "stop telling me about calendar changes" or "snooze until tomorrow" to Workbot. The agent's own mcp:read
token can read them but never change them. There are no buttons on messages and no Slack Home tab.
The same workbotProactive rollout includes the member's agent view: members see
each check and why it stayed quiet, tell it what they care about in their own words, narrow its hours or limit, and
undo any change, from chat or the My bot page. There is no separate member-library rollout.
With it, My bot's Uses is one switch per source: when it was last read, a "Connect " action when the
member's account isn't ready, sources the admin decided shown locked with the reason (DESIGN.md P4), and an optional
instruction in the member's own words ("Use my meeting notes for context and action items."), shown with where it was
saved ("Saved from chat at 10:42 AM. Edit"). GET /v1/me/agent lists sources; PUT /v1/me/agent takes
sources: [{ source, on?, instruction? }] by id or name, with undo. In chat, "also look at my Granola for context,
especially action items after meetings, and skip Linear" becomes one putMeAgent call and the reply "Saved: Granola on,
for …; Linear off. Reply "undo" to revert." plus a link, a "Connect " line for a source it can't read yet, or the
admin's refusal with who can change it (source_not_allowed, source_locked). Other connections stay off until a
member chooses them, unless the admin sets them on for everyone. The wake prompt carries each instruction as words
the member wrote, never as instructions from content it read.
Where notes live
The agent keeps its notes in its own session's scratch files under memory/ (what it already told the member,
threads it is watching). Den stores only the calendar checkpoint, last looks and schedule. When the shared per-user
filesystem lands, the notes move to /files/agents/<agent>/ and the session reads them from there.
Slack delivery: why a DM from the Workbot app
Connect's Slack connection is Slack's own MCP server (https://mcp.slack.com/mcp, per-member OAuth). Slack's MCP OAuth
issues user tokens only, so slack_send_message posts as the member (Den's Slack binding checks auth.test and
refuses bot tokens). Slack never notifies people about their own messages, so a message posted as the member, even in
their DM with themselves, pings nobody. The default destination is therefore a DM from the Workbot Slack app's own bot
(the Slack assistant's installation and bot token, the member's linked Slack user id):
- A member who never wrote to the app can be DMed:
conversations.openwith the bot token needsim:write, andchat.postMessageneedschat:write; both are in the app's scopes (slack-assistant/protocol.ts), and the manifest has the Messages tab on and writable. - When the member replies in the message's thread, the Slack assistant reads that thread with the member's own
token (
conversations.replies), so Workbot sees what it sent. A new top-level message in the DM starts a new conversation without it. - Without the Slack app, or before the member links their Slack account, nothing runs: the wake is skipped with
slack_app_not_installedormember_not_linked, the admin page shows the lock, andGET /v1/me/agentshows why.
Not live-tested against a Slack workspace; the unit tests cover the calls Den makes.
Safety
- Read-only through MCP, limited to its sources. The turn's token is
mcp:readplus scopes only Den mints (mcp/agent-read-sources.ts): the core sources that are on and the connections behind each readable source. A plainmcp:readtoken never calls a connection's own tools; this one may, but only on those connections and only tools we reviewed as reads, per service (Slack, Linear, Notion, GitHub, Granola), and never one whose name writes. A provider's read-only hints and tool names are never enough, so a service without a reviewed list is not a source at all. Native Google and Microsoft reads are GETs of calendar events while the calendar is on; mail, chats, files, drafts and sites are refused. Search shows the agent only what it may call. A turn resumed from its grant gets the same allowlist (headless_resume_grant.scopes). Den delivers only after the delivery step, with text it cleaned. - Who sees the organization's connections. "Connectors" lists connection names and addresses only for callers with View connections; others see the policy without them.
- Content is data. Calendar wakes name events by id and time; the agent reads titles, emails, chat messages and notes as information from other people, never as instructions. Only the member's own words in the wake steer it.
- Only to the member. Messages are DMs from the Workbot app, never channel posts: an email sender could steer what the agent writes, and private mail must not reach a shared channel. Posting to a channel would need per-message approval first.
- No memory pollution. The agent's reading stays in its own session. Only delivered text leaves it.
- At most once. A ledger row is reserved before sending, so a crash never sends twice. Silence wins on doubt: an unparsable answer, a runner outage or a failed model check mean no message.
- Restraint in code. Working hours, 3 a day by default, one message per item, mutes and snooze.
Turning it off
The kill switch (or the organization switch) stops new wakes on the next tick; a pass already running re-checks the feature right before delivering. Agent rows, sessions and ledger rows stay and are harmless. Turning it back on resumes from the stored state.
Replay evals
evals/scripts/agent-replay/ replays recorded timelines (calendar, Gmail and Slack as Connect returns them, fictional
people on .example domains) against a real model with the agent's real instructions, wake prompt and reply parser,
and scores each run: message or stay quiet, the sources its items name, what the message must connect, and the
writing rules above. Timelines: a customer's Slack ask for pricing before their 11 AM call; a quiet afternoon; a time
proposed by email that collides with the calendar; a Slack ask already answered; a meeting it flagged yesterday that
was cancelled.
OPENAI_API_KEY=… pnpm --dir evals agent:replay --runs 3
AI_GATEWAY_API_KEY=… OPENWORK_AGENT_REPLAY_MODEL=openai/gpt-5.4 pnpm --dir evals agent:replay
The harness's own tests (harness.test.ts, a scripted model) run with the evals unit tests in CI.
What it does not do yet
- Replays against the headless runner itself (the evals call the model directly with the same tools' answers).
- Other services as sources (Plain, HubSpot…) once their read tools are reviewed, or an admin-approved list of read tools per connection.
- Follow-ups ("remind me", "tell me when"): no
schedule_waketool yet. With the current brief, the agent's own check can ask for an extra check (request_check), capped and inside the member's hours. - Copying delivered text into the member's Workbot conversation.
- Desktop notifications as a destination.
- Telling Slack from Workbot web in "Saved from chat".
Try it locally
pnpm dev:den:mysql && pnpm dev:workbot
# /admin › Features › Workbot: Your agent › on for your organization
# Connectors › Slack › install the Workbot Slack app, then Den › Manage › Workbot › Members' agents
pnpm --filter @openwork/automations test and pnpm --filter @openwork-ee/den-api test cover the schedule, event
source, prompt, reply parsing, delivery rules, sources and their failures, the turn's session and token, and delivery
without a runner, Slack or Google. test/api/workbot-agent-sources.api.test.ts covers the admin's policy, a member's
sources from chat and the page, and Connect's read allowlist against a fake MCP service.
evals/proofs/workbot-proactive-settings.proof.test.ts drives the admin page; workbot-agent-sources.proof.test.ts
drives Calendar, "Connectors" and My bot's Uses.
Screenshots
Off, locked until the Workbot Slack app is installed (real Den, workbotProactiveWorld):
On, sending a DM from Workbot, with the template at version 3 and the meeting prep preview:
What agents read, with the wiki not allowed (workbot-agent-sources.proof.test.ts):
My bot › Uses after "also look at my Granola for context, especially action items after meetings, and skip Linear" in chat:





