API reference¶
The reference is generated from the library's docstrings and type annotations. It documents each package's public API: the names in its __all__. Anything else is internal and may change without notice.
Packages¶
The packages are layers. Each depends only on the ones below it, so each is usable without the ones above (Architecture).
| Package | What it holds | Install |
|---|---|---|
artifactr.core |
Every rule, as pure functions over immutable values: artifact types, actors, commands, events, patches, rejections, change notes and the protocol's frames | core |
artifactr.workspace |
Tenant-scoped workspace handles, the storage protocol and in-memory storage | core |
artifactr.agent |
The pydantic-ai capability, the session, the runner and live output | core |
artifactr.sql |
SQL storage on PostgreSQL and SQLite, and its migrations | sql, postgres or sqlite extra |
artifactr.fastapi |
The thread protocol over WebSocket, and REST, as a FastAPI router | fastapi extra |
artifactr.mcp |
An MCP server for external agents | mcp extra |
The wire formats have their own pages: the thread protocol and its JSON Schema.
The top-level package¶
artifactr re-exports the names most applications need, so from artifactr import Workspaces, Runner works. Each is documented in its layer:
| Name | Documented in |
|---|---|
Artifact, MarkdownArtifact, Versioned, WritePolicy |
artifactr.core: Artifacts |
new_id |
artifactr.core: Identifiers |
Actor, UserActor, AgentActor, ExternalAgentActor, SystemActor |
artifactr.core: Actors |
Applied, Proposed, Resolved, Recorded |
artifactr.core: Outcomes |
Rejection, VersionConflict, NotFound |
artifactr.core: Rejections |
JsonPatch, TextEdit, TextEdits |
artifactr.core: Patches |
Workspaces, Workspace, InMemoryStorage |
artifactr.workspace |
ArtifactWorkspace, Session, Runner, RunHandle, ArtifactDraft |
artifactr.agent |
artifactr.__version__ is the installed version.