Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.auvy.ai/llms.txt

Use this file to discover all available pages before exploring further.

SDK recipes

Short, end-to-end snippets using the public SDK surfaces. Adjust env vars for self-hosted stacks.

API key bootstrap

import { fromApiKey } from '@auvy-synapse/client'

export async function createSynapseClient() {
  return fromApiKey(process.env.AUVY_API_KEY!)
}

Invoke + stream

import { fromApiKey } from '@auvy-synapse/client'

const auvy = await fromApiKey()
const { job_id } = await auvy.receptors.invoke('my-workspace', 'support-bot', {
  message: 'Summarize open incidents',
  stream: true,
})

for await (const chunk of auvy.receptors.createStream(job_id)) {
  if (chunk.type === 'token' && chunk.token) process.stdout.write(chunk.token)
}
See SDK streaming for resume, cancellation, and share tokens.

Browse then read asset

const auvy = await fromApiKey()
const { items } = await auvy.resources.browse({ kinds: ['asset'], limit: 20 })
const asset = await auvy.resourceStore.assets.get(items[0].id)

Connect OAuth (public API)

import { connectFromSession } from '@auvy-synapse/connect-client'

const connect = connectFromSession({ getAccessToken: () => session.access_token })

const { redirectUrl, connectionRequestId } = await connect.link(integrationId, {
  callbackUrl: `${origin}/integrations/callback`,
})
// redirect user, then on callback:
await connect.completeLink(integrationId, {
  connectionRequestId,
  query: callbackParams,
})
const tools = await connect.tools(integrationId)

Run Connect tool from a worker

import { connectRunTool } from '@auvy-synapse/connect-client/server'

const result = await connectRunTool({
  workspaceId,
  userId,
  integrationId,
  toolName: 'slack_post_message',
  toolConfig: { channel: 'C123', text: 'Done' },
  resultFormat: 'json',
})
Requires AUVY_CONNECT_URL and AUVY_CONNECT_INTERNAL_SECRET on the worker.

Human-in-the-loop respond

const auvy = await fromApiKey()
const pending = await auvy.interventions.list({ status: 'pending' })
await auvy.interventions.respond(pending[0].id, {
  action: 'approve',
  comment: 'Ship it',
})

STT vocabulary prewarm

const auvy = await fromApiKey()
await auvy.voice.prewarmSttVocabulary()
const defaults = await auvy.voice.sttVocabularyDefaults()
Pair with Transcription API for batch STT jobs.