✈
    TravelmodeDevelopers
    🔎/
    🔑Manage API Keys
    Feature
    🌦️Weather🛂Visa🧩Platform🧭Trips🤖Agent Runs📅Events

    Agent Runs API · v1

    📖Overview🧪API Reference (Try It)
    Guides
    🚀Getting Started🔐Authentication🔄Run Lifecycle📡Streaming & Polling📦Artifacts⚠️Errors
    ⬇️Download openapi.yaml
    Developers / Agent Runs / Artifacts

    Artifacts

    Last verified: 2026-06-20 (Task #390 — User APIs documentation).

    A run produces artifacts — typed, validated outputs of its work. These endpoints are owner-only.

    Artifact types

    artifactTypeWhat it holds
    candidatesRaw candidate options gathered during retrieval.
    entitiesNormalized entities (stays, transit, activities).
    conflictsDetected scheduling or constraint conflicts.
    draft_opsDraft timeline operations the run would apply.
    proposalsProposals surfaced for member accept/reject.

    Each artifact also carries validationStatus (pending / valid / invalid), isPartial (true while still streaming), and isPinned.

    List artifacts

    GET /v1/agent-runs/{runId}/artifacts
    
    {
      "artifacts": [
        { "id": 5012, "artifactType": "entities", "validationStatus": "valid", "isPartial": false, "isPinned": false },
        { "id": 5013, "artifactType": "proposals", "validationStatus": "valid", "isPartial": false, "isPinned": true }
      ]
    }
    

    Artifacts are also returned inline by GET /v1/agent-runs/{runId} (see lifecycle.md).

    Pin or unpin an artifact

    PATCH /v1/agent-runs/{runId}/artifacts
    

    Pinning marks an artifact to survive re-runs and surface it in the UI.

    curl -s -X PATCH "https://api.travelmode.ai/v1/agent-runs/9f2a1c7e-…/artifacts" \
      -H "Authorization: Bearer <token>" \
      -H "Content-Type: application/json" \
      -d '{ "artifactId": 5012, "isPinned": true }'
    
    { "artifact": { "id": 5012, "artifactType": "entities", "isPinned": true } }
    

    An artifactId that does not belong to this run returns 404 ({ "error": "Artifact not found" }).

    Previous
    ← Streaming & Polling
    Next
    Errors →