Data & World Model
Query and manage workspace entities, enrichment, provenance, confidence-gated writes, migration metadata, data sources, and synchronization status.
Storage and Projection Boundaries
Event Sourcing Model
Confidence as Trust Architecture
Supersedes Chain
How Agents Read and Write
Entity Types
Entity Reads
List Entities
List entities filtered by type with optional name search. Works for any entity type — patients, operators, calls, or any type created by T3 agents. Returns full projected state.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Filter by entity type (repeatable)
Search by name, type, canonical ID, phone, or entity ID
200Sort order (PostgREST-style, e.g. last_event_at.desc, display_name.asc)
Filter by has_projection flag
Filter by event source (e.g. voice_agent, connector_runner)
Filter by source system name (e.g. charmhealth, gcp_fhir)
Filter by FHIR resource type (e.g. Patient, Practitioner)
Successful Response
Missing or invalid API key.
Validation Error
GET /v1/{workspace_id}/world/entities HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"entities": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000",
"entity_type": "text",
"display_name": "text",
"canonical_id": "text",
"external_ids": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"has_projection": false,
"name": "text",
"phone": "text",
"email": "text",
"birth_date": "text",
"gender": "text",
"mrn": "text",
"appointment_status": "text",
"appointment_start": "2026-01-01T00:00:00.000Z",
"appointment_end": "2026-01-01T00:00:00.000Z",
"appointment_type": "text",
"domain": "text",
"industry": "text",
"call_sid": "text",
"direction": "text",
"duration_seconds": 1,
"status": "text",
"source": "text",
"first_seen_at": "2026-01-01T00:00:00.000Z",
"last_event_at": "2026-01-01T00:00:00.000Z",
"event_count": 0,
"confidence": 1,
"tags": [
"text"
],
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}
],
"total": 1,
"has_more": true,
"next_offset": 1
}Get an Entity
Fetch a single entity with its full projected state. The state is a computed projection from all events — never mutated directly. Enhanced entity types (patient, operator, call) have richer projections.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Successful Response
falseDisplay name (person, organization)
Primary phone number (E.164)
Primary email address
Date of birth (YYYY-MM-DD)
Gender
Medical record number
Appointment status (booked, confirmed, cancelled)
Appointment start time (UTC)
Appointment end time (UTC)
Appointment/visit type
Organization domain
Organization industry
Twilio call SID
Call direction (inbound, outbound)
Call duration in seconds
Entity status
Primary data source
01When the entity was created
When the entity was last updated
Invalid entity ID format.
Missing or invalid API key.
Entity not found.
Validation Error
GET /v1/{workspace_id}/world/entities/{entity_id} HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000",
"entity_type": "text",
"display_name": "text",
"canonical_id": "text",
"external_ids": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"has_projection": false,
"name": "text",
"phone": "text",
"email": "text",
"birth_date": "text",
"gender": "text",
"mrn": "text",
"appointment_status": "text",
"appointment_start": "2026-01-01T00:00:00.000Z",
"appointment_end": "2026-01-01T00:00:00.000Z",
"appointment_type": "text",
"domain": "text",
"industry": "text",
"call_sid": "text",
"direction": "text",
"duration_seconds": 1,
"status": "text",
"source": "text",
"first_seen_at": "2026-01-01T00:00:00.000Z",
"last_event_at": "2026-01-01T00:00:00.000Z",
"event_count": 0,
"confidence": 1,
"tags": [
"text"
],
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}Entity Enrichment
Registry-Governed Keys
Winner Selection and Audit
Governed Enrichment Write Path
Entity Graph
Agent-Produced Knowledge
Data Sources
Self-Service Secret Provisioning
Raw Records
Data Quality Pipeline
Entity Narrative Briefs
Generate a Brief
Generate a Self-Image brief for the target entity (patient, cohort, territory, emirate, or district).
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Target entity UUID
Successful Response
Wire shape for a Self-Image brief.
event_id is null when no brief has ever been generated for the
entity. All other fields are nullable in that case so the UI can
render a consistent empty state.
falseValidation Error
POST /v1/{workspace_id}/entities/{entity_id}/brief HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"event_id": "123e4567-e89b-12d3-a456-426614174000",
"target_entity_id": "123e4567-e89b-12d3-a456-426614174000",
"target_entity_type": "patient",
"content_md": "text",
"content_json": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"version": "text",
"evidence_event_ids": [
"123e4567-e89b-12d3-a456-426614174000"
],
"confidence": 1,
"event_count": 1,
"model_name": "text",
"truncated": false,
"generated_at": "2026-01-01T00:00:00.000Z"
}Get the Latest Brief
Return the latest Self-Image brief for the target entity (null shape if none).
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Target entity UUID
Successful Response
Wire shape for a Self-Image brief.
event_id is null when no brief has ever been generated for the
entity. All other fields are nullable in that case so the UI can
render a consistent empty state.
falseValidation Error
GET /v1/{workspace_id}/entities/{entity_id}/brief HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"event_id": "123e4567-e89b-12d3-a456-426614174000",
"target_entity_id": "123e4567-e89b-12d3-a456-426614174000",
"target_entity_type": "patient",
"content_md": "text",
"content_json": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"version": "text",
"evidence_event_ids": [
"123e4567-e89b-12d3-a456-426614174000"
],
"confidence": 1,
"event_count": 1,
"model_name": "text",
"truncated": false,
"generated_at": "2026-01-01T00:00:00.000Z"
}Entity Intelligence
Relationship Graph
Entity relationship graph — one level of edges with neighbor metadata. same_as edges are historical merge edges (written by the pre-SDP resolver; merge detection now lives in the Databricks pipeline — new edges are not produced).
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Successful Response
Entity not found
Validation Error
Rate limit exceeded
GET /v1/{workspace_id}/world/entities/{entity_id}/graph HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}Provenance
Data lineage for an entity — sources, confidence history, merge history (historical same_as edges from the pre-SDP resolver — new edges are not produced).
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Successful Response
Entity not found
Validation Error
Rate limit exceeded
GET /v1/{workspace_id}/world/entities/{entity_id}/provenance HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}Lineage
Full data lineage — provenance + outbound sinks + review history.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Successful Response
Entity not found
Validation Error
Rate limit exceeded
GET /v1/{workspace_id}/world/entities/{entity_id}/lineage HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}Suspected Duplicates
Suspected duplicate entities — historical same_as merge edges sorted by confidence (written by the pre-SDP resolver; merge detection now lives in the Databricks pipeline — new edges are not produced).
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Filter by entity type
Max confidence threshold
1Max edges to return
100Page offset
0Successful Response
Validation Error
Rate limit exceeded
GET /v1/{workspace_id}/world/entities/duplicates HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]Entity Search
Enhanced entity search with type, source, and confidence filters.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Search text (matched against display_name)
Filter by entity type
Filter by event source
Min confidence
200Successful Response
Validation Error
Rate limit exceeded
GET /v1/{workspace_id}/world/search?q=text HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}World Sync Status
Generic Data Query
Query a table with PostgREST-style filtering, sorting, and pagination.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
200Successful Response
Validation Error
GET /v1/{workspace_id}/query/{schema}/{table} HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"items": [
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"count": 1,
"has_more": true
}Import Classic Conversation Metadata
Writes one terminal world.conversations row per v1 conversation (real dates, provider='v1-migration'), giving the returning-user greeting and the real conversation list. Admin-only, idempotent + correctable per (workspace, v1 conversation id), memory-safe (no world events emitted → the memory extractor never re-derives from these). Transcript content (turns) is a separate follow-up. Batch size <= 500.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Successful Response
Naive/future timestamps, bad window, or non-person entity_id.
Insufficient permissions.
Validation Error
POST /v1/{workspace_id}/world/migration/conversations HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 218
{
"conversations": [
{
"entity_id": "123e4567-e89b-12d3-a456-426614174000",
"source_conversation_id": "text",
"started_at": "2026-01-01T00:00:00.000Z",
"ended_at": "2026-01-01T00:00:00.000Z",
"channel_kind": "web",
"turn_count": 0
}
]
}{
"imported": 1,
"created": 1,
"updated": 1
}Last updated
Was this helpful?

