Skip to main content

Build an application with a Travila SDK

Status: Upcoming — not yet available.

Section: DOC-DX-sdks#overview.

Add chat to your application without writing every HTTP request by hand. This recipe creates a conversation, displays a reply, and recovers when the connection ends before the answer arrives. The SDK handles request encoding and typed results while your application controls credentials, customer selection and what to do with the response.

Availability: Application SDK packages are not released yet. TypeScript and Python are the first target languages, followed by Go; Swift support is handled separately for mobile. Installation commands and supported runtime versions are not available yet. To integrate today, use the HTTP quickstart and API reference.

OpenAI client compatibility is a separate interface; the native conversation API does not accept OpenAI requests interchangeably.

Add a conversation to your application​

Status: Upcoming — not yet available.

Section: DOC-DX-sdks#first-client-workflow.

  1. Create or select your first project through workspace setup, then obtain credentials for your application.
  2. Configure the client with your API base URL and credentials. Keep secret keys on your backend. A browser or mobile application uses a publishable key with the signed-in user's token; see authentication.
  3. Create a conversation and save its ID. Send the user's message to that conversation.
  4. Read the returned run ID and status. Display the answer when the run completes, or handle a tool request when the run needs your application's help.
  5. Set a limit on how long your application waits. If the connection ends first, retain the run ID and follow the generation recovery workflow rather than sending the user's message again.

Verify the completed feature by sending a follow-up in the saved conversation and confirming it appears with the earlier exchange. For a chat application, the conversation ID connects later messages to the same history. The run ID identifies the work started by one send. A successful request can mean that work was accepted or paused for a tool; it does not always contain a finished answer.

Handle results, pagination and interrupted requests​

Status: Upcoming — not yet available.

Section: DOC-DX-sdks#response-semantics.

The client preserves the information your application needs to interpret a result:

Your taskClient behavior
Apply an optional settingKeeps omission distinct from an explicitly supplied false or 0 where the API supports that distinction.
Store a large counter or sequencePreserves decimal-string 64-bit values without rounding them to a JavaScript number.
Load the next pageKeeps the original filters and follows the operation's continuation cursor, including after a short or empty page.
Handle a newer response valueExposes an unknown value or compatibility error instead of calling it success.
Recover after a timeoutRetains the known resource or run identity. Retries follow the endpoint's retry contract; a write is not silently repeated.
Stop waitingCancels the local wait without claiming that remote work or an external action stopped.

For example, a sequence value of "9007199254740993" remains the same when you store and resend it. If a request's result is unknown, your application can present that state and recover it without issuing a duplicate action.

Connect to more than one deployment or account​

Status: Upcoming — not yet available.

Section: DOC-DX-sdks#client-isolation.

Create a separate client configuration for each deployment and account your application is authorized to use. Changing credentials on one client does not change another client's credentials, including during concurrent requests.

For example, a service that connects to two customer-owned deployments keeps each API origin and credential together. It cannot obtain access to another project by changing a resource ID.

Use your own API origin for a self-hosted installation and keep TLS verification enabled. Credentials are not forwarded to another origin after a redirect. Use request IDs, status and timing to diagnose failures; keep keys, tokens, signed download URLs and private request bodies out of routine logs.

Upgrade your integration safely​

Status: Upcoming — not yet available.

Section: DOC-DX-sdks#sdk-adoption.

Each SDK release identifies its supported API and runtime versions, operation coverage, license and upgrade instructions. Use a pinned package version, including when installing from your organization's private mirror.

Before upgrading, run your integration's main workflow and failure cases with the new client. Check denied access, pagination, lost responses and concurrent clients using integration testing. Pre-1.0 upgrades can require application changes; follow the release's migration guidance.

Keep the earlier package if you need to roll back the client. Rolling it back does not undo requests already processed by Travila. See terminal workflows and coding-agent skills for other ways to build your integration.

Document ID: DOC-DX-sdks. Section identities and revisions.