Skip to main content

Install

This installs both the CLI and the Python client library.

Initialize the client

Zero-config for agents: If ARTIFACTA_API_KEY and ARTIFACTA_SESSION_ID are set in the environment, Client() with no arguments is all you need. Every push() call inherits the session automatically.

Methods at a glance

Write

Read

The existing push(..., transcript=True) and list(..., transcript=True) calls store and filter transcripts. See the session transcript guide for their exact signatures and precedence.

Utilities

Quick example

publish_artifact()

Publishes an artifact as a shareable page at https://artifacta.io/a/{slug}. Idempotent — re-publishing the same artifact updates the page and keeps the same URL. Returns a dict with page_id, public_url, visibility, and access.

unpublish()

Soft-unpublishes an artifact page. The artifact itself is not deleted. Accepts an artifact ID (art_...) or a page slug (pg_...). Returns a dict with page_id and unpublished: True.

Error handling

All methods raise typed exceptions matching the API error taxonomy:
See the full exception reference for the complete mapping.

Environment variable defaults

The SDK respects the same environment variables as the CLI: