> This page is for version v8.3.0 (default).
> For other versions, use one of these documentation indexes:
> - v8.3.0 (default): https://docs.workflows.com/v-8-3-0/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.workflows.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.workflows.com/_mcp/server.

# Minds Resource

> Manage digital minds using the SDK.

# Minds

A **Mind** is the core resource in MindSim. It represents a digital profile of a person, acting as a container for training data (Snapshots) and the target for Simulations.

## Create a Mind

Create a new digital mind.

```typescript
const mind = await mindsim.minds.create({
  name: "Sarah Connor",
  email: "sarah@resistance.org",
  tags: ["leader", "strategist"],
  socialMedia: { twitter: "@sarah_c" }
});
```

### Parameters

| Parameter     | Type                  | Required | Description                                                    |
| :------------ | :-------------------- | :------- | :------------------------------------------------------------- |
| `name`        | `string`              | Yes      | The display name of the mind.                                  |
| `email`       | `string`              | No       | An email associated with the person (used for identification). |
| `imageUrl`    | `string`              | No       | URL to an avatar image.                                        |
| `socialMedia` | `Record<string, any>` | No       | Key-value pairs of social handles.                             |
| `tags`        | `string[]`            | No       | An array of tag names to categorize the mind.                  |

### Response

Returns a `Mind` object.

```json
{
  "id": "ac8ac8c4-05e9-4046-a919-4cbae2f49f22",
  "name": "Sarah Connor",
  "email": "sarah@resistance.org",
  "slug": "sarah-connor",
  "scope": "private",
  "isSelf": false,
  "organizationId": "961b1800-6bd2-444c-8bfa-8dd82b5e80f3",
  "createdAt": "2023-10-27T10:00:00Z",
  "updatedAt": "2023-10-27T10:00:00Z",
  "socialMedia": {
    "twitter": "@sarah_c"
  },
  "tags": [
    { "id": "5625...", "name": "leader" },
    { "id": "e4d9...", "name": "strategist" }
  ]
}
```

---

## Retrieve a Mind

Get details about a specific mind by its ID.

```typescript
const mind = await mindsim.minds.get("mind-id-uuid");
```

### Parameters

| Parameter | Type     | Required | Description                        |
| :-------- | :------- | :------- | :--------------------------------- |
| `mindId`  | `string` | Yes      | The unique identifier of the mind. |

### Response

Returns a `Mind` object (same structure as Create).

---

## List Minds

Retrieve all minds available to your organization.

```typescript
const devMinds = await mindsim.minds.list({
  tags: ["developer", "typescript"]
});
```

### Parameters

| Parameter | Type       | Required | Description                                           |
| :-------- | :--------- | :------- | :---------------------------------------------------- |
| `tags`    | `string[]` | No       | Filter minds that contain *any* of the provided tags. |

### Response

Returns an array of `Mind` objects.

```json
[
  {
    "id": "779e640c...",
    "name": "Bobby Tables",
    "tags": [{ "id": "...", "name": "developer" }]
    // ... additional mind fields
  }
]
```

---

## Search Minds

Perform a search query against names or emails.

```typescript
const results = await mindsim.minds.search({
  query: "Sarah"
});
```

### Parameters

| Parameter | Type     | Required | Description                                |
| :-------- | :------- | :------- | :----------------------------------------- |
| `query`   | `string` | Yes      | The search string (matches name or email). |

### Response

Returns an array of `Mind` objects.

---

## Update a Mind

Update metadata for an existing mind.

```typescript
const updatedMind = await mindsim.minds.update("mind-id-uuid", {
  name: "Sarah J. Connor",
  tags: ["hero"]
});
```

### Parameters

| Parameter          | Type       | Required | Description                                        |
| :----------------- | :--------- | :------- | :------------------------------------------------- |
| `mindId`           | `string`   | Yes      | The ID of the mind to update.                      |
| `data.name`        | `string`   | No       | New display name.                                  |
| `data.email`       | `string`   | No       | New email address.                                 |
| `data.socialMedia` | `object`   | No       | Updated social media object.                       |
| `data.tags`        | `string[]` | No       | **Replaces** the existing tags with this new list. |

### Response

Returns the updated `Mind` object.

---

## Set Tags

Explicitly replace all tags for a mind using a dedicated endpoint.

```typescript
const mind = await mindsim.minds.setTags("mind-id-uuid", {
  tags: ["priority", "archived"]
});
```

### Parameters

| Parameter   | Type       | Required | Description           |
| :---------- | :--------- | :------- | :-------------------- |
| `mindId`    | `string`   | Yes      | The ID of the mind.   |
| `data.tags` | `string[]` | Yes      | The new list of tags. |

### Response

Returns the updated `Mind` object.

---

## Delete a Mind

Permanently remove a mind and all associated snapshots and simulation history.

```typescript
await mindsim.minds.delete("mind-id-uuid");
```

### Parameters

| Parameter | Type     | Required | Description                   |
| :-------- | :------- | :------- | :---------------------------- |
| `mindId`  | `string` | Yes      | The ID of the mind to delete. |

### Response

```json
{
  "success": true
}
```