Available Components Overview
The Agent Builder SDK provides four main components for agent and context management:Agent Builder
<mindset-agents-manager>Display all agents with create/edit/delete capabilitiesAgent Configuration
<mindset-agent-configuration>Standalone agent creation/editing interfaceContext Builder
<mindset-contexts-manager>Display all knowledge contexts with create/edit/delete capabilitiesContext Configuration
<mindset-context-configuration>Standalone context creation/editing interfaceComponent Comparison Matrix
- Builder Components
- Configuration 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 Agent Builder
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
externalId
appUid
Step-by-Step Flow
Authenticate the Tenant Admin
- 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
Construct the Web Page with Agent Builder
- Zero configuration - complete agent management in one component
- Built-in list view with search and filtering
- Automatic create/edit dialogs
- Delete confirmation handling
Optional - Control Displayed Tabs
Use Case 2: Standalone Agent Creation/Editing
This flow shows how to embed a standalone agent creation or editing interface.Prerequisites
Authentication
agentUid (optional)
Step-by-Step Flow
Authenticate
Construct the Web Page with Agent Configuration
- Creating a New Agent
- Editing an Existing Agent
Configuration Component Integration Pattern
Use Case 3: Knowledge Context Management with Context Builder
This flow shows how to embed a complete knowledge context management interface where tenant administrators can view, create, edit, and delete contexts.Prerequisites
Same as Use Case 1 (authentication and tenant setup)Step-by-Step Flow
Authenticate
Construct the Web Page with Context Builder
- Complete context management in one component
- Built-in list view with search capabilities
- Automatic create/edit dialogs
- Delete confirmation handling
Optional - Control Displayed Tabs
Use Case 4: Standalone Context Creation/Editing
This flow shows how to embed a standalone context creation or editing interface.Prerequisites
Authentication
contextUid (optional)
Step-by-Step Flow
Authenticate
Construct the Web Page with Context Configuration
- Creating a New Context
- Editing an Existing Context
Configuration Component Integration Pattern
Understanding fetchAuthentication
ThefetchAuthentication parameter is a function that returns a Promise resolving to an auth token. This enables a deferred authentication pattern:
Page Loads
SDK Requests Auth
fetchAuthentication() only when it actually needs authenticationClient Calls Backend
Backend Generates Token
Token Returned
SDK Authenticated
Example Implementation
- Client-side Code
- Backend API (Node.js/Express)
- 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
Agent Builder
Agent Configuration
Context Builder
Context Configuration
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
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