Skip to main content
An artifact is a piece of information or tool you provide to Zylon so it can be used as context for queries and operations. The Workspace API groups artifacts into document artifacts, agent flows, and other artifacts.

Prerequisites

  • An API token. See Token Management.
  • Your Zylon hostname (replace {BASE_URL} in the examples).

Artifacts

CategoryIncludesWhen to use
Document artifactsDocuments, folders, linksStore or organize content inside a project.
Agent flowsSummary, composition, extraction flowsRun workflows across artifacts to produce outputs.
Other artifactsMCP servers, SQL databasesProvide external tools or data sources.

Document artifacts

Document artifacts hold content, links reference existing artifacts, and folders organize artifacts inside a project.
curl -X POST "https://{BASE_URL}/api/v1/app/project/{projectID}/artifact" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "InlineText",
    "source": "User",
    "name": "Q1 Support Summary",
    "description": "Weekly summary notes.",
    "props": {
      "content": "Ticket volume rose 12% week-over-week. Billing issues drove 38% of cases."
    }
  }'
{
  "id": "artifact_doc_q1",
  "project_id": "proj_7a5c3e1b9d2f4a6c",
  "name": "Q1 Support Summary",
  "type": "InlineText",
  "source": "User",
  "state": "Published",
  "ingest_status": "NotApplicable",
  "props": {
    "content": "Ticket volume rose 12% week-over-week. Billing issues drove 38% of cases."
  },
  "created_at": "2026-02-08T14:30:12Z",
  "updated_at": "2026-02-08T14:31:02Z"
}

Agent flows

Agent flows run a Zylon workflow across one or more artifacts to produce a structured output.
curl -X POST "https://{BASE_URL}/api/v1/app/project/{projectID}/artifact" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "Summary",
    "source": "User",
    "name": "Q1 Support Summary (auto)",
    "props": {
      "artifact_ids": ["{artifactID}"],
      "style": "Neutral",
      "detail": "KeyPoints",
      "instructions": ["Focus on billing and onboarding trends."]
    }
  }'
{
  "id": "artifact_summary_q1",
  "project_id": "proj_7a5c3e1b9d2f4a6c",
  "type": "Summary",
  "state": "Processing",
  "ingest_status": "Processing",
  "props": {
    "artifact_ids": ["artifact_doc_q1"],
    "style": "Neutral",
    "detail": "KeyPoints",
    "instructions": ["Focus on billing and onboarding trends."]
  },
  "created_at": "2026-02-08T15:10:00Z"
}

Other artifacts

Connector artifacts store tool integrations. private_props is only used for MCP and SQL database artifacts.
curl -X POST "https://{BASE_URL}/api/v1/app/project/{projectID}/artifact" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "SqlDatabase",
    "source": "User",
    "name": "Sales database",
    "description": "Read-only reporting database.",
    "props": {
      "schemas": ["public", "analytics"],
      "tables": ["orders", "customers"],
      "ssl": true,
      "enable_tables": true,
      "enable_views": true,
      "enable_procedures": false,
      "enable_functions": false
    },
    "private_props": {
      "connection_string": "postgresql://readonly:***@db.example.com:5432/sales"
    }
  }'
{
  "id": "artifact_db_sales",
  "project_id": "proj_7a5c3e1b9d2f4a6c",
  "type": "SqlDatabase",
  "state": "Ready",
  "ingest_status": "NotApplicable",
  "props": {
    "schemas": ["public", "analytics"],
    "tables": ["orders", "customers"],
    "ssl": true,
    "enable_tables": true,
    "enable_views": true,
    "enable_procedures": false,
    "enable_functions": false
  },
  "created_at": "2026-02-08T15:20:05Z"
}
To retrieve private details for these artifacts, call: GET /api/v1/app/project/{projectId}/artifact/{artifactId}/private Only the creator of the artifact can access the private details.

Working with artifacts

List artifacts

curl "https://{BASE_URL}/api/v1/app/project/{projectID}/artifact?page=1&page_size=20" \
  -H "Authorization: Bearer {API_TOKEN}"
{
  "data": [
    {
      "id": "artifact_doc_q1",
      "project_id": "proj_7a5c3e1b9d2f4a6c",
      "name": "Q1 Support Summary",
      "type": "Document",
      "source": "User",
      "state": "Ready",
      "ingest_status": "Done",
      "has_content": true,
      "created_at": "2026-02-08T14:30:12Z",
      "updated_at": "2026-02-08T14:31:02Z"
    }
  ],
  "has_next_page": false,
  "has_previous_page": false,
  "total_count": 1
}

Get an artifact

curl "https://{BASE_URL}/api/v1/app/project/{projectID}/artifact/{artifactID}" \
  -H "Authorization: Bearer {API_TOKEN}"
{
  "id": "artifact_doc_q1",
  "project_id": "proj_7a5c3e1b9d2f4a6c",
  "name": "Q1 Support Summary",
  "type": "Document",
  "source": "User",
  "state": "Ready",
  "ingest_status": "Done",
  "has_content": true,
  "created_at": "2026-02-08T14:30:12Z",
  "updated_at": "2026-02-08T14:31:02Z"
}

Update an artifact

curl -X PUT "https://{BASE_URL}/api/v1/app/project/{projectID}/artifact/{artifactID}" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Q1 Support Summary (final)",
    "description": "Finalized weekly summary notes.",
    "plain_text_content": "Ticket volume rose 12% week-over-week..."
  }'
{
  "id": "artifact_doc_q1",
  "name": "Q1 Support Summary (final)",
  "description": "Finalized weekly summary notes.",
  "type": "Document",
  "source": "User",
  "ingest_status": "Done",
  "updated_at": "2026-02-08T14:45:21Z"
}

Delete an artifact

curl -X DELETE "https://{BASE_URL}/api/v1/app/project/{projectID}/artifact/{artifactID}" \
  -H "Authorization: Bearer {API_TOKEN}"
{
  "id": "artifact_doc_q1",
  "state": "Deleted"
}

Private artifact metadata

curl "https://{BASE_URL}/api/v1/app/project/{projectID}/artifact/{artifactID}/private" \
  -H "Authorization: Bearer {API_TOKEN}"
{
  "connection_string": "postgresql://readonly:***@db.example.com:5432/sales"
}

Download raw artifact content

curl "https://{BASE_URL}/api/v1/app/project/{projectID}/artifact/{artifactID}/download" \
  -H "Authorization: Bearer {API_TOKEN}"
Ticket volume rose 12% week-over-week. Billing issues drove 38% of cases.

Get parsed content

This endpoint is only available when the artifact has an initialized vector index. In practice, this usually means connector-backed documents or artifacts that have completed indexing.

Sync an artifact

This endpoint is primarily used for integration artifacts (SharePoint, Confluence, Claromentis, or FileSystem).

Errors and edge cases

  • Artifact error codes: the error field maps to ingest failures:
error valueMeaning
InvalidExtensionFile extension is not supported.
MismatchedTypeFile type does not match the declared artifact type.
MalformedFile is corrupt or unreadable.
EncryptedFile is password‑protected.
ParsingFailureExtractor failed to parse the file.
MaxNodesDocument is too large/complex for parsing.
NoValidFileNo valid file was found in the upload.
NoValidNodesNo parseable content was extracted.
InternalErrorIngest pipeline failed unexpectedly.
UnknownUnclassified ingest failure.
If ingest_status is Error, fix the source file (or convert it) and re‑sync.
  • Warnings: ingest_warnings can include values like BigSize, UnprocessableContent, or NoContent to indicate non‑fatal issues.
  • 401/403: token missing or insufficient permissions.
  • 404: artifact or project not found.
  • 409: artifact already processing.
  • 413: content exceeds the recommended upload size (250 MB).