Overview
The Tensors API provides endpoints for creating, reading, updating, and deleting cognitive tensors. Tensors are 20-dimensional structures containing context (8), biology (4), and behavior (8) dimensions.Tensor Structure
Each tensor contains:- tensor_id: Unique identifier
- entity_id: Entity this tensor represents
- world_id: World/simulation context (optional)
- values: 20-dimensional tensor values (context, biology, behavior)
- maturity: Training maturity score (0.0-1.0)
- training_cycles: Number of training iterations
- description: Natural language description for semantic search
- category: Category path (e.g., “profession/detective”)
- access_level: Permission level (private/shared/public)
- owner_id: User who owns this tensor
List Tensors
Get a paginated list of tensors you have access to.GET /tensors
Query Parameters
Page number (1-indexed)
Number of tensors per page (1-100)
Filter by entity ID
Filter by world ID
Response
Array of tensor objects
Total number of accessible tensors
Current page number
Page size used
Create Tensor
Create a new tensor. The current user becomes the owner.POST /tensors
Request Body
Optional tensor ID (generated if not provided)
Entity this tensor belongs to
World/simulation context
Natural language description for RAG
Category path (e.g., “profession/detective”)
Maturity score (0.0-1.0)
Number of training cycles
Access level:
private, shared, or publicResponse
Status:201 Created
Returns the created tensor object.
Get Tensor
Get a single tensor by ID.GET /tensors/{tensor_id}
Response
Returns a tensor object (same structure as create response).Errors
404 Not Found- Tensor doesn’t exist403 Forbidden- No read access to tensor
Update Tensor
Update an existing tensor. Requires write permission (owner only).PUT /tensors/{tensor_id}
Request Body
All fields are optional. Only provided fields are updated.Updated entity ID
Updated world ID
Updated tensor values
Updated description
Updated category
Updated maturity (0.0-1.0)
Updated training cycles
Updated access level
Response
Returns the updated tensor object.Errors
404 Not Found- Tensor doesn’t exist403 Forbidden- No write access (not owner)
Delete Tensor
Delete a tensor. Requires delete permission (owner only).DELETE /tensors/{tensor_id}
Response
Status:204 No Content
Errors
404 Not Found- Tensor doesn’t exist403 Forbidden- No delete access (not owner)
Share Tensor
Share a tensor with another user.POST /tensors/{tensor_id}/share
Request Body
User ID to share with
Response
Revoke Sharing
Revoke sharing from a user.DELETE /tensors/{tensor_id}/share/{target_user_id}
Response
Set Access Level
Change tensor access level.PUT /tensors/{tensor_id}/access
Request Body
New access level:
private, shared, or publicResponse
Fork Tensor
Create a copy of a tensor that you own.POST /tensors/{tensor_id}/fork
Query Parameters
ID for the forked tensor (generated if not provided)
Response
Status:201 Created
Returns the forked tensor object with updated description.
Get Statistics
Get database statistics.GET /tensors/stats/summary
Response
Total tensor count
Tensors with maturity >= 0.95
Tensors with maturity < 0.95
Average maturity score
Total version entries

