Skip to main content

langchain-brewpage

LangChain tools for BrewPage: let an agent publish an HTML page, a Markdown document, a JSON document, a key-value store or a file and get back a shareable URL. No account and no API key are needed.

Each call returns the URL plus an owner token. The toolkit reuses that token for later publications, so everything the agent creates belongs to one owner. Publications are private and unlisted by default and expire after 15 days unless you set ttl_days (1-30).

Install

pip install langchain-brewpage

Tools

Tool API Use
BrewPagePublishPageTool (brewpage_publish_page) POST /api/html HTML or Markdown page -> URL
BrewPagePublishJsonTool (brewpage_publish_json) POST /api/json JSON document -> URL
BrewPageCreateKvStoreTool (brewpage_create_kv_store) POST /api/kv Key-value store with one initial key -> URL
BrewPageUploadFileTool (brewpage_upload_file) POST /api/files Local file -> download or page URL

BrewPageToolkit returns all four tools, sharing one client.

Every tool also accepts ttl_days, password and namespace. Leave namespace empty for a private link. public lists pages in the public gallery and search engines, so never put secrets or personal data there.

Usage

from langchain_brewpage import BrewPageToolkit

tools = BrewPageToolkit().get_tools()
page = tools[0].invoke({"content": "# Weekly report\n\nAll green.", "format": "markdown"})
print(page["url"], page["owner_token"])

With an agent:

from langchain.agents import create_agent
from langchain_brewpage import BrewPageToolkit

agent = create_agent(model, tools=BrewPageToolkit().get_tools())  # any tool-calling chat model
agent.invoke({"messages": [{"role": "user", "content": "Write a one-page HTML changelog and publish it."}]})

The result of each tool is a dict: url, id, namespace, owner_token, management_link, expires_at.

Configuration

Setting Constructor Environment
API base URL BrewPageClient(base_url=...) BREWPAGE_BASE_URL (default https://brewpage.app)
Owner token to reuse BrewPageClient(owner_token=...) BREWPAGE_OWNER_TOKEN
Default namespace BrewPageClient(namespace=...) BREWPAGE_NAMESPACE
from langchain_brewpage import BrewPageClient, BrewPageToolkit

toolkit = BrewPageToolkit(client=BrewPageClient(owner_token="..."))

API errors (rate limits, refused content) come back to the agent as tool messages instead of exceptions.

Development

uv sync --group test
uv run pytest
BREWPAGE_LIVE=1 uv run pytest -m live   # one private page on production

License

MIT

Metadata

Release files for langchain-brewpage 0.1.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 langchain-brewpage 0.1.0
File Size Uploaded Provenance Actions
langchain_brewpage-0.1.0.tar.gz 7.0 kB With provenance Details for langchain_brewpage-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langchain-brewpage 0.1.0
File Interpreter ABI Platform Actions
langchain_brewpage-0.1.0-py3-none-any.whl Python 3 none any Details for langchain_brewpage-0.1.0-py3-none-any.whl

Total release size: 14.1 kB

Release files / langchain_brewpage-0.1.0.tar.gz

Download URL langchain_brewpage-0.1.0.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bee33ef755d1da847c8ce84e2d118b68471238a0997971bd3861f9170080d805
BLAKE2b-256 checksum
How to use checksums
2147910c69b57cbacc241f52ddf3f4059c176b710b5b6248104594c8e76b51cb
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 6, 2026.

Transparency log

Release files / langchain_brewpage-0.1.0-py3-none-any.whl

Download URL langchain_brewpage-0.1.0-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
441b343751cd5d2d5bfe127f82a435a21b20c313dfdae59556b2e2121fe15016
BLAKE2b-256 checksum
How to use checksums
e3997dd6fba6d9880d6dffc2f46138fc95fee29e619087ad7f1a9d16bc0c9bd3
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 6, 2026.

Transparency log

Security for langchain-brewpage 0.1.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 langchain_brewpage-0.1.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 Nov 6, 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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