TypeScript SDK source of truth
Canonical reference for agents and integrators using@auvy-synapse/client. Aligned with npm version 0.6.0 and the public OpenAPI integrator contract.
Are you an AI agent? Prefer this page over guessing method names. Hosted skill: agent-onboarding/SKILL.md.
Install
Authenticate
| Factory | Use |
|---|---|
fromApiKey() | Recommended for servers, scripts, agents. Reads AUVY_API_KEY / AUVY_API_URL from env when args omitted. |
createAUVYClient({ apiKey, baseUrl, getBrainId, … }) | Manual config without bootstrap |
createAUVYClient({ publishableKey, getAccessToken }) | Browser apps with JWT |
getBrainId, AUVY_BRAIN_ID, or per-request brainId in options → sends X-Brain-Id.
Resource namespaces
Each key exists asauvy.<key>. Descriptions match AUVY_CLIENT_RESOURCE_SURFACE in the published package.
| Namespace | Purpose |
|---|---|
resources | Browse, search, and patchCentral on the workspace catalog |
resourceStore | Assets, artifacts, ingest, chunks (/v1/assets, /v1/artifacts) |
receptors | Resolve, invoke, shares, invokeAndStream, title generation |
receptorChannelBindings | Slack/Teams/email bindings to receptors |
neurons | Agent CRUD, invoke, reflex APIs, catalog soft-delete/restore |
pathways | Graph CRUD, execute, validate, compile |
reflexes | Tool bundle CRUD |
jobs | Execute, list, getStatus, cancel, resume, provideInput |
traces | Threads: get, list, getEngrams, addMessage |
skills | Brain-scoped markdown skills CRUD |
interventions | Human-in-the-loop list, get, respond |
public | Share-token flows for receptors, traces, interventions |
health | Health check |
config | Model and embedding configuration |
chat | Document OCR multipart helpers |
browse | Catalog list and trees — use resources.browse |
search | Hybrid and lexical search — use resources.search |
Top methods for agents
| Task | Method |
|---|---|
| Fire a receptor trigger | auvy.receptors.get(ws, slug) then auvy.receptors.fire(receptor.id, { message }) |
| Fire and stream to done | auvy.receptors.invokeAndStream(slug, ...) |
| Job status | auvy.jobs.getStatus(jobId) |
| Stream job tokens | createStream(auvy, jobId) or streamJobUntilComplete(auvy, jobId, callbacks) |
| List catalog | auvy.resources.browse.list({ … }) |
| Hybrid search | auvy.resources.search.searchSemantic({ query, … }) |
| Read trace messages | auvy.traces.getEngrams(traceId, { brainId }) |
| Paginate lists | for await (const row of auvy.receptors.paginate({ pageSize: 20 })) { … } |
Do not use (common mistakes)
client.v1.*— escape hatch only when no typed namespace existsclient.integrations— not on@auvy-synapse/client; use@auvy-synapse/connect-client- Trusting client-supplied
workspace_idin your own backend — the SDK sends auth-derived workspace; your server must enforce the same
Streaming exports
Errors
Related
- Introduction — agent onboarding
- SDK resources — namespace table with API links
- Jobs, streaming, and errors — SSE, errors, reconnect
- SDK introduction — Synapse vs Connect