Skip to main content
UserChatSettings is a TypeScript type in the Relevance AI Node.js SDK that lets you configure the chat interface when starting or managing an agent conversation programmatically. It controls which mounts (built-in capabilities like file upload or code execution) and agent skills (other agents callable from within the conversation) are enabled or disabled.

Concepts

Mounts are named capabilities that can be attached to a chat session. Each mount maps to a feature the agent can use during a conversation — for example, accessing files, running code, or calling external services. Disabling a mount prevents the agent from using that capability in a given session. Agent skills are agents that have been configured as callable skills from within another agent’s conversation. Each skill is identified by its agent ID. You can control whether a given skill is available to the agent in a specific session.

API structure

UserChatSettings takes an object where keys are mount names or agent IDs. Each value is an object with a single boolean field.
type UserChatSettings = {
  // Mount configuration: mountName -> { is_enabled: boolean }
  [mountName: string]: { is_enabled: boolean };
} | {
  // Agent skill configuration: agentId -> { is_skill: boolean }
  [agentId: string]: { is_skill: boolean };
}

Mount format

{
  [mountName: string]: {
    is_enabled: boolean; // true = mount is active, false = mount is disabled
  }
}

Agent skill format

{
  [agentId: string]: {
    is_skill: boolean; // true = agent is available as a skill, false = agent is not available
  }
}

Usage examples

Enable and disable mounts

import { RelevanceAI } from "@relevanceai/chain";

const client = new RelevanceAI({
  apiKey: process.env.RELEVANCE_API_KEY,
  projectId: process.env.RELEVANCE_PROJECT_ID,
  region: process.env.RELEVANCE_REGION,
});

// Enable a specific mount, disable another
const chatSettings = {
  file_upload: { is_enabled: true },
  code_execution: { is_enabled: false },
};

await client.agents.trigger({
  agentId: "your-agent-id",
  message: { role: "user", content: "Hello" },
  userChatSettings: chatSettings,
});

Control agent skills

import { RelevanceAI } from "@relevanceai/chain";

const client = new RelevanceAI({
  apiKey: process.env.RELEVANCE_API_KEY,
  projectId: process.env.RELEVANCE_PROJECT_ID,
  region: process.env.RELEVANCE_REGION,
});

// Make a specific agent available as a skill, disable another
const chatSettings = {
  "agent-id-for-research": { is_skill: true },
  "agent-id-for-outreach": { is_skill: false },
};

await client.agents.trigger({
  agentId: "your-agent-id",
  message: { role: "user", content: "Start the research workflow" },
  userChatSettings: chatSettings,
});

Combine mounts and agent skills

const chatSettings = {
  // Mounts
  file_upload: { is_enabled: true },
  web_search: { is_enabled: true },
  code_execution: { is_enabled: false },

  // Agent skills
  "a1b2c3d4-research-agent": { is_skill: true },
  "e5f6g7h8-outreach-agent": { is_skill: false },
};

Deprecated format

The following format is deprecated. It still works but will be removed in a future release. Migrate to the new format above.
The old format used two separate list fields:
// Deprecated — do not use in new code
{
  disabled_mounts: string[];  // list of mount names to disable
  disabled_skills: string[];  // list of agent IDs to disable
}
Why the new format is preferred: The object format makes each entry’s intent explicit — you can see at a glance whether a mount is enabled or disabled without inferring from inclusion in a list. It also removes the ambiguity around what the default state is when a mount or skill is not listed.

Migrating from the old format

Old code using disabled_mounts:
// Old format (deprecated)
const chatSettings = {
  disabled_mounts: ["code_execution", "file_upload"],
};
Equivalent new format:
// New format
const chatSettings = {
  code_execution: { is_enabled: false },
  file_upload: { is_enabled: false },
};
Mounts not listed in the new format retain their default state. If you previously relied on the absence from disabled_mounts to mean “enabled”, explicitly set is_enabled: true for those entries to be unambiguous.
Old code using disabled_skills:
// Old format (deprecated)
const chatSettings = {
  disabled_skills: ["a1b2c3d4-research-agent"],
};
Equivalent new format:
// New format
const chatSettings = {
  "a1b2c3d4-research-agent": { is_skill: false },
};
Old code with both fields:
// Old format (deprecated)
const chatSettings = {
  disabled_mounts: ["code_execution"],
  disabled_skills: ["a1b2c3d4-research-agent", "e5f6g7h8-outreach-agent"],
};
Equivalent new format:
// New format
const chatSettings = {
  code_execution: { is_enabled: false },
  "a1b2c3d4-research-agent": { is_skill: false },
  "e5f6g7h8-outreach-agent": { is_skill: false },
};

SDK & API triggers

Trigger agents programmatically using the SDK or HTTP API

Conversation API

Create and continue conversations with agents via the API