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

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.1
File Size Uploaded Provenance Actions
slackwright-0.1.1.tar.gz 176.2 kB With provenance Details for slackwright-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 212.9 kB

Release files / slackwright-0.1.1.tar.gz

Download URL slackwright-0.1.1.tar.gz
Size 176.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8609529fcb75233688d6fe9dbedf46e14d880d793ff1a17724416ecfb119502c
BLAKE2b-256 checksum
How to use checksums
b7c9981128019330934466944ef279ada1d2821e00ebc728fc1782064f5724a4
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 20, 2026.

Transparency log

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

Download URL slackwright-0.1.1-py3-none-any.whl
Size 36.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4be8251b210de019da104a2153df23bbebdde9d26059092647d136a01609120e
BLAKE2b-256 checksum
How to use checksums
2c3b27bcc576d3ce6a556387a362838824fdd1e89c7c58b855d82f5f0ccc2ac7
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 20, 2026.

Transparency log

Security for slackwright 0.1.1

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.1.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 20, 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