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.1.2

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.1.2
File Size Uploaded Provenance Actions
slackwright-0.1.2.tar.gz 178.3 kB With provenance Details for slackwright-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 215.9 kB

Release files / slackwright-0.1.2.tar.gz

Download URL slackwright-0.1.2.tar.gz
Size 178.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d385c5a6fc494e29935a74294515eee968cf4e4478af2d34edb7ea8767a05122
BLAKE2b-256 checksum
How to use checksums
17c38acf6c199b556d5e8a3c633583322dc98ea429056961fd128bc80a701402
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 Nov 23, 2026.

Transparency log

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

Download URL slackwright-0.1.2-py3-none-any.whl
Size 37.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f753d55779e2c9b36da01e8321dabb0c7e6561b57582a5048f4aef496fdb485
BLAKE2b-256 checksum
How to use checksums
659b9bf821ec5bd309728a0291450c4af4e88b7fe124f429617185d66473dbd4
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 Nov 23, 2026.

Transparency log

Security for slackwright 0.1.2

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.1.2.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 Nov 23, 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