Artifacts
Artifacts are BotDojo’s first-class record for agent outputs that need to be rendered, referenced, and optionally executed later.
What an artifact is
An artifact is a project-scoped record that points at exactly one render source in v1:
- a
document_idfor BotDojo-managed files such as markdown, PDF, DOCX, or PPTX - a
urlfor URL-backed content such as hosted MCP app HTML
Artifacts also carry the metadata needed to place that output back into the product:
typesuch asmarkdown,pdf,docx,pptx, ormcp_app- optional origin fields like
flow_id,flow_request_id,workspace_id, orwork_queue_item_id - optional persisted
stateandactionResultshistory for interactive MCP app artifacts - optional
config.actionfor the artifact's first-class configured action - optional
config.action.mcr_uriwhen the artifact needs one linked external tool surface
Rendering
BotDojo renders artifacts through a single in-app renderer:
- Markdown uses the same markdown pipeline already used in chat and reports.
- PDF uses a signed document URL and embedded viewer flow.
- DOCX and PPTX reuse the office preview renderer.
mcp_appmounts HTML in-app, pushes host context into the MCP app bridge, intercepts tool calls, and routes them through theArtifactsstore.- Inside an
mcp_app,tools/callcan use the built-in artifact toolcall_toolto invoke an arbitrarymcp_uri + tool_name + parameterspayload through the server-sideResourceFactorypath.
For document-backed files, the renderer asks the server for a fresh signed URL when the artifact is opened.
Work queues
Work queues do not get a separate artifact property type in v1. They reuse the existing resource_reference pattern and store artifact URIs such as:
botdojo://project/core/artifacts/<artifactId>
That keeps artifact references compatible with the existing resource rendering flow while allowing inline previews and dedicated tabs in the work queue item UI.
MCP tools
Artifacts expose two BotDojo MCP surfaces:
botdojo://project/core/artifacts/TOOLS.md
botdojo://project/core/artifacts/<artifactId>
Collection tools:
artifact_createartifact_create_documentcreates a BotDojo document under/artifacts/and returns itsdocument_idartifact_create_from_workspacecopies a workspace text file into a new document-backed artifactartifact_loadartifact_list_in_workspaceartifact_list_in_sessionartifact_viewshows an artifact in chat byartifact_idwithout opening the artifact-scoped MCP firstartifact_query
Artifact-scoped tools:
artifact_updateartifact_update_fileartifact_update_file_from_workspaceartifact_viewalso works on artifact-scoped MCPs and defaults to the current artifactartifact_update_stateartifact_execute_toolartifact_exportartifact_sync
The Artifacts store is the canonical execution API. The MCP tools resource wraps those store methods.
artifact_execute_tool supports the artifact built-ins (view, update_state, update, call_tool) as well as linked-MCR passthrough when the artifact is configured with config.action.mcr_uri.
For text-backed artifacts, the file helpers let you bootstrap or replace the backing render source without manually creating a DocumentRecord first. artifact_update_file will create a backing /artifacts/ document automatically when the artifact does not already have one.
Current limits
The current implementation keeps scope intentionally narrow:
- artifact access is authenticated and in-app only
- existing report storage stays on its current
document_id + artifactTypemodel - work queue references are URI-first
mcp_appsupports one linked external MCR surface throughconfig.action.mcr_uri- artifact actions run with the current user’s permissions