Minds Resource

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.

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

Parameters

ParameterTypeRequiredDescription
namestringYesThe display name of the mind.
emailstringNoAn email associated with the person (used for identification).
imageUrlstringNoURL to an avatar image.
socialMediaRecord<string, any>NoKey-value pairs of social handles.
tagsstring[]NoAn array of tag names to categorize the mind.

Response

Returns a Mind object.

1{
2 "id": "ac8ac8c4-05e9-4046-a919-4cbae2f49f22",
3 "name": "Sarah Connor",
4 "email": "sarah@resistance.org",
5 "slug": "sarah-connor",
6 "scope": "private",
7 "isSelf": false,
8 "organizationId": "961b1800-6bd2-444c-8bfa-8dd82b5e80f3",
9 "createdAt": "2023-10-27T10:00:00Z",
10 "updatedAt": "2023-10-27T10:00:00Z",
11 "socialMedia": {
12 "twitter": "@sarah_c"
13 },
14 "tags": [
15 { "id": "5625...", "name": "leader" },
16 { "id": "e4d9...", "name": "strategist" }
17 ]
18}

Retrieve a Mind

Get details about a specific mind by its ID.

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

Parameters

ParameterTypeRequiredDescription
mindIdstringYesThe unique identifier of the mind.

Response

Returns a Mind object (same structure as Create).


List Minds

Retrieve all minds available to your organization.

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

Parameters

ParameterTypeRequiredDescription
tagsstring[]NoFilter minds that contain any of the provided tags.

Response

Returns an array of Mind objects.

1[
2 {
3 "id": "779e640c...",
4 "name": "Bobby Tables",
5 "tags": [{ "id": "...", "name": "developer" }]
6 // ... additional mind fields
7 }
8]

Search Minds

Perform a search query against names or emails.

1const results = await mindsim.minds.search({
2 query: "Sarah"
3});

Parameters

ParameterTypeRequiredDescription
querystringYesThe search string (matches name or email).

Response

Returns an array of Mind objects.


Update a Mind

Update metadata for an existing mind.

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

Parameters

ParameterTypeRequiredDescription
mindIdstringYesThe ID of the mind to update.
data.namestringNoNew display name.
data.emailstringNoNew email address.
data.socialMediaobjectNoUpdated social media object.
data.tagsstring[]NoReplaces 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.

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

Parameters

ParameterTypeRequiredDescription
mindIdstringYesThe ID of the mind.
data.tagsstring[]YesThe new list of tags.

Response

Returns the updated Mind object.


Delete a Mind

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

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

Parameters

ParameterTypeRequiredDescription
mindIdstringYesThe ID of the mind to delete.

Response

1{
2 "success": true
3}