MagickMind
PythonResources

Blueprint (v1)

Reference for magick_mind.resources.v1.blueprint.

magick_mind.resources.v1.blueprint

V1 blueprint resource implementation.

BlueprintResourceV1

class BlueprintResourceV1(BaseResource)

Blueprint resource client for V1 API.

Blueprints are reusable persona trait templates that define traits, growth behavior, and dyadic learning config.

Example:

Create a blueprint

bp = await client.v1.blueprint.create( blueprint_id="friendly-bot", name="Friendly Bot", category="social", namespace="USER", visibility="PRIVATE", )

List blueprints

response = await client.v1.blueprint.list() for bp in response.data: print(bp.name)

BlueprintResourceV1.create

async def create(blueprint_id: str,
                 name: str,
                 category: str,
                 namespace: Namespace,
                 visibility: Visibility,
                 description: Optional[str] = None,
                 traits: Optional[list[BlueprintTrait]] = None,
                 default_growth: Optional[GrowthConfig] = None,
                 default_dyadic: Optional[DyadicConfig] = None) -> Blueprint

Create a new blueprint.

Arguments:

  • blueprint_id - Unique blueprint identifier
  • name - Blueprint name
  • category - Blueprint category
  • namespace - Namespace (SYSTEM, USER, or ORG)
  • visibility - Visibility (PRIVATE, ORG, or PUBLIC)
  • description - Optional description
  • traits - Optional list of blueprint traits
  • default_growth - Optional default growth configuration
  • default_dyadic - Optional default dyadic configuration

Returns:

Blueprint

BlueprintResourceV1.get

async def get(blueprint_id: str) -> Blueprint

Get a blueprint by internal ID.

Arguments:

  • blueprint_id - Internal blueprint ID

Returns:

Blueprint

BlueprintResourceV1.get_by_key

async def get_by_key(namespace: str, owner_id: str,
                     blueprint_id: str) -> Blueprint

Get a blueprint by its composite key (namespace + owner_id + blueprint_id).

Arguments:

  • namespace - Blueprint namespace
  • owner_id - Owner ID
  • blueprint_id - Blueprint ID within the namespace

Returns:

Blueprint

BlueprintResourceV1.list

async def list(cursor: Optional[str] = None,
               limit: Optional[int] = None,
               order: Optional[str] = None) -> ListBlueprintsResponse

List all blueprints with cursor pagination.

Arguments:

  • cursor - Pagination cursor
  • limit - Maximum number of results
  • order - Sort order (ASC or DESC)

Returns:

ListBlueprintsResponse with data and paging

BlueprintResourceV1.update

async def update(blueprint_id: str,
                 name: str,
                 description: str,
                 category: str,
                 visibility: Visibility,
                 traits: Optional[list[BlueprintTrait]] = None,
                 default_growth: Optional[GrowthConfig] = None,
                 default_dyadic: Optional[DyadicConfig] = None) -> Blueprint

Full replace update of a blueprint.

Arguments:

  • blueprint_id - Internal blueprint ID
  • name - Updated name
  • description - Updated description
  • category - Updated category
  • visibility - Updated visibility
  • traits - Updated traits list
  • default_growth - Updated growth config
  • default_dyadic - Updated dyadic config

Returns:

Blueprint

BlueprintResourceV1.patch

async def patch(blueprint_id: str,
                name: Optional[str] = None,
                description: Optional[str] = None,
                category: Optional[str] = None,
                traits: Optional[list[BlueprintTrait]] = None,
                default_growth: Optional[GrowthConfig] = None,
                default_dyadic: Optional[DyadicConfig] = None,
                visibility: Optional[Visibility] = None) -> Blueprint

Partial update of a blueprint. Only provided fields are updated.

Arguments:

  • blueprint_id - Internal blueprint ID
  • name - Optional updated name
  • description - Optional updated description
  • category - Optional updated category
  • traits - Optional updated traits
  • default_growth - Optional updated growth config
  • default_dyadic - Optional updated dyadic config
  • visibility - Optional updated visibility

Returns:

Blueprint

BlueprintResourceV1.delete

async def delete(blueprint_id: str) -> None

Delete a blueprint.

Arguments:

  • blueprint_id - Internal blueprint ID

BlueprintResourceV1.clone

async def clone(blueprint_id: str,
                new_owner_id: str,
                new_namespace: Namespace,
                new_blueprint_id: Optional[str] = None) -> Blueprint

Clone a blueprint to a new owner/namespace.

Arguments:

  • blueprint_id - Source blueprint internal ID
  • new_owner_id - New owner ID
  • new_namespace - New namespace
  • new_blueprint_id - Optional new blueprint ID (auto-generated if omitted)

Returns:

Blueprint (the cloned copy)

BlueprintResourceV1.validate

async def validate(
    blueprint_id: str,
    name: str,
    category: str,
    namespace: Namespace,
    visibility: Visibility,
    description: Optional[str] = None,
    owner_id: Optional[str] = None,
    traits: Optional[list[BlueprintTrait]] = None,
    default_growth: Optional[GrowthConfig] = None,
    default_dyadic: Optional[DyadicConfig] = None
) -> ValidateBlueprintResponse

Validate a blueprint payload without saving.

Arguments:

  • blueprint_id - Blueprint identifier
  • name - Blueprint name
  • category - Category
  • namespace - Namespace
  • visibility - Visibility
  • description - Optional description
  • owner_id - Optional owner ID
  • traits - Optional traits
  • default_growth - Optional growth config
  • default_dyadic - Optional dyadic config

Returns:

ValidateBlueprintResponse with valid flag and any errors

BlueprintResourceV1.hydrate

async def hydrate(blueprint_id: str) -> HydratedBlueprint

Get a blueprint with full trait definitions from the Trait Registry.

Arguments:

  • blueprint_id - Internal blueprint ID

Returns:

HydratedBlueprint with enriched trait data

On this page