Skip to content

Build agent context

POST
/api/v1/memory/context
curl --request POST \
--url https://api.ultimateteam.ai/api/v1/memory/context \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "agent_role": "example", "task_description": "example" }'

Assemble a context window for a specific agent and task description. Pulls relevant memory crystals, business profile, and Founder DNA within a token budget.

Media typeapplication/json
ContextRequest

Request body for the build-context endpoint.

Attributes: agent_role: The role of the agent needing context. task_description: Description of the task to assemble context for.

object
agent_role
required
Agent Role

Agent role requesting context

string
task_description
required
Task Description

Description of the agent task

string
Examplegenerated
{
"agent_role": "example",
"task_description": "example"
}

Successful Response

Media typeapplication/json
ContextResponse

Response envelope for the build-context endpoint.

Attributes: data: Assembled context with token count and excluded blocks.

object
data
required
Data
object
key
additional properties
any
Examplegenerated
{
"data": {}
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}