Skip to main content
The Agents API lets you create, manage, and chat with agents in your nuwacom workspace programmatically, for example to provision agents from your own tooling, keep agent instructions in sync with an external source, or build custom chat experiences on top of them.

Before you start

  • API key: All endpoints require a Bearer token. Admins can create API keys in the workspace settings under the API Keys section.
  • Space scope: Agents always belong to a space, so all endpoints are nested under the space path (/api/v1/spaces/{spaceId}/agents). The caller’s role in that space must grant read permission for the Agents feature to list or read agents, and write permission to create, update, or delete them.
  • Draft & published versions: Create and update operations write to the agent’s draft. Publishing makes the draft the live version that the Completion API uses by default. API responses always show the draft state. The published field tells whether a published version exists, and hasUnpublishedChanges tells whether the draft differs from it. Who can see and use the agent is controlled separately via sharing in the nuwacom app.

Base URL

Replace {customer-tenant} with your workspace’s tenant name.

Available endpoints

Agents

Pagination

List agents is paginated. Control the page with two optional query parameters: The response is an envelope: the agents are in data, alongside pagination metadata.
Page through the full list by increasing offset by limit until hasMore is false:

Chat with an agent

To chat with an agent, use the OpenAI-compatible Completion API and pass the agent’s ID as agentId. The agent’s full configuration (system prompt, knowledge sources, model options) is applied automatically:
The model field is required on the Completion API and acts as a fallback; when the agent has a model configured, the agent’s model wins. By default, the published version of the agent is used. To chat with an agent that only exists as a draft (for example right after creating it via the API), additionally pass "agentPublished": false.

Example: create an agent

Upload files first via Upload an asset, then pass the returned id in attachmentIds. Use folderIds or contentIds for knowledge folders and nuwacom documents. The available model IDs for model can be retrieved via List available models. The response contains the new agent’s id along with all its settings. The agent starts as an unpublished draft (published: false); use Publish an agent to make it the live version.

Actions

Actions are the tools an agent may call while chatting — built-in nuwacom tools (like web search or knowledge retrieval), an MCP server’s tools, or actions from a connected integration (Gmail, Outlook, …). Configure them via the actions array on Create and Update. Each action has the following fields:

Built-in nuwacom action keys

When integration is "nuwacom", key must be one of the app-supported built-in tools:
Only the keys above are valid for nuwacom actions. Other internal nuwacom keys (e.g. RETRIEVE_FROM_CONTENT) are not configurable via the API — sending one is accepted by the API but is not a user-facing tool and will not render correctly in the app. For integration or MCP actions, use the exact key exposed by that provider/server.
On update, the actions array fully replaces the agent’s current draft actions. Send the complete desired set, or [] to remove all of them. Omitting actions leaves them unchanged. Like other changes, action edits apply to the draft — publish the agent to make them take effect for the Completion API.

Availability: app and external embed

Where an agent can be used is controlled by two independent switches, both configurable on Create and Update: embedOptions supports the following keys:
appEnabled, embedEnabled, and embedOptions are draft settings like everything else — publish the agent to make them take effect. Publishing an agent with embedEnabled: true makes the external widget live and therefore requires a non-empty embedOptions.domainWhitelist; otherwise the publish request is rejected with 400.