Agents API resource. Run an agent by agentId via the Tela gateway
(POST /agent/:id/run), then stream events, fetch the timeline, or cancel
by sessionId (delegated to @meistrari/agent-sdk).
Retrieves a canvas by its ID, version ID, or application ID. Validates input and output schemas if provided via schema builder functions.
// Get canvas by ID with schemas
const canvas = await tela.canvas.get({
id: 'canvas-id',
input: schema => schema.object({
query: schema.string()
}),
output: schema => schema.object({
response: schema.string()
})
});
// Get canvas by application ID
const canvas = await tela.canvas.get({
applicationId: 'app-id'
});
// Execute the canvas
const execution = await canvas.execute({ query: 'Hello' });
const result = await execution.result;
Creates a new TelaFile instance from the provided file input.
Tasks API resource for managing workstation tasks (fetch, list, update, approve, rename, edit output, re-run, etc.).
Vault API resource for resolving, downloading, and streaming files stored in the Tela vault.
StaticAgentThrown when an agent session fails on the server.
StaticAPIThrown when an API request fails.
StaticAuthenticationThrown when authentication fails (e.g., invalid API key).
StaticAuthorizationThrown when the authenticated user doesn't have permission for the requested operation.
StaticBadThrown when the API returns a 400 Bad Request error.
StaticConflictStaticConflictThrown when multiple authentication methods are provided.
StaticConflictThrown when there's a conflict with the current state of the resource.
StaticConnectionThrown when there's a network connection error.
StaticConnectionThrown when a request times out.
StaticDEFAULT_StaticEmptyThrown when attempting to upload an empty file.
StaticExecutionThrown when a canvas execution fails on the server.
StaticFileThrown when there's an error during file upload.
StaticInternalThrown when an unexpected server error occurs.
StaticInvalidThrown when an invalid file URL is provided.
StaticMissingStaticMissingThrown when no authentication method is provided.
StaticNotThrown when the requested resource is not found.
StaticRateThrown when the API rate limit is exceeded.
StaticTaskThrown when a workstation task fails on the server.
StaticTelaStaticUnprocessableThrown when the request is well-formed but unable to be processed due to semantic errors.
StaticUserThrown when a request is aborted by the user.
ProtectedbuildProtectedbuildProtectedcreateOptionalopts: Record<string, string>ProtectedgetProtectedgetPerforms a request and returns the raw Response together with its AbortController, bypassing JSON parsing and case transformation.
Intended for consumers that parse the response body themselves — e.g.
custom Server-Sent Events streams whose framing differs from the chat
completion stream handled by Stream.fromSSEResponse. Reuses the
client's retry, auth, timeout, and baseURL handling.
The HTTP method to use.
Request path (relative to baseURL/opts.baseURL, or absolute).
Optionalopts: RequestOptions<Req>Request options (notably baseURL, query, and signal).
The live Response and the AbortController controlling it.
Protectedstringify
The main class for interacting with the Tela API.
Provides methods to access various Tela API resources.
Example