FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: add agent set status to BoltAgent by srtaalej · Pull Request #1441 · slackapi/bolt-python · GitHub

feat: add agent set status to BoltAgent - #1441

Merged
srtaalej merged 4 commits into
mainfrom
feat-agent-set-status
Feb 17, 2026
Merged

feat: add agent set status to BoltAgent#1441
srtaalej merged 4 commits into
mainfrom
feat-agent-set-status

Conversation

Copy link
Copy Markdown
Contributor

Summary

Add set_status() to BoltAgent and AsyncBoltAgent for setting assistant thread status directly from the agent listener argument

Testing

  from slack_bolt import App, BoltAgent

  app = App(token=os.environ["SLACK_BOT_TOKEN"])

  @app.event("app_mention")
  def handle_mention(agent: BoltAgent):
      agent.set_status(status="Thinking...")
      # ... do work ...
      stream = agent.chat_stream()
      stream.append(markdown_text="Hello!")
      stream.stop()

Category

  • slack_bolt.App and/or its core components
  • slack_bolt.Agent and/or its core components
  • slack_bolt.async_app.AsyncApp and/or its core components
  • Adapters in slack_bolt.adapter
  • Document pages under /docs
  • Others

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run ./scripts/install_all_and_run_tests.sh after making the changes.

srtaalej self-assigned this Feb 16, 2026
srtaalej added enhancement New feature or request semver:minor experiment Experimental feature documented with ExperimentalWarning and pydoc Experiment section labels Feb 16, 2026

codecov Bot commented Feb 16, 2026
edited
Loading

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.64%. Comparing base (1ad642e) to head (d9937dc).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1441   +/-   ##
=======================================
  Coverage   90.64%   90.64%           
=======================================
  Files         226      226           
  Lines        7182     7187    +5     
=======================================
+ Hits         6510     6515    +5     
  Misses        672      672           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

zimeg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@srtaalej LGTM! A few changes needed for async typecheckings but this is awesome to find 🤖 ✨

Comment thread slack_bolt/agent/async_agent.py Outdated
Comment thread slack_bolt/agent/async_agent.py Outdated
Comment thread slack_bolt/agent/async_agent.py Outdated

zimeg commented Feb 16, 2026

Copy link
Copy Markdown
Member

@srtaalej I also changed the semver tag to be patch! For "experiments" we're planning to release these all under patch versions to avoid signaling more meaningful or stable updates 🐭

srtaalej marked this pull request as ready for review February 17, 2026 16:29
srtaalej requested a review from a team as a code owner February 17, 2026 16:29
srtaalej and others added 3 commits February 17, 2026 11:29
Co-authored-by: Eden Zimbelman <eden.zimbelman@salesforce.com>
Co-authored-by: Eden Zimbelman <eden.zimbelman@salesforce.com>
Co-authored-by: Eden Zimbelman <eden.zimbelman@salesforce.com>

Copy link
Copy Markdown
Contributor Author

tyty @zimeg for speedy reviews and semver updates 🌠 excited to get this one merged 😁

mwbrooks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

✅ Great work @srtaalej!

🧪 I haven't manually tested this. Just want to check that one of you have already done it before we merge?

✏️ I left a minor suggestion, I think it's worth a discussion, but we can do it in a 2nd PR!

Comment thread slack_bolt/agent/agent.py
channel_id=channel or self._channel_id, # type: ignore[arg-type]
thread_ts=thread_ts or self._thread_ts, # type: ignore[arg-type]
status=status,
loading_messages=loading_messages,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

suggestion(non-blocking): This can be a follow-up PR (probably better if it is). I think it would be really nice if Bolt provided sensible defaults.

  • status: "Thinking..." when no status is provided
  • loading_messages:: a list of 5 fun, witty loading messages that are used when no loading messages are provided

This function is called a lot. So, it'll be nice if developers can start with agent.set_status() and have a solid experience out of the box. Then customize it later.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

i like this idea ⭐ working on it 🫡

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

oh and yes i tested using the bolt-python-assistant-template 🚀

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@mwbrooks @srtaalej IIRC the backend has a few default loading messages if none are provided:

  • Processing...
  • Finding answers...
  • Generating responses...
  • Analyzing...
  • Putting it al together...
  • Searching...
  • Evaluating...
  • Summarizing findings...
  • Organizing...
  • Gathering information...

srtaalej merged commit cd52d19 into main Feb 17, 2026
15 checks passed
srtaalej deleted the feat-agent-set-status branch February 17, 2026 18:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request experiment Experimental feature documented with ExperimentalWarning and pydoc Experiment section semver:patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL