Data
Governed key-value data storage with policy enforcement. Every write is checked against policies before storage, and all operations are logged to the audit trail.
Write Data
Endpoint: POST /v1/data/write
Write data to an agent's storage. Data is checked against policies before storage.
Request
POST /v1/data/write
Content-Type: application/json
X-API-Key: your-api-key
{
"agent_id": "agt_abc123",
"key": "user:123:preference",
"value": "dark_mode",
"metadata": {
"source": "conversation",
"confidence": 0.9
}
}Response
{
"allowed": true,
"audit_id": "aud_xyz789",
"message": "Data stored successfully"
}If the write is blocked by a policy:
{
"allowed": false,
"blocked_by": "policy:block_pii",
"message": "Email address detected"
}Read Data
Endpoint: GET /v1/data/read
Read data by key.
Query Parameters
agent_id(required): Agent IDkey(required): Data key
Read Full Entry
Endpoint: GET /v1/data/read-full
Read data with full metadata.
List Data
Endpoint: GET /v1/data/list
List all data keys for an agent with optional filtering.
Query Parameters
agent_id(required): Agent IDprefix(optional): Filter keys by prefixlimit(optional): Maximum number of results (default: 100)offset(optional): Pagination offset
Search Data
Endpoint: POST /v1/data/search
Semantic search across stored data using text similarity.
Request
POST /v1/data/search
Content-Type: application/json
{
"agent_id": "agt_abc123",
"query": "user preferences",
"limit": 10
}Delete Data
Endpoint: DELETE /v1/data
Delete data by key.
Delete Prefix
Endpoint: DELETE /v1/data/prefix
Delete all data matching a key prefix.