Skip to main content
Watch mode lets a Slack-connected agent read channel messages without waiting for a mention. The agent decides from context whether to reply or stay silent.
Managed Deep Agents is in public beta on LangSmith Cloud and Bring Your Own Cloud (BYOC). Use Managed Deep Agents CLI and SDK v0.10 or later for BYOC.
This Python example requires managed-deepagents>=0.10.4 and the matching mda CLI.
Mock Slack channel #ops-deploys showing Watch Agent staying silent on casual chatter, silently scheduling a 15-minute check-in after a deploy message, and posting a latency check reply in the thread. Mock Slack channel #ops-deploys showing Watch Agent staying silent on casual chatter, silently scheduling a 15-minute check-in after a deploy message, and posting a latency check reply in the thread.

Configure the Slack channel

Start with a project that has a Slack channel and update its declaration:
channels/slack.py
Every message in channels the bot belongs to starts a run, and each run incurs usage. Turning off reactions and working status keeps the agent quiet when it chooses not to reply.

Write the instructions

Add to instructions.md:
instructions.md
An exact [quiet] response posts nothing. Deploy the agent and invite it to a channel. Send a message that needs no reply and a message that mentions the agent, then confirm only the mention gets a reply.

Add check-ins

To let the agent follow up later, add a custom tool that schedules a one-time check-in in the current thread.
tools/watch.py
Register the tool:
agent.py
Add to instructions.md:
instructions.md
For example, if someone says a fix is rolling out, the agent can schedule a check-in for 15 minutes later. Check-ins run as the agent and see only messages already delivered to its thread.

Extend the pattern

  • Filter messages before a run starts by returning None from an on_event "message" handler on channels.slack(...) to cut usage in busy channels.
  • Add a Slack history tool so check-ins can read the latest replies in the thread.
  • Track a thread across multiple check-ins by letting each check-in schedule the next, with tools to list and delete pending checks when done.

See also

  • Slack: set up the Slack app and configure channel triggers.
  • Schedules: create and manage runtime schedules.
  • Instructions: configure the agent’s behavior.