# Decision Flow

> You're reading the Mindset v3 documentation. v3 is no longer sold; this is reference for existing customers. Mindset 4 docs are at /docs.

Use this guide to determine which Agent Builder SDK components best fit your implementation needs.

## Question 1: Do you want to use Mindset's list view UI?

#### YES - Use Mindset's List View

### Embed Builder Components

**Agent Builder**

```html
    <mindset-agents-manager></mindset-agents-manager>
```

**Context Builder**

```html
    <mindset-contexts-manager></mindset-contexts-manager>
```

### What You Get

- **Complete UI**: Full list view with cards or table
- **Search & Filter**: Built-in search and filtering capabilities
- **Edit & Delete**: Integrated edit and delete actions
- **Create New**: Built-in create functionality

> **Check:** **Best for:** Teams who want a complete out-of-box experience with minimal setup

#### NO - Build Your Own List View

### Embed Configuration Components

**Agent Configuration**

```html
    <mindset-agent-configuration></mindset-agent-configuration>
```

**Context Configuration**

```html
    <mindset-context-configuration></mindset-context-configuration>
```

### What You Build vs What SDK Handles

#### You Build

- Custom list view (tiles, cards, tables)
- Your own search and filtering
- Custom layout and styling
- Delete confirmation flows

#### SDK Handles

- Creating new resources
- Editing existing resources
- Form validation
- Save and update logic

> **Check:** **Best for:** Teams who need full control over the list view presentation

## Question 2: Who provides the knowledge/context?

- **Tenants Upload Their Own Files**: **Approach:** Embed Context Builder or Context Configuration components

  **When to use:**
  - Tenants manage their own knowledge
  - Each tenant has unique content
  - Self-service model
- **You Provide Centrally**: **Approach:** Create app-level contexts via API

  **When to use:**
  - Centralized knowledge management
  - Consistent content across tenants
  - You control all knowledge sources
- **Mix of Both**: **Approach:** Embed context components AND create app-level contexts

  **When to use:**
  - Base knowledge provided centrally
  - Tenants can add custom content
  - Hybrid knowledge model
- **Use RAG MCP Instead**: **Approach:** No contexts needed, provision RAG MCP in agent sessions

  **When to use:**
  - Using external RAG system
  - Custom vector database
  - Advanced knowledge retrieval

## Component Comparison Matrix

#### Builder Components

### `<mindset-agents-manager>` & `<mindset-contexts-manager>`

| Feature              | Status                    | Details                        |
| -------------------- | ------------------------- | ------------------------------ |
| **Purpose**          | ✅ Complete CRUD interface | Full-featured management UI    |
| **List View**        | ✅ Included                | Cards or table with pagination |
| **Search & Filter**  | ✅ Built-in                | Instant search and filtering   |
| **Create**           | ✅ Built-in dialogs        | Modal-based creation flow      |
| **Edit**             | ✅ Built-in dialogs        | Modal-based editing flow       |
| **Delete**           | ✅ Included                | Confirmation dialog included   |
| **Setup Complexity** | 🟢 Low                    | Embed and initialize           |
| **Customization**    | 🟡 Limited                | Theme colors and fonts only    |

> **Check:** **Best for:** Standard admin interfaces with minimal customization needs

#### Configuration Components

### `<mindset-agent-configuration>` & `<mindset-context-configuration>`

| Feature              | Status                   | Details                         |
| -------------------- | ------------------------ | ------------------------------- |
| **Purpose**          | ✅ Standalone create/edit | Focused configuration interface |
| **List View**        | ❌ Not included           | You build your own              |
| **Search & Filter**  | ❌ Not applicable         | You build your own              |
| **Create**           | ✅ Standalone interface   | Launch for creation             |
| **Edit**             | ✅ Standalone interface   | Pass agentUid/contextUid        |
| **Delete**           | ❌ Not included           | You implement this              |
| **Setup Complexity** | 🟡 Medium                | Build custom list view          |
| **Customization**    | 🟢 High                  | Full control over UI/UX         |

> **Check:** **Best for:** Custom UI workflows where you control the list view presentation

## Common Implementation Patterns

#### Pattern 1: Full Self-Service (Most Common)

**Use Case:** Tenants fully manage their agents and knowledge

**Components:**

- `<mindset-agents-manager>`
- `<mindset-contexts-manager>`

**Setup:**

```html
    <mindset-agents-manager></mindset-agents-manager>
    <mindset-contexts-manager></mindset-contexts-manager>
```

> **Check:** Zero configuration, complete functionality

#### Pattern 2: Centralized Knowledge

**Use Case:** You provide all knowledge, tenants just configure agents

**Components:**

- `<mindset-agents-manager>`
- App-level contexts (created via API)

**Setup:**

```html
    <mindset-agents-manager></mindset-agents-manager>
    <!-- No context builder needed -->
```

> **Check:** Simpler UI, centralized content control

#### Pattern 3: Custom List UI

**Use Case:** You need branded list views with custom layouts

**Components:**

- `<mindset-agent-configuration>`
- `<mindset-context-configuration>`
- Your custom list views

**Setup:**

```javascript
    // Your custom list
    function openAgentEditor(agentUid) {
      container.innerHTML = `
        <mindset-agent-configuration 
          agentUid="${agentUid}">
        </mindset-agent-configuration>
      `;
    }
```

> **Check:** Maximum customization, more development

#### Pattern 4: Hybrid Knowledge Model

**Use Case:** Base knowledge from you, custom knowledge from tenants

**Components:**

- `<mindset-agents-manager>`
- `<mindset-contexts-manager>`
- App-level contexts (created via API)

**Setup:**

1. Create app-level contexts via API
2. Embed both builder components
3. Tenants see app contexts + can create their own

> **Check:** Flexibility for both centralized and custom content

## Quick Reference Table

| Your Needs                              | Recommended Components                | Complexity | Customization |
| --------------------------------------- | ------------------------------------- | ---------- | ------------- |
| Complete admin interface, minimal setup | Builder Components                    | 🟢 Low     | 🟡 Limited    |
| Custom list view, SDK handles forms     | Configuration Components              | 🟡 Medium  | 🟢 High       |
| Tenants upload knowledge                | Include Context Builder/Configuration | 🟢 Low     | 🟡 Medium     |
| You provide all knowledge               | Agents only + API contexts            | 🟢 Low     | 🟡 Medium     |
| Mix of both approaches                  | All components + API contexts         | 🟡 Medium  | 🟢 High       |
| Using external RAG                      | Agents only + RAG MCP                 | 🟡 Medium  | 🟢 High       |
