Skip to content

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

@srtaalej

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

fromslack_boltimportApp, BoltAgentapp=App(token=os.environ["SLACK_BOT_TOKEN"])
@app.event("app_mention")defhandle_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.

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

codecovBot commented Feb 16, 2026

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.

@zimegzimeg 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.

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

Comment threadslack_bolt/agent/async_agent.py Outdated
Comment threadslack_bolt/agent/async_agent.py Outdated
Comment threadslack_bolt/agent/async_agent.py Outdated
@zimeg

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
srtaalej marked this pull request as ready for review February 17, 2026 16:29
@srtaalej
srtaalej requested a review from a team as a code ownerFebruary 17, 2026 16:29
srtaalejand 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>
@srtaalej

Copy link
Copy Markdown
ContributorAuthor

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

@mwbrooksmwbrooks 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.

✅ 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!

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.

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
ContributorAuthor

Choose a reason for hiding this comment

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

i like this idea ⭐ working on it 🫡

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

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.

@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
srtaalej merged commit cd52d19 into mainFeb 17, 2026
15 checks passed
@srtaalej
srtaalej deleted the feat-agent-set-status branch February 17, 2026 18:36
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancementNew feature or requestexperimentExperimental feature documented with ExperimentalWarning and pydoc Experiment sectionsemver:patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@srtaalej@zimeg@mwbrooks