Artifacts and AI agents
AI agents can interact with artifacts through the Buddy MCP server. They can create artifacts and versions, upload files, and run pipelines with selected artifact versions. Access to artifacts is governed by the same permissions as in the UI, CLI, and REST API.
Artifact tools are not available when using a category filter. To access these tools, connect to the MCP server without a category filter. If the agent only needs to download artifact versions, use a token with the Artifacts scope at the Read level.
Create an artifact and a version
The create-artifact tool creates a Bucket, Container Image, or NPM Package artifact at the Workspace or Project scope. The create-artifact-version tool creates an empty version of the artifact.
- An artifact created over MCP uses Buddy Auth and gives pipelines no access. The
pipelines_access_levelandsandboxes_access_levelfields are set toDENIED. Before a pipeline can publish or download a version, someone has to set the level in the Permissions tab of the artifact (Permissions and access). - A new version is empty. It has the
READYstatus and a size of 0. You add files separately, one at a time (upload-artifact-version-file) or as a single ZIP archive (publish-artifact-version), which replaces the whole content of the version.
Version names must be unique within an artifact. Attempting to create a version with an existing name returns the Artifact 'version' must be unique error.
Run a pipeline with an artifact version
The run-pipeline tool accepts the artifact and artifactVersion parameters. The BUDDY_RUN_ARTIFACT_* variables are available during the run, and the artifact version files are placed in the pipeline filesystem. This behavior is consistent with runs started from the Run window in the UI.
The artifact version is available to the run only if the pipeline configuration includes the artifacts context in YAML:
- pipeline: deploy-build
name: Deploy build
artifacts:
- my-app-build
actions:
- action: Show artifact version
type: BUILD
docker_image_name: library/ubuntu
docker_image_tag: "24.04"
commands: |-
env | grep BUDDY_RUN_ARTIFACT
After the run, the agent should check whether the response contains the artifact_version field. If it is missing, the run started without a version. Run a pipeline with an artifact version describes the context and variables in detail.
Attempting to run a pipeline with a nonexistent artifact version returns the following error before the run starts:
Artifact version my-app-build:9.9.9 not found
Artifact and version notes for AI agents
An artifact and each of its versions can have a note for agents (agent_note), for example "Broken migration, do not deploy." on a faulty version. The agent reads it with the get-artifact tool, because the list-* tools do not return notes. You set notes in the UI, through the API, with the create-artifact and update-artifact MCP tools, or with the --agent-note flag in bdy artifact publish and bdy artifact update.
get-artifact returns them in its response, but update-artifact does not change them.
Troubleshooting run failures without an error message
If get-run returns the FAILED status while the actions remain in the ENQUEUED status and error_message is empty, the run failed during setup, before the first action started. This can occur when an artifact trigger starts a pipeline that does not have access to the artifact. To view the error message, open the run details in the UI and expand the Setup action step. For common errors and troubleshooting instructions, see Troubleshooting.
See also:
- MCP - connecting an agent to Buddy, authentication and tool filtering
- Resource notes - notes for people and agents on artifacts and versions
- Run a pipeline with an artifact version - the
artifactscontext and theBUDDY_RUN_ARTIFACT_*variables - Artifacts in Sandboxes - an agent in a sandbox with files from an artifact
Last modified on Dec 2, 2026