v3

latestOpenAPI 3.0.02026-08-081996601.2 MB
Agent Sessions

List session artifacts

Lists all artifacts stored in a specific agent session, with cursor-based pagination. Artifacts are files that the user uploads or that the agent generates within a session. The response lists the files in a session but does not include the file content.

get/v2/agents/{agent_key}/sessions/{session_key}/artifacts

Path parameters

agent_keystring required

A unique key that identifies an agent.

Example:customer_support

The unique identifier of the agent.

session_keystring required

A unique key that identifies an agent session.

Example:customer_support_chat

The unique key of the session to list the associated artifacts.

Query parameters

metadata_filterstring
Example:source = 'user_upload' AND page_count >= 10

A filter expression to narrow the list to artifacts whose metadata matches. Field names refer to keys on the artifact's metadata object. Syntax is similar to a SQL WHERE clause, the same as the metadata_filter used in query requests. See metadata filters documentation for more information.

Examples:

  • source = 'user_upload'
  • page_count >= 10 AND category = 'report'
  • label LIKE 'draft%'
  • category IN ('report', 'invoice')
  • category IS NULL
  • "extraction.engine" = 'ocr' (nested fields use a quoted dotted path)
  • 1 IN page_numbers (value present in an array)
limitinteger

The maximum number of artifacts to return in the list.

page_keystring

The opaque cursor returned in metadata.page_key of the previous response. Omit it to fetch the first page.

sort_by'created_at' | 'updated_at'

The field to sort results by.

order_by'asc' | 'desc'

The ordering direction of the results.

Headers

Request-Timeoutinteger

The platform makes a best effort to complete the request in the specified seconds, or it times out.

Request-Timeout-Millisinteger

The platform makes a best effort to complete the request in the specified milliseconds, or it times out.

Response

List of artifacts in the session.

Example response

{
  "artifacts": [
    {
      "artifact_id": "art_report_pdf_a3f2",
      "filename": "report.pdf",
      "mime_type": "application/pdf",
      "size_bytes": 2048576,
      "checksum_sha256": "a3f2b1c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2",
      "metadata": {
        "original_filename": "report.pdf",
        "source": "user_upload"
      },
      "description": "Q4 financial report",
      "ttl_days": 30,
      "created_at": "2024-01-15T10:35:00Z",
      "updated_at": "2024-01-15T10:35:00Z",
      "data": "JVBERi0xLjQKJeLjz9MKMy4uLg=="
    }
  ],
  "metadata": {
    "page_key": "eyJvZmZzZXQiOjF9"
  }
}