Skip to main content
Install the package:
uv add the-almanac
Import almanac in Python:
from almanac import AlmanacClient

client = AlmanacClient(access_token="ALMANAC_TOKEN")
legal = client.use("reverie/legal")

pages = legal.search("yc safe")
page = legal.pages.read("safe-financing")
sources = legal.sources.search("safe")
The SDK calls the same /v1 API as the CLI and MCP server. It does not import hosted server services or product-data stores.

Namespaces

legal.pages.read("safe-financing")
legal.sources.list()
legal.sources.upload(["docs/safe.pdf"], guidance="ingest this filing")
legal.jobs.list()
legal.jobs.wait("last")
legal.garden(guidance="tighten stale pages")
wiki.search(...) searches pages. Use wiki.sources.search(...) for source metadata.

API keys

Admins can create organization API keys from the website or CLI:
almanac api-keys create "Python job"
Use the returned value as the SDK bearer token:
from almanac import AlmanacClient

client = AlmanacClient(access_token="waka_...")
legal = client.use("reverie/legal")
print(legal.search("yc safe"))
The SDK can also manage keys when the current token has developer-management access:
client.api_keys.list("reverie")
client.api_keys.create("reverie", "Read-only agent", ["almanac:wiki:read"])
client.api_keys.delete("reverie", "ak_123")