Skip to navigation

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.

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

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.

{
"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.

const 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.

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

Parameters

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

Response

Returns an array of Mind objects.

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

Search Minds

Perform a search query against names or emails.

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

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.

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

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.

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

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.

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

Parameters

ParameterTypeRequiredDescription
mindIdstringYesThe ID of the mind to delete.

Response

{
"success": true
}