Skip to content

feat: add agent set status to BoltAgent#1441

Draft
srtaalej wants to merge 1 commit intomainfrom
feat-agent-set-status
Draft

feat: add agent set status to BoltAgent#1441
srtaalej wants to merge 1 commit intomainfrom
feat-agent-set-status

Conversation

@srtaalej
Copy link
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 srtaalej self-assigned this Feb 16, 2026
@srtaalej srtaalej added enhancement New feature or request semver:minor experiment Experimental feature documented with ExperimentalWarning and pydoc Experiment section labels Feb 16, 2026
@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.65%. Comparing base (1ad642e) to head (a9566a9).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1441   +/-   ##
=======================================
  Coverage   90.64%   90.65%           
=======================================
  Files         226      226           
  Lines        7182     7188    +6     
=======================================
+ Hits         6510     6516    +6     
  Misses        672      672           

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

Copy link
Member

@zimeg zimeg left a comment

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 on lines +3 to 4
from slack_sdk.web import SlackResponse
from slack_sdk.web.async_client import AsyncWebClient
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
from slack_sdk.web import SlackResponse
from slack_sdk.web.async_client import AsyncWebClient
from slack_sdk.web.async_client import AsyncSlackResponse, AsyncWebClient

channel: Optional[str] = None,
thread_ts: Optional[str] = None,
**kwargs,
) -> SlackResponse:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
) -> SlackResponse:
) -> AsyncSlackResponse:

**kwargs: Additional arguments passed to ``AsyncWebClient.assistant_threads_setStatus()``.

Returns:
``SlackResponse`` from the API call.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
``SlackResponse`` from the API call.
``AsyncSlackResponse`` from the API call.

@zimeg
Copy link
Member

zimeg commented Feb 16, 2026

@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 🐭

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.

2 participants