Wisdom
List attributed wisdom for an agent
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Agent UUID or URL-encoded agent name
Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/agents/string/wisdom/attributed"{
"$schema": "/api/v1/schemas/ListWisdomAttributedOutputBody.json",
"facts": [
{
"category": "string",
"confidence": 0.1,
"entity_display_name": "string",
"entity_id": "string",
"entity_type": "string",
"expires_at": "2019-08-24T14:15:22Z",
"observed_at": "2019-08-24T14:15:22Z",
"source": "string",
"source_ref": "string",
"value": "string"
}
]
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Create or upsert an attributed wisdom fact
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Agent UUID or URL-encoded agent name
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
curl -X POST "https://loading/api/v1/agents/string/wisdom/attributed" \ -H "Content-Type: application/json" \ -d '{ "category": "string", "entity_id": "string", "entity_type": "string", "value": "string" }'{
"$schema": "/api/v1/schemas/CreateWisdomAttributedOutputBody.json",
"fact": {
"category": "string",
"confidence": 0.1,
"entity_display_name": "string",
"entity_id": "string",
"entity_type": "string",
"expires_at": "2019-08-24T14:15:22Z",
"observed_at": "2019-08-24T14:15:22Z",
"source": "string",
"source_ref": "string",
"value": "string"
}
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Bulk import attributed wisdom facts (JSON or CSV)
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Agent UUID or URL-encoded agent name
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
curl -X POST "https://loading/api/v1/agents/string/wisdom/attributed/import" \ -H "Content-Type: application/json" \ -d '{ "data": "string", "format": "json" }'{
"$schema": "/api/v1/schemas/WisdomImportResponse.json",
"accepted": 0,
"rejected": [
{
"reason": "string",
"row": 0
}
],
"total": 0
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}List attributed wisdom for one entity
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Agent UUID or URL-encoded agent name
Attributed entity type (e.g. person, place, org)
Attributed entity ID
Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/agents/string/wisdom/attributed/string/string"{
"$schema": "/api/v1/schemas/ListWisdomAttributedOutputBody.json",
"facts": [
{
"category": "string",
"confidence": 0.1,
"entity_display_name": "string",
"entity_id": "string",
"entity_type": "string",
"expires_at": "2019-08-24T14:15:22Z",
"observed_at": "2019-08-24T14:15:22Z",
"source": "string",
"source_ref": "string",
"value": "string"
}
]
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Delete an attributed wisdom fact (idempotent)
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Response Body
application/problem+json
curl -X DELETE "https://loading/api/v1/agents/string/wisdom/attributed/string/string/string"{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Replace the value of an attributed wisdom fact
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Agent UUID or URL-encoded agent name
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
curl -X PUT "https://loading/api/v1/agents/string/wisdom/attributed/string/string/string" \ -H "Content-Type: application/json" \ -d '{ "value": "string" }'{
"$schema": "/api/v1/schemas/ReplaceWisdomAttributedOutputBody.json",
"fact": {
"category": "string",
"confidence": 0.1,
"entity_display_name": "string",
"entity_id": "string",
"entity_type": "string",
"expires_at": "2019-08-24T14:15:22Z",
"observed_at": "2019-08-24T14:15:22Z",
"source": "string",
"source_ref": "string",
"value": "string"
}
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}List attributed wisdom disclosure audit entries
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Agent UUID or URL-encoded agent name
Query Parameters
RFC3339 start timestamp (inclusive). Defaults to 24h before 'to'.
RFC3339 end timestamp (inclusive). Defaults to now.
Maximum entries to return (default 100, max 500)
int64Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/agents/string/wisdom/audit"{
"$schema": "/api/v1/schemas/ListWisdomAuditOutputBody.json",
"entries": [
{
"agent_id": "string",
"category": "string",
"decision": "string",
"decision_why": "string",
"entity_id": "string",
"entity_type": "string",
"fact": {
"category": "string",
"confidence": 0.1,
"entity_display_name": "string",
"entity_id": "string",
"entity_type": "string",
"expires_at": "2019-08-24T14:15:22Z",
"observed_at": "2019-08-24T14:15:22Z",
"source": "string",
"source_ref": "string",
"value": "string"
},
"recorded_at": "2019-08-24T14:15:22Z",
"turn_id": "string",
"user_id": "string"
}
]
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}List attributed wisdom relations for an agent
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Agent UUID or URL-encoded agent name
Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/agents/string/wisdom/relations"{
"$schema": "/api/v1/schemas/ListWisdomRelationsOutputBody.json",
"relations": [
{
"edge_type": "string",
"from_id": "string",
"from_type": "string",
"id": "string",
"metadata": {
"property1": "string",
"property2": "string"
},
"observed_at": "2019-08-24T14:15:22Z",
"source": "string",
"source_ref": "string",
"to_id": "string",
"to_type": "string"
}
]
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Create an attributed wisdom relation
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
curl -X POST "https://loading/api/v1/agents/string/wisdom/relations" \ -H "Content-Type: application/json" \ -d '{ "edge_type": "string", "from_id": "string", "from_type": "string", "to_id": "string", "to_type": "string" }'{
"$schema": "/api/v1/schemas/CreateWisdomRelationOutputBody.json",
"relation": {
"edge_type": "string",
"from_id": "string",
"from_type": "string",
"id": "string",
"metadata": {
"property1": "string",
"property2": "string"
},
"observed_at": "2019-08-24T14:15:22Z",
"source": "string",
"source_ref": "string",
"to_id": "string",
"to_type": "string"
}
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Delete an attributed wisdom relation (idempotent)
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Response Body
application/problem+json
curl -X DELETE "https://loading/api/v1/agents/string/wisdom/relations/string"{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}