✈
    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

    Agent Runs API

    Create, observe, and control AI planning runs — lifecycle control, a sequenced event stream, and typed artifacts.

    Production base URLhttps://api.travelmode.ai
    Versionv1
    Specopenapi.yaml

    🧪 Open the API Reference

    Browse every endpoint, search the schema, and call production with the built-in Authorize / Try It console.

    🚀 Getting Started

    Create a run and read its status.

    Guides

    🚀

    Getting Started

    Create a run and read its status.

    🔐

    Authentication

    Session cookie, bearer token, and owner scoping.

    🔄

    Run Lifecycle

    Statuses, phases, and control actions.

    📡

    Streaming & Polling

    The SSE stream, event polling, and the since cursor.

    📦

    Artifacts

    Typed run outputs and pinning.

    ⚠️

    Errors

    Status codes and the error response shape.

    Travelmode Agent Runs API

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

    This directory holds the public contract for the Agent Runs feature of the Travelmode developer platform. The OpenAPI spec is the source of truth; the markdown guides add narrative guidance and worked examples.

    A run is an asynchronous execution of the planning agent over one trip. It moves through phases, emits a sequenced stream of events, and produces typed artifacts (candidates, entities, conflicts, draft operations, proposals).

    Auth model: these endpoints use the end-user auth model (session cookie or mobile / extension bearer token), not a tm_ developer key. Runs are owner-scoped — only the user who created a run may read, stream, or control it. See authentication.md.

    Hosted developer portal

    URLWhat it serves
    /developers/agent-runsAgent Runs feature overview (this README).
    /developers/agent-runs/<slug>Each markdown guide (getting-started, authentication, lifecycle, streaming, artifacts, errors).
    /developers/agent-runs/referenceInteractive OpenAPI 3.1 reference with Authorize and Try It.
    /developers/agent-runs/openapi.yamlCanonical YAML spec, served raw.
    /developers/agent-runs/openapi.jsonSame spec, JSON-encoded for tooling.

    Files

    FileWhat it contains
    openapi.yamlOpenAPI 3.1 spec — every Agent Runs path, schema, and example. Validated by npm run check:openapi.
    getting-started.mdBase URL, auth quickstart, create your first run.
    authentication.mdSession cookie, bearer token, and owner scoping.
    lifecycle.mdStatuses, phases, and control actions.
    streaming.mdThe SSE stream, event polling, and the since cursor.
    artifacts.mdTyped run outputs and pinning.
    errors.mdStatus codes and the error response shape.

    Quick links

    • Response shape: resource objects (no { data, meta } envelope).
    • Error shape: { "error": <string | array> } — see errors.md.
    • The SSE stream is cookie-only — see streaming.md.

    Validating the spec

    npm run check:openapi