m4Mindset docs

Mindset v3 / Deploy in your app / Agent Configuration

View as Markdown

Create a new agent

Create a new agent with full configuration options including personality, formatting, policies, and memory settings.

POST /api/v2/appuid/{appUid}/agents

Create a new agent with full configuration options including personality, formatting, policies, and memory settings.

Base URL

Requests go to your region's API host, for example https://a.api.mindset.ai. Hosts: https://a.api.mindset.ai, https://b.api.mindset.ai, https://c.api.mindset.ai, https://d.api.mindset.ai.

Authorization

x-api-keystringheaderrequired

Your API key.

Path parameters

appUidstringpathrequired

Your application's uid

Request body

Content type: application/json.

agentNamestringbodyrequired

Name of the agent

agentPurposestringbodyrequired

Purpose of the agent

templateAgentUidstringbody

UID of an existing agent to use as a template for sources presentation options (citations, references etc)

personalityobjectbody

Agent personality configuration

formattingobjectbody

Agent response formatting configuration

policiesobjectbody

Agent policy configuration with 10 toggleable policies

additionalPolicyRulesstringbody

Additional free-form policy rules

additionalInformationstringbody

Additional context information for the agent

iceBreakerMessagestringbody

Invisible instruction to prompt the agent to greet users in a specific way

memoryobjectbody

Agent memory configuration. Note: Memory access must be enabled at the app level for these settings to take effect.

optionsobjectbody

SDK3 display options. Only present for apps with SDK3 enabled (labsSDKV3Beta: true).

livebooleanbody

Agent is active and live for end users

Default: false.

showPromptLibrarybooleanbody

Show prompt library in SDK UI

Default: false.

contextUidsstring[]body

Array of existing context UIDs (max 30)

mcpserverUidsstring[]body

Array of existing MCP server UIDs (max 5)

planUidsstring[]body

Array of existing plan UIDs (max 20)

skillUidsstring[]body

Array of existing skill UIDs (max 20)

tagsstring[]body

Array of tags (max 10)

accessstringbody

Access control mode for this agent

One of: openAccess, restrictedAccess. Default: "restrictedAccess".

externalTenantIdstringbody

External tenant identifier (alphanumeric, underscore, hyphen only)

json
{
  "agentName": "string",
  "agentPurpose": "string",
  "templateAgentUid": "string",
  "personality": {
    "preset": "friendly",
    "customText": "string"
  },
  "formatting": {
    "preset": "conversational",
    "customText": "string"
  },
  "policies": {
    "focusAndScope": {
      "enabled": true,
      "scope": "string"
    },
    "knowledgeLimits": {
      "enabled": true,
      "themeSpecificAllowance": "string"
    },
    "nonContextSegmentMessage": {
      "enabled": true,
      "message": "string"
    },
    "clarification": {
      "enabled": true
    },
    "recommendations": {
      "enabled": true
    },
    "neutrality": {
      "enabled": true
    },
    "professionalConduct": {
      "enabled": true
    },
    "legalFinancial": {
      "enabled": true
    },
    "safeguarding": {
      "enabled": true,
      "email": "string"
    },
    "feedback": {
      "enabled": true
    }
  },
  "additionalPolicyRules": "string",
  "additionalInformation": "string",
  "iceBreakerMessage": "string",
  "memory": {
    "allowAccess": true,
    "allowContribution": true,
    "miningGuidance": "string"
  },
  "options": {
    "showSourceContent": true,
    "sourceDisplayStyle": "compact",
    "sourceCardType": "segments",
    "showSpeakers": true,
    "showFollowUpQuestions": true,
    "showCitations": true,
    "showQuickReplies": true
  },
  "live": true,
  "showPromptLibrary": true,
  "contextUids": [
    "string"
  ],
  "mcpserverUids": [
    "string"
  ],
  "planUids": [
    "string"
  ],
  "skillUids": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "access": "openAccess",
  "externalTenantId": "string"
}

Responses

201

Agent created successfully

json
{
  "uid": "string",
  "agentName": "string",
  "agentPurpose": "string",
  "personality": {
    "preset": "friendly",
    "customText": "string"
  },
  "formatting": {
    "preset": "conversational",
    "customText": "string"
  },
  "policies": {
    "focusAndScope": {
      "enabled": true,
      "scope": "string"
    },
    "knowledgeLimits": {
      "enabled": true,
      "themeSpecificAllowance": "string"
    },
    "nonContextSegmentMessage": {
      "enabled": true,
      "message": "string"
    },
    "clarification": {
      "enabled": true
    },
    "recommendations": {
      "enabled": true
    },
    "neutrality": {
      "enabled": true
    },
    "professionalConduct": {
      "enabled": true
    },
    "legalFinancial": {
      "enabled": true
    },
    "safeguarding": {
      "enabled": true,
      "email": "string"
    },
    "feedback": {
      "enabled": true
    }
  },
  "additionalPolicyRules": "string",
  "additionalInformation": "string",
  "iceBreakerMessage": "string",
  "memory": {
    "allowAccess": true,
    "allowContribution": true,
    "miningGuidance": "string"
  },
  "options": {
    "showSourceContent": true,
    "sourceDisplayStyle": "compact",
    "sourceCardType": "segments",
    "showSpeakers": true,
    "showFollowUpQuestions": true,
    "showCitations": true,
    "showQuickReplies": true
  },
  "live": true,
  "showPromptLibrary": true,
  "contextUids": [
    "string"
  ],
  "mcpserverUids": [
    "string"
  ],
  "planUids": [
    "string"
  ],
  "skillUids": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "access": "openAccess",
  "externalTenantId": "string",
  "createdAt": "string"
}

400

Bad Request - Invalid input

401

Unauthorized

403

Forbidden

404

Not Found - Template agent does not exist

422

Unprocessable Entity - Validation error

500

Internal Server Error

Example request

bash
curl -X POST "https://a.api.mindset.ai/api/v2/appuid/{appUid}/agents" \
  -H "x-api-key: <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{"agentName":"string","agentPurpose":"string","templateAgentUid":"string","personality":{"preset":"friendly","customText":"string"},"formatting":{"preset":"conversational","customText":"string"},"policies":{"focusAndScope":{"enabled":true,"scope":"string"},"knowledgeLimits":{"enabled":true,"themeSpecificAllowance":"string"},"nonContextSegmentMessage":{"enabled":true,"message":"string"},"clarification":{"enabled":true},"recommendations":{"enabled":true},"neutrality":{"enabled":true},"professionalConduct":{"enabled":true},"legalFinancial":{"enabled":true},"safeguarding":{"enabled":true,"email":"string"},"feedback":{"enabled":true}},"additionalPolicyRules":"string","additionalInformation":"string","iceBreakerMessage":"string","memory":{"allowAccess":true,"allowContribution":true,"miningGuidance":"string"},"options":{"showSourceContent":true,"sourceDisplayStyle":"compact","sourceCardType":"segments","showSpeakers":true,"showFollowUpQuestions":true,"showCitations":true,"showQuickReplies":true},"live":true,"showPromptLibrary":true,"contextUids":["string"],"mcpserverUids":["string"],"planUids":["string"],"skillUids":["string"],"tags":["string"],"access":"openAccess","externalTenantId":"string"}'