Skip to content

Releases: slackapi/python-slack-sdk

v3.43.0

Choose a tag to compare

@zimeg zimeg released this 30 Jun 18:03
3a5cec2

What's Changed

⚠️ Warning: A signing secret is now required to exist when validating requests. Apps that receive events with Socket Mode should update to Bolt for Python 1.29.0 to avoid errors at initialization. Please refer to this issue: #1903

🚀 Enhancements

  • feat(web): expose public ts property on ChatStream by @srtaalej in #1880
  • feat: make thread_ts optional for assistant.threads.setSuggestedPrompts by @zimeg in #1901

📚 Documentation

🔒 Security

📦 Other changes

  • chore(deps): update aiohttp requirement from <4,>=3.7.3 to >=3.13.5,<4 by @dependabot[bot] in #1867
  • chore(deps): update sqlalchemy requirement from <3,>=1.4 to >=2.0.49,<3 by @dependabot[bot] in #1866
  • Add missing style attribute to RichTextElementParts.Date & friends by @Lexicality in #1882
  • chore(deps): bump codecov/codecov-action from 6.0.0 to 6.0.1 by @dependabot[bot] in #1891
  • chore(deps): bump slackapi/slack-github-action from 3.0.2 to 3.0.3 by @dependabot[bot] in #1892
  • chore(deps): bump actions/checkout from 6.0.2 to 6.0.3 by @dependabot[bot] in #1893
  • chore(deps): bump actions/stale from 10.2.0 to 10.3.0 by @dependabot[bot] in #1890
  • chore(deps): update moto requirement from <6,>=4.0.13 to >=4.2.14,<6 by @dependabot[bot] in #1887
  • chore(deps): update asyncpg requirement from <1,>=0.27 to >=0.31.0,<1 by @dependabot[bot] in #1888
  • chore(deps): bump docutils from 0.22.4 to 0.23 by @dependabot[bot] in #1886
  • chore(deps): update pytest-cov requirement from <8,>=2 to >=7.1.0,<8 by @dependabot[bot] in #1885
  • chore(deps): update flake8 requirement from <8,>=5.0.4 to >=7.3.0,<8 by @dependabot[bot] in #1889
  • docs: audit and fix docs/english markdown files by @lukegalbraithrussell in #1883
  • chore(deps): bump codecov/codecov-action from 6.0.1 to 7.0.0 by @dependabot[bot] in #1894
  • chore(release): version 3.43.0 by @zimeg in #1902

New Contributors

Full Changelog: v3.42.0...v3.43.0
Milestone: https://github.com/slackapi/python-slack-sdk/milestone/119

v3.42.0

Choose a tag to compare

@zimeg zimeg released this 18 May 17:22
4f7eeee

What's Changed

🚀 Enhancements

  • feat: add authorship arguments to assistant threads and chat stream by @zimeg in #1862
  • feat(blocks): add Card, Carousel, and Alert block types by @srtaalej in #1865
  • feat(models): add BlockChunk type to chat.{start,append,stop}Stream methods by @srtaalej in #1872
  • feat: add highlight_type to files.completeUploadExternal and files_upload_v2 by @zimeg in #1875

🐛 Bug Fixes

📚 Documentation

📦 Other changes

  • chore: fix formatting based on new black version by @WilliamBergamin in #1842
  • chore: fix test warnings across test suite by @WilliamBergamin in #1844
  • chore(deps): bump actions/download-artifact from 8.0.0 to 8.0.1 by @dependabot[bot] in #1849
  • chore(deps): bump codecov/codecov-action from 5.5.2 to 6.0.0 by @dependabot[bot] in #1851
  • chore(deps): bump dependabot/fetch-metadata from 2.5.0 to 3.0.0 by @dependabot[bot] in #1852
  • chore(deps): bump slackapi/slack-github-action from 2.1.1 to 3.0.1 by @dependabot[bot] in #1850
  • chore(deps): bump slackapi/slack-github-action from 3.0.1 to 3.0.2 by @dependabot[bot] in #1869
  • chore(deps): bump actions/upload-artifact from 7.0.0 to 7.0.1 by @dependabot[bot] in #1871
  • chore(deps): bump dependabot/fetch-metadata from 3.0.0 to 3.1.0 by @dependabot[bot] in #1868
  • chore(deps): bump pypa/gh-action-pypi-publish from 1.13.0 to 1.14.0 by @dependabot[bot] in #1870
  • chore(release): version 3.42.0 by @zimeg in #1876

New Contributors

Full Changelog: v3.41.0...v3.42.0
Milestone: https://github.com/slackapi/python-slack-sdk/milestone/118?closed=1

v3.41.0

Choose a tag to compare

@WilliamBergamin WilliamBergamin released this 12 Mar 16:09
0c08503

What's Changed

🚀 Enhancements

📦 Other changes

Full Changelog: v3.40.1...v3.41.0
Milestone: https://github.com/slackapi/python-slack-sdk/milestone/117?closed=1

v3.40.1

Choose a tag to compare

@WilliamBergamin WilliamBergamin released this 18 Feb 21:39
f14e689

What's Changed

🐛 Bug Fixes

📦 Other changes

Full Changelog: v3.40.0...v3.40.1
Milestone: https://github.com/slackapi/python-slack-sdk/milestone/116?closed=1

v3.40.0

Choose a tag to compare

@zimeg zimeg released this 10 Feb 22:09
8b0bd0b

Agent Thinking Steps: Display Tasks/Tools, Plans, and Markdown Text

🍿 Preview: Display as Plan

2026-02-10-thinking-steps-display-mode-plan.mov

🍿 Preview: Display as Timeline

2026-02-10-thinking-steps-display-mode-timeline.mov

📺 Chat Stream with 2 Display Mode

  • Plan Display Mode
  • Timeline Display Mode

👾 Chat Stream Structured Content

Now, you can display a mixture of structured content called "chunks":

  • 🔠 Markdown Text Block to format your text with standard markdown
  • ☑️ Task Card Block to display a single task, representing an AI Tool Call or general action
  • 🗒️ Plan Block to display a collection of related tasks
  • 📚 URL Sources Element to display references within a task card block

Available in:

  • 🔌 API Methods: chat_startStream, chat_appendStream, and chat_stopStream
  • 🛟 Chat Stream Helper: streamer = client.chat_stream(...), streamer.append(...)

📖 Documentation

🍿 Getting Started

$ slack create

# → AI Agent App
#     Bolt for JavaScript
#   → Bolt for Python

🕹️ Example

streamer = client.chat_stream(
    channel=channel_id,
    recipient_team_id=team_id,
    recipient_user_id=user_id,
    thread_ts=thread_ts,
    task_display_mode="plan",
)

streamer.append(
    chunks=[
        MarkdownTextChunk(
            text="Hello.\nI have received the task. ",
        ),
        MarkdownTextChunk(
            text="This task appears manageable.\nThat is good.",
        ),
        TaskUpdateChunk(
            id="001",
            title="Understanding the task...",
            status="in_progress",
            details="- Identifying the goal\n- Identifying constraints",
        ),
        TaskUpdateChunk(
            id="002",
            title="Performing acrobatics...",
            status="pending",
        ),
    ],
)

time.sleep(4)

streamer.append(
    chunks=[
        PlanUpdateChunk(
            title="Adding the final pieces...",
        ),
        TaskUpdateChunk(
            id="001",
            title="Understanding the task...",
            status="complete",
            details="\n- Pretending this was obvious",
            output="We'll continue to ramble now",
        ),
        TaskUpdateChunk(
            id="002",
            title="Performing acrobatics...",
            status="in_progress",
        ),
    ],
)

time.sleep(4)

streamer.stop(
    chunks=[
        PlanUpdateChunk(
            title="Decided to put on a show",
        ),
        TaskUpdateChunk(
            id="002",
            title="Performing acrobatics...",
            status="complete",
            details="- Jumped atop ropes\n- Juggled bowling pins\n- Rode a single wheel too",
        ),
        MarkdownTextChunk(
            text="The crowd appears to be astounded and applauds :popcorn:"
        ),
    ],
    blocks=create_feedback_block(),
)

What's Changed

🚀 Enhancements

  • feat: add thinking steps support as chunks to chat stream with plan and task blocks by @zimeg in #1824

🐛 Bug Fixes

  • fix: move away from datetime.utcfromtimestamp for the state and installation stores by @WilliamBergamin in #1798

📚 Documentation

📦 Dependencies

  • chore(deps): bump actions/checkout from 5.0.0 to 6.0.0 by @dependabot[bot] in #1799
  • chore(deps): bump actions/setup-python from 6.0.0 to 6.1.0 by @dependabot[bot] in #1800
  • chore(deps): bump docutils from 0.22.2 to 0.22.3 by @dependabot[bot] in #1802
  • chore(deps): update mypy requirement from <=1.18.2 to <=1.19.0 by @dependabot[bot] in #1801
  • chore(deps): bump actions/checkout from 6.0.0 to 6.0.1 by @dependabot[bot] in #1817
  • chore(deps): bump actions/stale from 10.1.0 to 10.1.1 by @dependabot[bot] in #1816
  • chore(deps): bump docutils from 0.22.3 to 0.22.4 by @dependabot[bot] in #1812
  • chore(deps): bump codecov/codecov-action from 5.5.1 to 5.5.2 by @dependabot[bot] in #1815
  • chore(deps): bump actions/download-artifact from 6.0.0 to 7.0.0 by @dependabot[bot] in #1813
  • chore(deps): bump actions/upload-artifact from 5.0.0 to 6.0.0 by @dependabot[bot] in #1814
  • chore(deps): bump black from 23.3.0 to 24.3.0 in /requirements by @dependabot[bot] in #1786
  • chore(deps): update mypy requirement from <=1.19.0 to <=1.19.1 by @dependabot[bot] in #1827
  • chore(deps): bump actions/setup-python from 6.1.0 to 6.2.0 by @dependabot[bot] in #1828
  • chore(deps): bump actions/checkout from 6.0.1 to 6.0.2 by @dependabot[bot] in #1829

🧰 Maintenance

Full Changelog: v3.39.0...v3.40.0
Milestone: https://github.com/slackapi/python-slack-sdk/milestone/115

v3.40.0.dev0

v3.40.0.dev0 Pre-release
Pre-release

Choose a tag to compare

@mwbrooks mwbrooks released this 17 Jan 00:37

What's Changed

🚀 Enhancements

  • feat: accept chunks as arguments to chat.{start,append,stop}Stream methods by @zimeg in #1806
  • feat: support and flush chunks in the chat stream helper by @zimeg in #1809
  • feat: add task_card and plan blocks by @zimeg in #1819
  • feat: add task_display_mode option to the start of chat streams by @zimeg in #1820
  • feat: add plan_update chunk for chat streaming by @zimeg in #1821

🐛 Bug Fixes

📦 Other changes

Full Changelog: v3.39.0...v3.40.0.dev0

v3.39.0

Choose a tag to compare

@vegeris vegeris released this 20 Nov 15:18
978dd56

What's Changed

🚀 Enhancements

📦 Other changes

New Contributors

Full Changelog: v3.38.0...v3.39.0
Milestone: https://github.com/slackapi/python-slack-sdk/milestone/114?closed=1

v3.38.0

Choose a tag to compare

@WilliamBergamin WilliamBergamin released this 13 Nov 15:56
ae36655

What's Changed

🚀 Enhancements

🐛 Bug Fixes

  • fix: remove unused mypy ignore type comments by @zimeg in #1769
  • docs(oauth): use a variable "base_dir" home path for file stores by @zimeg in #1760

📚 Documentation

📦 Other changes

New Contributors

Full Changelog: v3.37.0...v3.38.0
Milestone: https://github.com/slackapi/python-slack-sdk/milestone/113?closed=1

v3.37.0

Choose a tag to compare

@zimeg zimeg released this 07 Oct 02:16
9624808

AI-Enabled Features: Loading States, Text Streaming, and Feedback Buttons

🍿 Preview

2025-10-06-loading-state-text-streaming-feedback.mov

📚 Changelog

⚡ Getting Started

Try the AI Agent Sample app to explore the AI-enabled features and existing Assistant helper:

# Create a new AI Agent app
$ slack create slack-ai-agent-app --template slack-samples/bolt-python-assistant-template
$ cd slack-ai-agent-app/

# Initialize Python Virtual Environment
$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install -r requirements.txt

# Add your OPENAI_API_KEY
$ export OPENAI_API_KEY=sk-proj-ahM...

# Run the local dev server
$ slack run

After the app starts, send a message to the "slack-ai-agent-app" bot for a unique response.

⌛ Loading States

Loading states allows you to not only set the status (e.g. "My app is typing...") but also sprinkle some personality by cycling through a collection of loading messages:

@app.message()
def handle_message(message, client):
    client.assistant_threads_setStatus(
        channel_id=channel_id,
        thread_ts=thread_ts,
        status="thinking...",
        loading_messages=[
            "Teaching the hamsters to type faster…",
            "Untangling the internet cables…",
            "Consulting the office goldfish…",
            "Polishing up the response just for you…",
            "Convincing the AI to stop overthinking…",
        ],
    )

    # Start a new message stream

🔮 Text Streaming Helper

The chat_stream() helper utility can be used to streamline calling the 3 text streaming methods:

# Start a new message stream
streamer = client.chat_stream(
    channel=channel_id,
    recipient_team_id=team_id,
    recipient_user_id=user_id,
    thread_ts=thread_ts,
)

# Loop over OpenAI response stream
# https://platform.openai.com/docs/api-reference/responses/create
for event in returned_message:
    if event.type == "response.output_text.delta":
        streamer.append(markdown_text=f"{event.delta}")
    else:
        continue

feedback_block = create_feedback_block()
streamer.stop(blocks=feedback_block)

🔠 Text Streaming Methods

Alternative to the Text Streaming Helper is to call the individual methods.

1) client.chat_startStream

First, start a chat text stream to stream a response to any message:

@app.message()
def handle_message(client, context, event, messsage):
    # Start a new message stream
    stream_response = client.chat_startStream(
        channel=channel_id,
        recipient_team_id=team_id,
        recipient_user_id=user_id,
        thread_ts=thread_ts,
    )
    stream_ts = stream_response["ts"]

2) client.chat_appendStream

After starting a chat text stream, you can then append text to it in chunks (often from your favourite LLM SDK) to convey a streaming effect:

for event in returned_message:
    if event.type == "response.output_text.delta":
        client.chat_appendStream(
            channel=channel_id, 
            ts=stream_ts, 
            markdown_text=f"{event.delta}"
        )
    else:
        continue

3) client.chat_stopStream

Lastly, you can stop the chat text stream to finalize your message:

client.chat_stopStream(
    channel=channel_id, 
    ts=stream_ts,
    blocks=feedback_block
)

👍🏻 Feedback Buttons

Add feedback buttons to the bottom of a message, after stopping a text stream, to gather user feedback:

def create_feedback_block() -> List[Block]:
    blocks: List[Block] = [
        ContextActionsBlock(
            elements=[
                FeedbackButtonsElement(
                    action_id="feedback",
                    positive_button=FeedbackButtonObject(
                        text="Good Response",
                        accessibility_label="Submit positive feedback on this response",
                        value="good-feedback",
                    ),
                    negative_button=FeedbackButtonObject(
                        text="Bad Response",
                        accessibility_label="Submit negative feedback on this response",
                        value="bad-feedback",
                    ),
                )
            ]
        )
    ]
    return blocks

@app.message()
def handle_message(client, context, event, message):
    # ... previous streaming code ...
    
    # Stop the stream and add feedback buttons
    feedback_block = create_feedback_block()
    client.chat_stopStream(
        channel=channel_id, 
        ts=stream_ts, 
        blocks=feedback_block
    )

Ⓜ️ Markdown Text Support

chat_postMessage supports markdown_text

response = client.chat_postMessage(
    channel="C111",
    markdown_text=markdown_content,
)

Learn more in #1718

🧩 Markdown Block

📚 https://docs.slack.dev/reference/block-kit/blocks/markdown-block/

from slack_sdk.models.blocks import MarkdownBlock
...

@app.message("hello")
def message_hello(say):
    say(
        blocks=[
            MarkdownBlock(text="**lets's go!**"),
        ],
        text="let's go!",
    )

Learn more in #1748

🎞️ Workflows Featured Methods

Add support for the workflows.featured.{add|list|remove|set} methods:

app.client.workflows_featured_add(channel_id="C0123456789", trigger_ids=["Ft0123456789"])
app.client.workflows_featured_list(channel_ids="C0123456789")
app.client.workflows_featured_remove(channel_id="C0123456789", trigger_ids=["Ft0123456789"])
app.client.workflows_featured_set(channel_id="C0123456789", trigger_ids=["Ft0123456789"])

Learn more in #1712

What's Changed

👾 Enhancements

  • feat(web): add workflows.featured.{add|list|remove|set} methods in #1712 - Thanks @zimeg!
  • feat: support markdown_text parameter in #1718 - Thanks @WilliamBergamin!
  • feat(models): add markdown block in #1748 - Thanks @zimeg!
  • feat: add ai-enabled features text streaming methods, feedback blocks, and loading state in #1766 - Thanks @zimeg!

🐛 Bug fixes

📚 Documentation

  • Fix python package name in installation guide in #1719 - Thanks @daviesian!
  • docs: replace links from api.slack.com to docs.slack.dev redirects in #1763 - Thanks @zimeg!

🤖 Dependencies

  • chore(deps): bump on-headers and compression in /docs in #1710 - Thanks @dependabot[bot]!
  • chore(deps): bump docutils from 0.21.2 to 0.22 in #1721 - Thanks @dependabot[bot]!
  • chore(deps): update pytest-asyncio requirement from <1 to <2 in #1722 - Thanks @dependabot[bot]!
  • chore(deps): bump the react group in /docs with 2 updates in #1723 - Thanks @dependabot[bot]!
  • chore(deps): bump actions/checkout from 4.2.2 to 5.0.0 in #1734 - Thanks @dependabot[bot]!
  • chore(deps): bump codecov/codecov-action from 5.4.3 to 5.5.0 in #1733 - Thanks @dependabot[bot]!
  • chore(deps): bump actions/setup-python from 5.6.0 to 6.0.0 in #1737 - Thanks @dependabot[bot]!
  • chore(deps): bump actions/stale from 9.1.0 to 10.0.0 in #1738 - Thanks @dependabot[bot]!
  • chore(deps): bump codecov/codecov-action from 5.5.0 to 5.5.1 in #1739 - Thanks @dependabot[bot]!
  • chore(deps): update pytest-cov requirement from <7,>=2 to >=2,<8 in #1741 - Thanks @dependabot[bot]!
  • chore(deps): update mypy requirement from <=1.15.0 to <=1.17.1 in #1740 - Thanks @dependabot[bot]!
  • chore(deps): update mypy requirement from <=1.17.1 to <=1.18.2 in #1758 - Thanks @dependabot[bot]!
  • chore(deps): bump docutils from 0.22 to 0.22.2 in #1757 - Thanks @dependabot[bot]!

🧰 Maintenance

  • Build: remove docusaurus configuration ...
Read more

v3.36.0

Choose a tag to compare

@zimeg zimeg released this 09 Jul 21:05
5e5b89f

What's changed

👾 Enhancements

🧪 Tests

📚 Documentation

  • docs: reference creating an app with scopes to gather a token for installation in #1694 - Thanks @zimeg!
  • Docs: Update old links, apply style guide, and generally copyedit/clean up the Python SDK docs. in #1699 - Thanks @technically-tracy!

🤖 Dependencies

  • chore(deps): bump @babel/helpers from 7.26.0 to 7.27.0 in /docs in #1678 - Thanks @dependabot!
  • chore(deps): bump @babel/runtime-corejs3 from 7.26.9 to 7.27.0 in /docs in #1679 - Thanks @dependabot!
  • chore(deps): bump @babel/runtime from 7.26.0 to 7.27.0 in /docs in #1680 - Thanks @dependabot!
  • chore(deps): bump pdoc3 from 0.11.5 to 0.11.6 in #1684 - Thanks @dependabot!
  • chore(deps): bump the react group in /docs with 2 updates in #1685 - Thanks @dependabot!
  • chore(deps): bump image-size from 1.2.0 to 1.2.1 in /docs in #1686 - Thanks @dependabot!
  • chore(deps): bump estree-util-value-to-estree from 3.3.2 to 3.3.3 in /docs in #1687 - Thanks @dependabot!
  • chore(deps): bump http-proxy-middleware from 2.0.7 to 2.0.9 in /docs in #1689 - Thanks @dependabot!
  • chore(deps): bump the docusaurus group in /docs with 5 updates in #1696 - Thanks @dependabot!
  • chore(deps): bump codecov/test-results-action from 1.1.0 to 1.1.1 in #1695 - Thanks @dependabot!
  • chore(deps): bump the docusaurus group in /docs with 5 updates in #1705 - Thanks @dependabot!
  • chore(deps): bump brace-expansion from 1.1.11 to 1.1.12 in /docs in #1706 - Thanks @dependabot!

🧰 Maintenance

Milestone: https://github.com/slackapi/python-slack-sdk/milestone/111
Full Changelog: v3.35.0...v3.36.0