Skip to main content

slackwright

Building blocks for AI agents that live in Slack.

slackwright is a library, not a framework. Your bot keeps its own event loop and agent; slackwright gives it the Slack parts:

  • Render: post LLM Markdown answers with Slack's native Markdown support, split long answers, and stream replies with task cards.
  • Tools: expose the parts below to an LLM agent as tools, with Anthropic tool definitions and validated inputs.
  • Forms: forms that an agent designs, in a modal or inline in a message, with validated submissions.
  • Canvases: create, edit, and read canvas documents.
  • Ingest: turn a Slack thread, its mentions, and its files into LLM messages.
  • Lifecycle: progress updates and an in-flight drain for graceful shutdown.

Status: early development. The API will change.

Installation

pip install slackwright
pip install 'slackwright[valkey]'    # ValkeyFormStore
pip install 'slackwright[postgres]'  # PostgresFormStore

Example

import slackwright
from slackwright import forms, stores

runtime = forms.Runtime(stores.ValkeyFormStore(valkey), on_submit)
runtime.register(bolt_app)  # handles form buttons and modals

toolkit = slackwright.Toolkit(
    slack_client,
    channel_id=channel_id,
    thread_ts=thread_ts,
    user_id=user_id,
    forms=runtime,
    canvases=True,
)
tools = toolkit.anthropic()                     # give these to Claude
result = await toolkit.call(name, tool_input)   # run a tool_use block

See docs/design.md for the design.

Development

uv sync --all-groups
docker compose up -d --wait   # Valkey and PostgreSQL for integration tests
uv run pre-commit run --all-files
uv run coverage run
uv run coverage report

Without the compose services, the Valkey and PostgreSQL tests are skipped. When VALKEY_URL or POSTGRES_URL is set (CI sets both), those tests always run against that URL.

License

BSD 3-Clause. See LICENSE.

Metadata

Release files for slackwright 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for slackwright 0.5.0
File Size Uploaded Provenance Actions
slackwright-0.5.0.tar.gz 181.9 kB With provenance Details for slackwright-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for slackwright 0.5.0
File Interpreter ABI Platform Actions
slackwright-0.5.0-py3-none-any.whl Python 3 none any Details for slackwright-0.5.0-py3-none-any.whl

Total release size: 221.1 kB

Release files / slackwright-0.5.0.tar.gz

Download URL slackwright-0.5.0.tar.gz
Size 181.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c83f0734bdc02abbb80771693d5d87a8b4b880d1644600be3da4aa8a76d78aea
BLAKE2b-256 checksum
How to use checksums
d63246ab711f7f077c7aef0ea71d4b4036efb83e792db23a354f1d0a8f7ad1a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.

Transparency log

Release files / slackwright-0.5.0-py3-none-any.whl

Download URL slackwright-0.5.0-py3-none-any.whl
Size 39.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9ed606ff4a2209701243a62f55593052daf8446a750a7b059cb9a62f43ba2aae
BLAKE2b-256 checksum
How to use checksums
21f0178aae9a4563f90479163e6ed222dbc92ac3e343b2dc010bd215f60fc252
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.

Transparency log

Security for slackwright 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for slackwright-0.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page