# Autessa SDK

Source: https://docs.autessa.com/docs/autessascript/sdk

> The autessa.* SDK lets AutessaScript drive the whole platform synchronously, acting as the invoking user with their exact permissions.

# Autessa SDK

The `autessa` global gives AutessaScript synchronous access to everything a logged-in user can do on the platform — creating and running agents, querying and writing AutessaDB tables, managing tools, scheduled jobs, connectors, e-signature envelopes, custom apps, and more — organized into namespaces like `autessa.agents` and `autessa.autessadb`.

## Acts as you

Every `autessa.*` call runs as the script's invoking user, through the exact same permission checks, resource-sharing rules, and audit logging as if that user had clicked the equivalent button in the product. A script can never do more than its user, and never less — there is no separate "script identity" with elevated or reduced access.

## Calls are synchronous

Unlike a browser, which fires requests and updates the UI when a response arrives, every `autessa.*` call blocks until it completes and returns its result directly:

```javascript
const result = autessa.agents.create({
  agentName: "Support Triage",
  agentType: "CONVERSATIONAL",
});

if (result.ok) {
  console.log("Created agent:", result.data.agentId);
}
```

There is no `await`, no callback, and no promise — AutessaScript itself is synchronous end to end (see [The sandbox](/docs/autessascript/sandbox.md)), and the SDK follows the same model.

## The result envelope

Every call returns one of two shapes:

```javascript
// Success
{ ok: true, data: { /* the method's response fields */ } }

// Failure
{ ok: false, errorCode: "...", errors: ["human-readable message", ...] }
```

Always check `ok` before reading `data` — a failed call never throws, it returns `ok: false` with `errorCode` and `errors` describing what went wrong. This is the one failure signal for every method: validation problems, permission denials, and downstream errors all normalize to the same shape.

## Updates are safe-merged by default

Update-style methods (`autessa.<namespace>.update`, and similarly named methods across namespaces) treat the fields you pass as a **patch**, not a full replacement. Only the fields you include are changed; every other field on the entity keeps its current value:

```javascript
// Only agentName changes. Every other field on the agent — its type, tools,
// prompt, sharing settings — is left exactly as it was.
autessa.agents.update({
  agentId: existingAgentId,
  agentName: "New Name",
});
```

Pass `{ replace: true }` as part of the call to opt out and replace the entity wholesale with exactly the fields you provide:

```javascript
autessa.agents.update({
  agentId: existingAgentId,
  agentName: "New Name",
  replace: true,
});
```

Prefer the default safe-merge behavior unless you specifically intend a full replacement — it is much harder to accidentally clobber a field you didn't mean to touch.

## Ids are opaque strings

Every resource id in the SDK — `agentId`, `tableId`, `connectorId`, and so on — is an opaque string. Treat ids as values to pass back to the SDK, not as something to parse, decode, or construct yourself. They are stable for the life of the resource but carry no meaning beyond identifying it.

## Discovering the surface

The SDK is large — dozens of namespaces, hundreds of methods — so it isn't dumped into this page. Instead:

- **In the copilot / an LLM context**, use the progressive-discovery tools: `list_sdk_namespaces` to see every namespace, `search_sdk_capabilities(query)` to search by keyword, `get_sdk_namespace_overview(namespace)` for one namespace's full method list, and `get_sdk_method_details(names)` for the request/response fields of specific methods.
- **In these docs**, each namespace below has its own reference page listing every method, its call signature, and its request/response fields.
- **In the script editor**, typing `autessa.` triggers autocomplete for namespaces and methods, with inline signatures and field lists — the same data these docs and the discovery tools are generated from.

## Namespaces

- [autessa.agents](/docs/autessascript/sdk/agents.md) — create, configure, publish, and run agent conversations.
- [autessa.autessadb](/docs/autessascript/sdk/autessadb.md) — tables, rows, queries, triggers, and computed columns.
- [autessa.tools](/docs/autessascript/sdk/tools.md) — create and execute tools, including other scripts.
- [autessa.scheduledEvents](/docs/autessascript/sdk/scheduledEvents.md) — scheduled and recurring jobs.
- [autessa.mcp](/docs/autessascript/sdk/mcp.md) — MCP server configuration.
- [autessa.app](/docs/autessascript/sdk/customAppsV2.md) — Custom Apps: create, publish, share, versions, and domains.
- [autessa.eSignature](/docs/autessascript/sdk/eSignature.md) — e-signature envelopes and templates.
- [autessa.meetings](/docs/autessascript/sdk/meetingRecorder.md) — meeting recordings and transcripts.

The full namespace list — including per-connector namespaces like `autessa.connectors.gmail`, `autessa.connectors.notion`, and `autessa.connectors.quickbooks` — is available via `list_sdk_namespaces` or the editor's autocomplete.

## Related

- [AutessaScript overview](/docs/autessascript.md)
- [The sandbox](/docs/autessascript/sandbox.md)
- [Tool invocation helper](/docs/autessascript/helpers/tools.md)

