Available Components Overview
The AMS SDK provides four main components for agent and context management:Agents Manager
<mindset-agents-manager>Display all agents with create/edit/delete capabilitiesAgent Configuration
<mindset-agent-configuration>Standalone agent creation/editing interfaceContexts Manager
<mindset-contexts-manager>Display all knowledge contexts with create/edit/delete capabilitiesContext Configuration
<mindset-context-configuration>Standalone context creation/editing interfaceComponent Comparison Matrix
- Manager Components
- Configuration Components
Components:
<mindset-agents-manager><mindset-contexts-manager>
- ✅ Complete CRUD interface
- ✅ List view included
- ✅ Built-in create/edit dialogs
- ✅ Delete functionality
- ✅ Search and filtering
- Min Height: 600px
Use Case 1: Agent Management with Agents Manager
This flow shows how to embed a complete agent management interface where tenant administrators can view, create, edit, and delete agents in one unified interface.Prerequisites
externalTenantId
The unique identifier for the tenant organization
externalId
The unique identifier for the admin user within your system
appUid
Your application’s unique identifier provided by Mindset
Step-by-Step Flow
1
Authenticate the Tenant Admin
Call the SDKUsers Auth API to create an auth token for the tenant admin user:Response:
This call:
- Creates or updates the user in Mindset’s system
- Registers them as an admin of the specified externalTenantId
- Returns an auth token scoped to that tenant
2
Construct the Web Page with Agents Manager
Create an HTML page containing the Agents Manager component:
Key Benefits:
- Zero configuration - complete agent management in one component
- Built-in list view with search and filtering
- Automatic create/edit dialogs
- Delete confirmation handling
3
Optional - Control Displayed Tabs
You can control which configuration tabs are shown in the agent dialogs:Available tabs: Policy, Options, LLM, Contexts, Bias, Preview
Settings and Personality tabs are always displayed.
Use Case 2: Standalone Agent Creation/Editing
This flow shows how to embed a standalone agent creation or editing interface.Prerequisites
Authentication
Same as Use Case 1
agentUid (optional)
UID of existing agent to edit
Step-by-Step Flow
1
Authenticate
Follow the authentication steps from Use Case 1.
2
Construct the Web Page with Agent Configuration
- Creating a New Agent
- Editing an Existing Agent
3
Configuration Component Integration Pattern
For dynamic Configuration Component, create fresh elements each time:
Use Case 3: Knowledge Context Management with Contexts Manager
This flow shows how to embed a complete knowledge context management interface where tenant administrators can view, create, edit, and delete contexts.What are Knowledge Contexts?Knowledge Contexts are bundles of files, links, and data that agents can reference—essentially a dynamic library for your agents.
Prerequisites
Same as Use Case 1 (authentication and tenant setup)Step-by-Step Flow
1
Authenticate
Follow the authentication steps from Use Case 1.
2
Construct the Web Page with Contexts Manager
Create an HTML page containing the Contexts Manager component:
Key Benefits:
- Complete context management in one component
- Built-in list view with search capabilities
- Automatic create/edit dialogs
- Delete confirmation handling
3
Optional - Control Displayed Tabs
You can control which configuration tabs are shown in the context dialogs:Available tabs: Prompts, Bias
General tab is always displayed.
Use Case 4: Standalone Context Creation/Editing
This flow shows how to embed a standalone context creation or editing interface.Prerequisites
Authentication
Same as Use Case 1
contextUid (optional)
UID of existing context to edit
Step-by-Step Flow
1
Authenticate
Follow the authentication steps from Use Case 1.
2
Construct the Web Page with Context Configuration
- Creating a New Context
- Editing an Existing Context
3
Configuration Component Integration Pattern
For dynamic configuration component, create fresh elements each time:
Understanding fetchAuthentication
ThefetchAuthentication parameter is a function that returns a Promise resolving to an auth token. This enables a deferred authentication pattern:
1
Page Loads
Your page loads and displays the AMS SDK UI immediately
2
SDK Requests Auth
The SDK calls
fetchAuthentication() only when it actually needs authentication3
Client Calls Backend
Your client-side code makes a request to your backend API
4
Backend Generates Token
Your backend calls the Mindset SDKUsers Auth API to generate the token
5
Token Returned
Your backend returns the token to your frontend
6
SDK Authenticated
The SDK uses the token for authenticated operations
Example Implementation
- Client-side Code
- Backend API (Node.js/Express)
Benefits of this approach:
- API key security: Your Mindset API key never leaves your backend
- Faster UI rendering: The page displays immediately without waiting for authentication
- Session validation: Your backend can verify the user’s session before generating tokens
- Token refresh: The SDK will call
fetchAuthentication()again if tokens expire
Component Attributes Reference
Agents Manager
| Attribute | Type | Description |
|---|---|---|
| displayTabs | string (optional) | Comma-separated list of tabs to display. Available: Policy, Options, LLM, Contexts, Bias, Preview |
Agent Configuration
| Attribute | Type | Description |
|---|---|---|
| agentUid | string (optional) | UID of agent to edit. Omit for create mode. |
| onClose | string (optional) | JavaScript code to execute when configuration component is closed |
| displayTabs | string (optional) | Comma-separated list of tabs to display. Available: Policy, Options, LLM, Contexts, Bias, Preview |
Contexts Manager
| Attribute | Type | Description |
|---|---|---|
| displayTabs | string (optional) | Comma-separated list of tabs to display. Available: Prompts, Bias |
Context Configuration
| Attribute | Type | Description |
|---|---|---|
| contextUid | string (optional) | UID of context to edit. Omit for create mode. |
| onClose | string (optional) | JavaScript code to execute when configuration component is closed |
| displayTabs | string (optional) | Comma-separated list of tabs to display. Available: Prompts, Bias |
Security Best Practices
Tenant Admin Authentication
Tenant Admin Authentication
- The
externalTenantIdin the auth call registers the user as an admin for that tenant - Backend validates that the user is authorized before allowing any create/edit operations
- Tenant admins can only see and manage resources tagged with their
externalTenantId
Auth Token Security
Auth Token Security
- Auth tokens should be generated server-side, not exposed in client code
- Implement the
fetchAuthenticationcallback to request tokens from your backend - Tokens have expiration times and will be refreshed automatically by the SDK
- Never hardcode API keys in client-side code
Dynamic Element Creation
Dynamic Element Creation
Important: When using configuration components in modals or overlays, always create a fresh element each time:✅ CORRECT:❌ INCORRECT:
Receiving Notifications (Optional)
When users save agents or contexts, you have two options to get the resource details:- Option A: Webhook Notification
- Option B: Query the API
If you’ve registered a webhook for events, you’ll receive a notification within 5 seconds:
Next Steps
Complete Integration Guide
See the full AMS SDK documentation for detailed customization options
Webhook Setup
Configure webhooks to receive real-time notifications for agent and context events
API Reference
Explore the complete API documentation for Agents, Contexts, and SDKUsers APIs
Theme Customization
Learn how to customize the SDK appearance to match your platform’s branding