Purple8 — AI-Native Application Backend is an MCP server published by ai.purple8.www, hosted at purple8-graph-sandbox.fly.dev. When last checked on 2026-11-23 it was answering with an error. It declares 28 tools, including rag.query, rag.hybrid_query, rag.profile_collection, graph.query, graph.vector_search.
Complete backend for AI-built apps: data, auth, workflows, SLAs, HITL & RAG in 176 MCP tools.
2 connections through 4 shared values. Tap any node.
Squares are this server's values; dots are other servers sharing them. A shared address or publisher is a lead, not proof of a common operator.
Inferred from the host name and headers: what a server runs on, not who runs it.
Flat Vector RAG — retrieves the most relevant graph nodes by pure vector similarity (HNSW + RRF fusion + keyword fallback), then calls the configured LLM to generate a grounded answer. Fastest of the three RAG modes (p50 ~45 ms, MRR 0.64); best for single-hop factual questions. Use rag.graph_query or rag.hybrid_query for multi-hop or relationship-heavy questions.
| Parameter | Type | Description |
|---|---|---|
| question * | string | The question to answer. |
{
"name": "rag.query",
"description": "Flat Vector RAG — retrieves the most relevant graph nodes by pure vector similarity (HNSW + RRF fusion + keyword fallback), then calls the configured LLM to generate a grounded answer. Fastest of the three RAG modes (p50 ~45 ms, MRR 0.64); best for single-hop factual questions. Use rag.graph_query or rag.hybrid_query for multi-hop or relationship-heavy questions.",
"inputSchema": {
"type": "object",
"required": [
"question"
],
"properties": {
"question": {
"type": "string",
"description": "The question to answer."
}
}
}
}Hybrid Graph-Vector RAG — fuses vector similarity AND graph structural signals at every stage: dual-seed fusion (Weighted RRF over vector rank + degree centrality), vector-guided BFS, and semantic path scoring. Highest accuracy: MRR 0.85, multi-hop 0.91. ~5x slower (p50 ~240 ms). Recommended as the default RAG tool for agents that need high quality.
| Parameter | Type | Description |
|---|---|---|
| mode | string | Fusion mode. 'balanced' for most questions; 'graph_first' for dense-relationship queries; 'vector_first' for semantic similarity. |
| seed_k | integer | Seed nodes per signal (1-20). Default 5. |
| max_hops | integer | BFS expansion depth (1-5). Default 2. |
| question * | string | The question to answer. |
| max_nodes | integer | Maximum subgraph nodes in context (5-200). Default 50. |
| max_tokens | integer | LLM output token budget. Default 1024. |
| temperature | number | LLM sampling temperature. Default 0.0. |
| fusion_alpha | number | Explicit graph weight (0.0=pure vector, 1.0=pure graph). Overrides mode. |
| label_filter | array | Restrict retrieval to nodes with these labels. |
| write_inferred |
Analyse the graph topology and return recommended RAG retrieval settings. Profiles node count, edge density, degree distribution, edge-type distribution, and embedding coverage, then derives concrete values for fusion_alpha, max_hops, seed_k, vector_weight, k, and mode. Call this before tuning rag.hybrid_query on a new corpus or collection. Returns topology_class (sparse/moderate/dense), a 'recommended' param block ready to pass to rag.hybrid_query, and a 'rationale' explaining each choice.
| Parameter | Type | Description |
|---|---|---|
| label_filter | array | Restrict analysis to nodes with these labels. Omit for whole graph. |
{
"name": "rag.profile_collection",
"description": "Analyse the graph topology and return recommended RAG retrieval settings. Profiles node count, edge density, degree distribution, edge-type distribution, and embedding coverage, then derives concrete values for fusion_alpha, max_hops, seed_k, vector_weight, k, and mode. Call this before tuning rag.hybrid_query on a new corpus or collection. Returns topology_class (sparse/moderate/dense), a 'recommended' param block ready to pass to rag.hybrid_query, and a 'rationale' explaining each choice.",
"inputSchema": {
"type": "object",
"required": [],
"properties": {
"label_filter": {
"type": "array",
"items": {
"type": "string"
},
"description": "Restrict analysis to nodes with these labels. Omit for whole graph."
}
}
}
}Execute a Cypher query against the Purple8 knowledge graph and return matching records. Use for nodes, edges, paths, or aggregated data.
| Parameter | Type | Description |
|---|---|---|
| cypher * | string | The Cypher query to execute. |
| parameters | object | Optional named parameters. |
{
"name": "graph.query",
"description": "Execute a Cypher query against the Purple8 knowledge graph and return matching records. Use for nodes, edges, paths, or aggregated data.",
"inputSchema": {
"type": "object",
"required": [
"cypher"
],
"properties": {
"cypher": {
"type": "string",
"description": "The Cypher query to execute."
},
"parameters": {
"type": "object",
"default": {},
"description": "Optional named parameters."
}
}
}
}Find the k nearest nodes to a natural-language query using the HNSW vector index.
| Parameter | Type | Description |
|---|---|---|
| k | integer | Number of results to return. Default 5. |
| label | string | Restrict search to nodes with this label. |
| query_text * | string | The search query in natural language. |
{
"name": "graph.vector_search",
"description": "Find the k nearest nodes to a natural-language query using the HNSW vector index.",
"inputSchema": {
"type": "object",
"required": [
"query_text"
],
"properties": {
"k": {
"type": "integer",
"default": 5,
"description": "Number of results to return. Default 5."
},
"label": {
"type": "string",
"description": "Restrict search to nodes with this label."
},
"query_text": {
"type": "string",
"description": "The search query in natural language."
}
}
}
}Combine vector similarity with graph traversal for highest-recall retrieval. Best when graph structure matters.
| Parameter | Type | Description |
|---|---|---|
| k | integer | Number of results to return. Default 10. |
| label | string | Restrict search to nodes with this label. |
| query_text * | string | The search query in natural language. |
{
"name": "graph.hybrid_search",
"description": "Combine vector similarity with graph traversal for highest-recall retrieval. Best when graph structure matters.",
"inputSchema": {
"type": "object",
"required": [
"query_text"
],
"properties": {
"k": {
"type": "integer",
"default": 10,
"description": "Number of results to return. Default 10."
},
"label": {
"type": "string",
"description": "Restrict search to nodes with this label."
},
"query_text": {
"type": "string",
"description": "The search query in natural language."
}
}
}
}Walk the graph from a starting node following edges up to a given depth.
| Parameter | Type | Description |
|---|---|---|
| depth | integer | Maximum traversal depth. Default 2. |
| node_id * | string | ID of the starting node. |
| direction | string | Edge direction. Default 'both'. |
| edge_type | string | Restrict to edges of this type. Omit for all types. |
{
"name": "graph.traverse",
"description": "Walk the graph from a starting node following edges up to a given depth.",
"inputSchema": {
"type": "object",
"required": [
"node_id"
],
"properties": {
"depth": {
"type": "integer",
"default": 2,
"description": "Maximum traversal depth. Default 2."
},
"node_id": {
"type": "string",
"description": "ID of the starting node."
},
"direction": {
"enum": [
"outgoing",
"incoming",
"both"
],
"type": "string",
"default": "both",
"description": "Edge direction. Default 'both'."
},
"edge_type": {
"type": "string",
"description": "Restrict to edges of this type. Omit for all types."
}
}
}
}Insert a new node into the graph (accepts `type`, `label`, or `node_type`). Requires editor role.
| Parameter | Type | Description |
|---|---|---|
| type | string | Node label / type (e.g. 'Person', 'Company'). |
| label | string | Alias for `type` (e.g. 'Document', 'Borrower'). |
| labels | array | Optional additional labels. |
| node_id * | string | Unique identifier for the node. |
| node_type | string | Alias for `type`. |
| properties | object | Key-value properties. |
{
"name": "graph.add_node",
"description": "Insert a new node into the graph (accepts `type`, `label`, or `node_type`). Requires editor role.",
"inputSchema": {
"type": "object",
"required": [
"node_id"
],
"properties": {
"type": {
"type": "string",
"description": "Node label / type (e.g. 'Person', 'Company')."
},
"label": {
"type": "string",
"description": "Alias for `type` (e.g. 'Document', 'Borrower')."
},
"labels": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional additional labels."
},
"node_id": {
"type": "string",
"description": "Unique identifier for the node."
},
"node_type": {
"type": "string",
"description": "Alias for `type`."
},
"properties": {
"type": "object",
"default": {},
"description": "Key-value properties."
}
}
}
}Create a directed edge (relationship) between two existing nodes. This is the primary agentic handoff mechanism — agents write their output as edges (e.g. DERIVED_FROM, RISK_ASSESSMENT, EXTRACTED_FROM) so downstream agents can discover work by querying graph state rather than passing messages. edge_id is auto-generated (UUID4) when omitted. Requires editor role.
| Parameter | Type | Description |
|---|---|---|
| weight | number | Edge weight for traversal algorithms. Default 1.0. |
| edge_id | string | Unique identifier for the edge. Auto-generated UUID4 when omitted. |
| edge_type * | string | Relationship type label (e.g. 'DERIVED_FROM', 'RISK_ASSESSMENT', 'EXTRACTED_FROM'). |
| source_id * | string | ID of the source (tail) node. |
| target_id * | string | ID of the target (head) node. |
| properties | object | Key-value edge properties (e.g. {"confidence": 0.9, "assessor": "legal"}). |
{
"name": "graph.add_edge",
"description": "Create a directed edge (relationship) between two existing nodes. This is the primary agentic handoff mechanism — agents write their output as edges (e.g. DERIVED_FROM, RISK_ASSESSMENT, EXTRACTED_FROM) so downstream agents can discover work by querying graph state rather than passing messages. edge_id is auto-generated (UUID4) when omitted. Requires editor role.",
"inputSchema": {
"type": "object",
"required": [
"source_id",
"target_id",
"edge_type"
],
"properties": {
"weight": {
"type": "number",
"default": 1,
"description": "Edge weight for traversal algorithms. Default 1.0."
},
"edge_id": {
"type": "string",
"description": "Unique identifier for the edge. Auto-generated UUID4 when omitted."
},
"edge_type": {
"type": "string",
"description": "Relationship type label (e.g. 'DERIVED_FROM', 'RISK_ASSESSMENT', 'EXTRACTED_FROM')."
},
"source_id": {
"type": "string",
"description": "ID of the source (tail) node."
},
"target_id": {
"type": "string",
"description": "ID of the target (head) node."
},
"properties": {
"type": "object",
"default": {},
"description": "Key-value edge properties (e.g. {\"confidence\": 0.9, \"assessor\": \"legal\"})."
}
}
}
}Update properties or labels on an existing node. Properties are merged with existing values (patch semantics — only the keys you supply are changed). Labels replace the full label set when provided. Use this to advance agent relay state, e.g. setting {"status": "enriched", "handoff_to": null} to hand off work to the next agent in a relay pipeline. Requires editor role.
| Parameter | Type | Description |
|---|---|---|
| labels | array | Replacement label set (replaces all existing labels when provided). |
| node_id * | string | ID of the node to update. |
| properties | object | Properties to merge into the node (patch semantics). |
{
"name": "graph.update_node",
"description": "Update properties or labels on an existing node. Properties are merged with existing values (patch semantics — only the keys you supply are changed). Labels replace the full label set when provided. Use this to advance agent relay state, e.g. setting {\"status\": \"enriched\", \"handoff_to\": null} to hand off work to the next agent in a relay pipeline. Requires editor role.",
"inputSchema": {
"type": "object",
"required": [
"node_id"
],
"properties": {
"labels": {
"type": "array",
"items": {
"type": "string"
},
"description": "Replacement label set (replaces all existing labels when provided)."
},
"node_id": {
"type": "string",
"description": "ID of the node to update."
},
"properties": {
"type": "object",
"description": "Properties to merge into the node (patch semantics)."
}
}
}
}Retrieve a node and all its stored properties by ID.
| Parameter | Type | Description |
|---|---|---|
| node_id * | string | ID of the node to retrieve. |
{
"name": "graph.get_node",
"description": "Retrieve a node and all its stored properties by ID.",
"inputSchema": {
"type": "object",
"required": [
"node_id"
],
"properties": {
"node_id": {
"type": "string",
"description": "ID of the node to retrieve."
}
}
}
}Extract entities and relationships from raw text and write them into the graph. Calls preview first, then commits the complete extraction on success. auto_commit=false returns a review-only preview. Pending jobs return job_id for resumption. Original bytes are not stored automatically; supply file_ref or use data.commit with file_bytes_b64 if needed. After an interrupted write, ask the user to confirm a retry; use data.commit with the retained reviewed payload instead of re-extracting. Requires editor role.
| Parameter | Type | Description |
|---|---|---|
| text * | string | The raw text to extract knowledge from. |
| job_id | string | Resume an earlier extraction instead of submitting again; repeat the original input arguments. |
| file_ref | string | Optional existing Graph file_id in this tenant, used as the original/document anchor at commit. |
| auto_commit | boolean | false returns the complete preview without graph writes. Review then use data.commit. |
| source_name * | string | Label for the source document (provenance). |
| profile_hint | string | Extraction profile; omit for auto-detection. |
| wait_seconds | integer | Maximum wait for an admitted extraction. Pending jobs are NOT committed; resume with job_id. |
Commit a reviewed extraction or your own extractor's output without invoking DocIntel. Uses the complete POST /ingest/commit contract: entities, relationships, Markdown, spans, tables/pages, context, file_ref or inline file_bytes_b64 and ingestion options. Existing entities are linked, not edited, unless update_entities=true. For extractor-generated IDs use identity_policy='review_conflicts': name matches alone are not identity proof. On entity_identity_conflict nothing was written; correct/exclude the incoming entity and update relationship endpoints, or explicitly confirm identity_resolution='link_existing', then retry. link_existing never edits existing facts. After interruption or a lost response, ask the user to confirm retrying the retained reviewed payload. Reuse entity IDs, assertion keys and file_ref; do not automatically re-extract. Retain metadata.sha256 (original bytes) and optional metadata.file_version. On source_version_conflict nothing was written: obtain and review current-source extraction and ask for confirmation, rather than replaying or relabeling the old review. SIMILAR_TO edges (enabled by default) are similarity, not factual assertions. Inspect embedding, document_chunks, structured_content and original_file outcomes; a successful write alone does not guarantee retrieval readiness. Requires editor role.
| Parameter | Type | Description |
|---|---|---|
| links | array | |
| pages | array | |
| tables | array | |
| upsert | boolean | Idempotent re-projection mode (default on): never create __vN twins, and derive deterministic edge ids so re-commits converge instead of duplicating. |
| context | any | |
| file_id | any | Content-hash / File node ID for a file-backed commit. When provided, the orchestrator creates File → HAS_CHUNK → Chunk edges. |
Create a new Journey Engine instance for an entity and move it to the first stage. All transitions are recorded as immutable graph edges. Requires editor role.
| Parameter | Type | Description |
|---|---|---|
| entity_id * | string | ID of the entity node the journey is for. |
| journey_type * | string | Journey type to instantiate (e.g. 'sales-cycle'). |
{
"name": "journey.start",
"description": "Create a new Journey Engine instance for an entity and move it to the first stage. All transitions are recorded as immutable graph edges. Requires editor role.",
"inputSchema": {
"type": "object",
"required": [
"journey_type",
"entity_id"
],
"properties": {
"entity_id": {
"type": "string",
"description": "ID of the entity node the journey is for."
},
"journey_type": {
"type": "string",
"description": "Journey type to instantiate (e.g. 'sales-cycle')."
}
}
}
}Advance a journey instance to the next stage. Actor and notes are written to the audit trail as an ADVANCED_TO edge. Requires editor role.
| Parameter | Type | Description |
|---|---|---|
| notes | string | Optional notes for the audit trail. |
| to_stage * | string | Stage name to advance to. |
| instance_id * | string | ID of the journey instance. |
{
"name": "journey.advance",
"description": "Advance a journey instance to the next stage. Actor and notes are written to the audit trail as an ADVANCED_TO edge. Requires editor role.",
"inputSchema": {
"type": "object",
"required": [
"instance_id",
"to_stage"
],
"properties": {
"notes": {
"type": "string",
"description": "Optional notes for the audit trail."
},
"to_stage": {
"type": "string",
"description": "Stage name to advance to."
},
"instance_id": {
"type": "string",
"description": "ID of the journey instance."
}
}
}
}Return the full state and audit trail for a journey instance — every stage transition, AI recommendation, and HITL decision.
| Parameter | Type | Description |
|---|---|---|
| instance_id * | string | ID of the journey instance. |
{
"name": "journey.status",
"description": "Return the full state and audit trail for a journey instance — every stage transition, AI recommendation, and HITL decision.",
"inputSchema": {
"type": "object",
"required": [
"instance_id"
],
"properties": {
"instance_id": {
"type": "string",
"description": "ID of the journey instance."
}
}
}
}Define a new journey type (workflow template) with ordered stages, owner systems, and per-stage SLA policies. Once defined, instances can be started with journey.start. Call this first when building any new workflow — the agent can define the entire process in one call. Use overwrite=true to update an existing definition. Requires journey:admin permission (admin or super_admin by default). Use operation=configure_ai with ai_enabled to persistently enable/disable this tenant's advisor. Generation uses tenant LLM settings; delivery is currently best-effort.
| Parameter | Type | Description |
|---|---|---|
| stages | array | Ordered list of stages. First stage is the initial state. |
| operation | string | one of ["define","configure_ai"] |
| overwrite | boolean | Replace an existing definition with the same journey_type. Default false. |
| ai_enabled | boolean | Required for configure_ai. Explicit opt-in to automatic LLM calls for this tenant. |
| description | string | Human-readable description of what this journey tracks. |
| journey_type | string | Unique snake_case name for this workflow (e.g. 'loan_application', 'supplier_approval'). |
{
"name": "journey.define",
"description": "Define a new journey type (workflow template) with ordered stages, owner systems, and per-stage SLA policies. Once defined, instances can be started with journey.start. Call this first when building any new workflow — the agent can define the entire process in one call. Use overwrite=true to update an existing definition. Requires journey:admin permission (admin or super_admin by default). Use operation=configure_ai with ai_enabled to persistently enable/disable this tenant's advisor. Generation uses tenant LLM settings; delivery is currently best-effort.",
"inputSchema": {
"type": "object",
"anyOf": [
{
"required": [
"journey_type",
"stages"
],
"properties": {
"operation": {
"const": "define"
}
}
},
{
"required": [
"operation",
"ai_enabled"
],
"properties": {
"operation": {
"const": "configure_ai"
}
}
}
],
"required": [],
"properties": {
"stages": {
"type": "array",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"hitl": {
"type": "object",
"required": [
"assigned_role"
],
"properties": {
"title": {
"type": "string",
"default": "",
"description": "Task title shown to the reviewer."
},
"required": {
"type": "boolean",
"default": true,
"description": "Whether the approval task must be resolved before advancing."
},
"description": {
"type": "string",
"default": "",
"description": "Task description / instructions for the reviewer."
},
"assigned_role": {
"type": "string",
"description": "Role that can action this task (e.g. 'compliance_officer')."
},
"advance_to_stage": {
"type": "string",
"default": "",
"description": "Stage to advance to on approval. Defaults to next stage."
},
"expires_in_seconds": {
"type": "integer",
"description": "Optional deadline for the HITL task (seconds). Null = no deadline."
}
},
"description": "Human-In-The-Loop approval gate. When set, advancing into this stage automatically creates a pending HITL task that must be resolved before the instance can continue."
},
"name": {
"type": "string",
"description": "Stage identifier (e.g. 'kyc_verified')."
},
"ai_step": {
"type": "object",
"properties": {
"trigger": {
"enum": [
"manual",
"on_enter",
"on_sla_warn",
"on_sla_breach"
],
"type": "string",
"default": "manual"
},
"auto_execute": {
"type": "boolean",
"default": false
},
"extra_context": {
"type": "object"
},
"system_prompt": {
"type": "string"
},
"allowed_actions": {
"type": "array",
"items": {
"enum": [
"suggest_advance",
"force_advance",
"cancel",
"flag",
"hold",
"annotate",
"no_action"
],
"type": "string"
}
}
},
"description": "Native stage advisory configuration. Uses tenant LLM settings after configure_ai opt-in; auto_execute=false suggests only and HITL gates remain enforced.",
"additionalProperties": false
},
"terminal": {
"type": "boolean",
"default": false,
"description": "If true, reaching this stage marks the instance as completed. Use for branching exits (e.g. 'approved' / 'rejected')."
},
"description": {
"type": "string",
"default": "",
"description": "What happens at this stage."
},
"owner_system": {
"type": "string",
"default": "unassigned",
"description": "System responsible for this stage."
},
"sla_warn_seconds": {
"type": "integer",
"default": 0,
"description": "Emit SLA warning after N seconds in this stage. 0 = no warning."
},
"sla_breach_seconds": {
"type": "integer",
"default": 0,
"description": "Mark instance STALLED after N seconds in this stage. 0 = no enforcement."
}
}
},
"description": "Ordered list of stages. First stage is the initial state."
},
"operation": {
"enum": [
"define",
"configure_ai"
],
"type": "string",
"default": "define"
},
"overwrite": {
"type": "boolean",
"default": false,
"description": "Replace an existing definition with the same journey_type. Default false."
},
"ai_enabled": {
"type": "boolean",
"description": "Required for configure_ai. Explicit opt-in to automatic LLM calls for this tenant."
},
"description": {
"type": "string",
"default": "",
"description": "Human-readable description of what this journey tracks."
},
"journey_type": {
"type": "string",
"description": "Unique snake_case name for this workflow (e.g. 'loan_application', 'supplier_approval')."
}
}
}
}List journey instances with optional filters. Use this to discover what is in flight, find instances for a specific entity, or check all instances of a given type. Also returns all defined journey types when called with no arguments. Essential for any agent monitoring or orchestrating workflows. Set runtime_status=true to inspect this tenant's advisor enablement, provider readiness and delivery guarantees.
| Parameter | Type | Description |
|---|---|---|
| status | string | Filter by instance status. |
| entity_id | string | Filter by the entity the journey is tracking. |
| list_types | boolean | Return defined journey type names instead of instances. Default false. |
| journey_type | string | Filter by journey type (e.g. 'loan_application'). |
| runtime_status | boolean | Return tenant Journey AI configuration/readiness instead of instances. |
{
"name": "journey.list",
"description": "List journey instances with optional filters. Use this to discover what is in flight, find instances for a specific entity, or check all instances of a given type. Also returns all defined journey types when called with no arguments. Essential for any agent monitoring or orchestrating workflows. Set runtime_status=true to inspect this tenant's advisor enablement, provider readiness and delivery guarantees.",
"inputSchema": {
"type": "object",
"required": [],
"properties": {
"status": {
"enum": [
"active",
"completed",
"cancelled",
"stalled"
],
"type": "string",
"description": "Filter by instance status."
},
"entity_id": {
"type": "string",
"description": "Filter by the entity the journey is tracking."
},
"list_types": {
"type": "boolean",
"default": false,
"description": "Return defined journey type names instead of instances. Default false."
},
"journey_type": {
"type": "string",
"description": "Filter by journey type (e.g. 'loan_application')."
},
"runtime_status": {
"type": "boolean",
"default": false,
"description": "Return tenant Journey AI configuration/readiness instead of instances."
}
}
}
}List pending Human-In-The-Loop (HITL) tasks — decisions that require a human (or agent acting as human proxy) to approve, reject, or escalate before the journey can continue. Returns task ID, title, assigned role, description, and the stage the journey is waiting on. An agent can use this to surface pending decisions to the user or take autonomous action if authorised.
| Parameter | Type | Description |
|---|---|---|
| status | string | Filter by task status. Default: pending. |
| instance_id | string | Restrict to HITL tasks for a specific journey instance. |
| assigned_role | string | Filter by role (e.g. 'compliance_officer'). |
{
"name": "journey.list_hitl",
"description": "List pending Human-In-The-Loop (HITL) tasks — decisions that require a human (or agent acting as human proxy) to approve, reject, or escalate before the journey can continue. Returns task ID, title, assigned role, description, and the stage the journey is waiting on. An agent can use this to surface pending decisions to the user or take autonomous action if authorised.",
"inputSchema": {
"type": "object",
"required": [],
"properties": {
"status": {
"enum": [
"pending",
"claimed",
"completed",
"rejected",
"expired"
],
"type": "string",
"description": "Filter by task status. Default: pending."
},
"instance_id": {
"type": "string",
"description": "Restrict to HITL tasks for a specific journey instance."
},
"assigned_role": {
"type": "string",
"description": "Filter by role (e.g. 'compliance_officer')."
}
}
}
}Resolve a Human-In-The-Loop (HITL) task — approve, reject, or escalate it. On approval the journey automatically advances to the next stage if advance_to_stage is set. The decision is written to the immutable graph audit trail with the actor and timestamp. An AI agent acting as a human proxy must set actor to the user or role it is acting on behalf of. Requires editor role.
| Parameter | Type | Description |
|---|---|---|
| actor * | string | User or system making the decision (written to audit trail). |
| notes | string | Notes written to the audit trail. |
| action * | string | Resolution action. |
| task_id * | string | ID of the HITL task to resolve. |
| decision | string | Decision label for complete actions (e.g. 'approved', 'denied'). Default 'approved'. |
| advance_to_stage | string | Stage to advance the journey to on completion. Omit to leave stage unchanged. |
| new_assigned_role | string | New role to escalate to (required when action=escalate). |
{
"name": "journey.resolve_hitl",
"description": "Resolve a Human-In-The-Loop (HITL) task — approve, reject, or escalate it. On approval the journey automatically advances to the next stage if advance_to_stage is set. The decision is written to the immutable graph audit trail with the actor and timestamp. An AI agent acting as a human proxy must set actor to the user or role it is acting on behalf of. Requires editor role.",
"inputSchema": {
"type": "object",
"required": [
"task_id",
"action",
"actor"
],
"properties": {
"actor": {
"type": "string",
"description": "User or system making the decision (written to audit trail)."
},
"notes": {
"type": "string",
"default": "",
"description": "Notes written to the audit trail."
},
"action": {
"enum": [
"complete",
"reject",
"escalate"
],
"type": "string",
"description": "Resolution action."
},
"task_id": {
"type": "string",
"description": "ID of the HITL task to resolve."
},
"decision": {
"type": "string",
"default": "approved",
"description": "Decision label for complete actions (e.g. 'approved', 'denied'). Default 'approved'."
},
"advance_to_stage": {
"type": "string",
"description": "Stage to advance the journey to on completion. Omit to leave stage unchanged."
},
"new_assigned_role": {
"type": "string",
"description": "New role to escalate to (required when action=escalate)."
}
}
}
}Send a document file (PDF, DOCX, PPTX, XLSX, HTML, IFC, CSV, …) to Purple8 DocIntel for parsing, entity extraction, and graph ingestion. The document is fetched by DocIntel from a public URL, not a local path. The complete extraction is committed only when finished successfully. auto_commit=false returns a review-only preview; pending jobs return job_id for resumption. URL extraction does not retain original bytes in Graph; supply file_ref or commit an original separately. Use this when the knowledge source is a document rather than raw text. Requires editor role and DocIntel to be running. After an interrupted write, ask the user to confirm a retry; use data.commit with the retained reviewed payload instead of re-extracting.
| Parameter | Type | Description |
|---|---|---|
| url * | string | Publicly accessible URL of the document to fetch and process. |
| job_id | string | Resume an earlier extraction instead of submitting again; repeat the original input arguments. |
| file_ref | string | Optional existing Graph file_id in this tenant, used as the original/document anchor at commit. |
| auto_commit | boolean | false returns the complete preview without graph writes. Review then use data.commit. |
| source_name * | string | Label for provenance tracking (e.g. 'loan_policy_v3.pdf'). |
| profile_hint | string | Extraction profile; omit for auto-detection. |
| wait_seconds | integer | Maximum wait for an admitted extraction. Pending jobs are NOT committed; resume with job_id. |
Idempotently assert one native RDF quad with exact lexical terms, explicit blank-node scope and optional graph name. Uses existing node/edge create and read permissions, record policies and API-key label restrictions. No bulk import or caller-supplied metadata.
| Parameter | Type | Description |
|---|---|---|
| statement * | ref |
{
"name": "graph.assert_statement",
"description": "Idempotently assert one native RDF quad with exact lexical terms, explicit blank-node scope and optional graph name. Uses existing node/edge create and read permissions, record policies and API-key label restrictions. No bulk import or caller-supplied metadata.",
"inputSchema": {
"type": "object",
"$defs": {
"RDFTerm": {
"type": "object",
"title": "RDFTerm",
"required": [
"kind",
"value"
],
"properties": {
"kind": {
"enum": [
"iri",
"blank",
"literal"
],
"type": "string",
"title": "Kind"
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Scope",
"default": null
},
"value": {
"type": "string",
"title": "Value"
},
"datatype": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Datatype",
"default": null
},
"language": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Language",
"default": null
}
},
"description": "An immutable RDF term; blank-node scope is explicit, never global.",
"additionalProperties": false
},
"RDFStatement": {
"type": "object",
"title": "RDFStatement",
"required": [
"subject",
"predicate",
"object"
],
"properties": {
"graph": {
"anyOf": [
{
"$ref": "#/$defs/RDFTerm"
},
{
"type": "null"
}
],
"default": null
},
"object": {
"$ref": "#/$defs/RDFTerm"
},
"subject": {
"$ref": "#/$defs/RDFTerm"
},
"predicate": {
"$ref": "#/$defs/RDFTerm"
}
},
"description": "One asserted quad. None identifies the default graph, not every graph.",
"additionalProperties": false
}
},
"title": "SemanticStatementRequest",
"required": [
"statement"
],
"properties": {
"statement": {
"$ref": "#/$defs/RDFStatement"
}
},
"additionalProperties": false
}
}Read-only indexed RDF/LPG pattern query with policy-filtered evidence. Use tagged rdf, lpg and lpg_edge patterns. Returns unified bindings and evidence or, with output_format=nquads, a JSON envelope containing selected asserted N-Quads and selection metadata. Raw work stats are withheld (stats=null). No inferred RDF, writes, import, or whole-corpus export. Existing read permissions apply; N-Quads additionally requires data:export.
| Parameter | Type | Description |
|---|---|---|
| limit | integer | |
| limits | ref | |
| bindings | any | |
| patterns * | array | |
| node_bindings | any | |
| output_format | string | one of ["json","nquads"] |
| max_output_bytes | integer |
{
"name": "graph.semantic_query",
"description": "Read-only indexed RDF/LPG pattern query with policy-filtered evidence. Use tagged rdf, lpg and lpg_edge patterns. Returns unified bindings and evidence or, with output_format=nquads, a JSON envelope containing selected asserted N-Quads and selection metadata. Raw work stats are withheld (stats=null). No inferred RDF, writes, import, or whole-corpus export. Existing read permissions apply; N-Quads additionally requires data:export.",
"inputSchema": {
"type": "object",
"$defs": {
"RDFTerm": {
"type": "object",
"title": "RDFTerm",
"required": [
"kind",
"value"
],
"properties": {
"kind": {
"enum": [
"iri",
"blank",
"literal"
],
"type": "string",
"title": "Kind"
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Scope",
"default": null
},
"value": {
"type": "string",
"title": "Value"
},
"datatype": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Datatype",
"default": null
},
"language": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Language",
"default": null
}
},
"description": "An immutable RDF term; blank-node scope is explicit, never global.",
"additionalProperties": false
},
"RDFVariable": {
"type": "object",
"title": "RDFVariable",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"title": "Name"
}
},
"description": "A shared term binding, named without a leading question mark.",
"additionalProperties": false
},
"GraphSelection": {
"enum": [
"any"
],
"type": "string",
"title": "GraphSelection"
},
"RDFReadPattern": {
"type": "object",
"title": "RDFReadPattern",
"required": [
"subject",
"predicate",
"object",
"model"
],
"properties": {
"graph": {
"anyOf": [
{
"$ref": "#/$defs/RDFTerm"
},
{
"$ref": "#/$defs/RDFVariable"
},
{
"$ref": "#/$defs/GraphSelection"
},
{
"type": "null"
}
],
"title": "Graph",
"default": null
},
"model": {
"type": "string",
"const": "rdf",
"title": "Model"
},
"object": {
"anyOf": [
{
"$ref": "#/$defs/RDFTerm"
},
{
"$ref": "#/$defs/RDFVariable"
}
],
"title": "Object"
},
"subject": {
"anyOf": [
{
"$ref": "#/$defs/RDFTerm"
},
{
"$ref": "#/$defs/RDFVariable"
}
],
"title": "Subject"
},
"predicate": {
"anyOf": [
{
"$ref": "#/$defs/RDFTerm"
},
{
"$ref": "#/$defs/RDFVariable"
}
],
"title": "Predicate"
}
},
"additionalProperties": false
},
"LPGNodeVariable": {
"type": "object",
"title": "LPGNodeVariable",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"title": "Name"
}
},
"description": "A tenant-local node ID binding, never an RDF term.",
"additionalProperties": false
},
"LPGEdgeReadPattern": {
"type": "object",
"title": "LPGEdgeReadPattern",
"required": [
"source",
"target",
"model"
],
"properties": {
"model": {
"type": "string",
"const": "lpg_edge",
"title": "Model"
},
"equals": {
"type": "object",
"title": "Equals",
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"source": {
"anyOf": [
{
"type": "string",
"maxLength": 512,
"minLength": 1
},
{
"$ref": "#/$defs/LPGNodeVariable"
}
],
"title": "Source"
},
"target": {
"anyOf": [
{
"type": "string",
"maxLength": 512,
"minLength": 1
},
{
"$ref": "#/$defs/LPGNodeVariable"
}
],
"title": "Target"
},
"edge_type": {
"anyOf": [
{
"type": "string",
"maxLength": 256,
"minLength": 1
},
{
"type": "null"
}
],
"title": "Edge Type",
"default": null
},
"iri_properties": {
"type": "object",
"title": "Iri Properties",
"additionalProperties": {
"anyOf": [
{
"$ref": "#/$defs/RDFTerm"
},
{
"$ref": "#/$defs/RDFVariable"
}
]
}
}
},
"additionalProperties": false
},
"LPGNodeReadPattern": {
"type": "object",
"title": "LPGNodeReadPattern",
"required": [
"node_id",
"model"
],
"properties": {
"label": {
"anyOf": [
{
"type": "string",
"maxLength": 256,
"minLength": 1
},
{
"type": "null"
}
],
"title": "Label",
"default": null
},
"model": {
"type": "string",
"const": "lpg",
"title": "Model"
},
"equals": {
"type": "object",
"title": "Equals",
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"node_id": {
"anyOf": [
{
"type": "string",
"maxLength": 512,
"minLength": 1
},
{
"$ref": "#/$defs/LPGNodeVariable"
}
],
"title": "Node Id"
},
"iri_properties": {
"type": "object",
"title": "Iri Properties",
"additionalProperties": {
"anyOf": [
{
"$ref": "#/$defs/RDFTerm"
},
{
"$ref": "#/$defs/RDFVariable"
}
]
}
}
},
"additionalProperties": false
},
"SemanticQueryLimits": {
"type": "object",
"title": "SemanticQueryLimits",
"properties": {
"max_candidates": {
"type": "integer",
"title": "Max Candidates",
"default": 10000,
"maximum": 1000000,
"minimum": 1
},
"max_expansions": {
"type": "integer",
"title": "Max Expansions",
"default": 10000,
"maximum": 1000000,
"minimum": 1
},
"max_result_bytes": {
"type": "integer",
"title": "Max Result Bytes",
"default": 8388608,
"maximum": 67108864,
"minimum": 1
},
"max_index_entries": {
"type": "integer",
"title": "Max Index Entries",
"default": 10000,
"maximum": 1000000,
"minimum": 1
}
},
"description": "Finite per-call work and result limits; exhaustion is an error.",
"additionalProperties": false
}
},
"title": "SemanticReadRequest",
"required": [
"patterns"
],
"properties": {
"limit": {
"type": "integer",
"title": "Limit",
"default": 100,
"maximum": 1000,
"minimum": 1
},
"limits": {
"$ref": "#/$defs/SemanticQueryLimits"
},
"bindings": {
"anyOf": [
{
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/RDFTerm"
}
},
{
"type": "null"
}
],
"title": "Bindings",
"default": null
},
"patterns": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/$defs/RDFReadPattern"
},
{
"$ref": "#/$defs/LPGNodeReadPattern"
},
{
"$ref": "#/$defs/LPGEdgeReadPattern"
}
],
"discriminator": {
"mapping": {
"lpg": "#/$defs/LPGNodeReadPattern",
"rdf": "#/$defs/RDFReadPattern",
"lpg_edge": "#/$defs/LPGEdgeReadPattern"
},
"propertyName": "model"
}
},
"title": "Patterns",
"maxItems": 16,
"minItems": 1
},
"node_bindings": {
"anyOf": [
{
"type": "object",
"additionalProperties": {
"type": "string"
}
},
{
"type": "null"
}
],
"title": "Node Bindings",
"default": null
},
"output_format": {
"enum": [
"json",
"nquads"
],
"type": "string",
"title": "Output Format",
"default": "json"
},
"max_output_bytes": {
"type": "integer",
"title": "Max Output Bytes",
"default": 8388608,
"maximum": 67108864,
"minimum": 1
}
},
"additionalProperties": false
}
}Return the total number of nodes in the graph, optionally filtered by label. A cheap situational-awareness call an agent can make before deciding how to query or ingest.
| Parameter | Type | Description |
|---|---|---|
| label | string | Count only nodes with this label. Omit for all nodes. |
{
"name": "graph.counts",
"description": "Return the total number of nodes in the graph, optionally filtered by label. A cheap situational-awareness call an agent can make before deciding how to query or ingest.",
"inputSchema": {
"type": "object",
"required": [],
"properties": {
"label": {
"type": "string",
"description": "Count only nodes with this label. Omit for all nodes."
}
}
}
}List every node type (label) in the graph with how many nodes carry it, largest first. Cheap — O(types), not O(nodes). Call this first to learn what the graph contains (e.g. Person, Account, Invoice) before querying or filtering by label.
No parameters.
{
"name": "graph.labels",
"description": "List every node type (label) in the graph with how many nodes carry it, largest first. Cheap — O(types), not O(nodes). Call this first to learn what the graph contains (e.g. Person, Account, Invoice) before querying or filtering by label.",
"inputSchema": {
"type": "object",
"required": [],
"properties": {}
}
}Validate the tenant's live graph data against the defined schema. Reports missing required properties, type/enum violations, edge source/target-type violations, and orphan labels (labels present in the graph but undefined in the schema). Returns valid=true with empty violation lists when the graph conforms.
No parameters.
{
"name": "schema.validate",
"description": "Validate the tenant's live graph data against the defined schema. Reports missing required properties, type/enum violations, edge source/target-type violations, and orphan labels (labels present in the graph but undefined in the schema). Returns valid=true with empty violation lists when the graph conforms.",
"inputSchema": {
"type": "object",
"required": [],
"properties": {}
}
}Define a new node type — the primitive that lets an agent build the data model itself. The type_name becomes the canonical label for nodes of this type. Set app_id to make the type a per-app IAM boundary (only matching API keys may touch its nodes). Declare properties with per-field type / required / enum constraints, and immutable_properties that cannot change after creation. Fails 409 if the type already exists (use schema.update_node_type to change).
| Parameter | Type | Description |
|---|---|---|
| app_id | string | Owning application ID — makes this type an app-level IAM boundary. Omit for tenant-wide types. |
| type_name * | string | Canonical node label (1–100 chars). |
| properties | object | Map of property name → definition. Each definition may set: type (string|str|integer|int|float|number|boolean|bool|datetime|list|array|dict|object), required (bool), description, enum (list of allowed values), default, indexed (bool). |
| description | string | Human-readable description of the type. |
| required_labels | array | Additional labels every node of this type must carry. |
| allowed_edge_types | array | Outgoing edge types this node type may participate in. Omit for unrestricted. |
| data_classification | string | public | internal | restricted | highly_restricted. Default internal. |
| immutable_properties | array |
Define a new edge (relationship) type. Constrain which node types may be the source/target, declare edge properties, and set cardinality (one_to_one | one_to_many | many_to_one | many_to_many). Fails 409 if the type already exists.
| Parameter | Type | Description |
|---|---|---|
| app_id | string | |
| type_name * | string | Canonical edge type name (1–100 chars). |
| properties | object | Map of property name → definition. Each definition may set: type (string|str|integer|int|float|number|boolean|bool|datetime|list|array|dict|object), required (bool), description, enum (list of allowed values), default, indexed (bool). |
| cardinality | string | one_to_one | one_to_many | many_to_one | many_to_many. Default many_to_many. |
| description | string | |
| source_node_types | array | Allowed source node types. Omit for any. |
| target_node_types | array | Allowed target node types. Omit for any. |
| data_classification | string | public | internal | restricted | highly_restricted. Default internal. |
You are connected to Purple8 Hyper Graph — an AI-native complete backend and SOTA software infrastructure in a single process (Unified LPG + RDF + Hypergraph + Vector + Structured Tables + Document Store + Full-Text + Stateful Workflows + Event Bus + RBAC/KMS + Compliance/Audit). ══ 3-PHASE AI-NATIVE APPLICATION LIFECYCLE ══ 1. PHASE 1 — CONFIGURE THE BACKEND OVER MCP (ZERO SERVER LLM OR DOCINTEL REQUIRED): You do NOT need a server-side LLM key or DocIntel configured to build an application. Configure `schema.*`, `graph.*` (Unified LPG + RDF), `data.commit`, `data.get_table`, `data.query_table_rows`, `journey.*`, `scheduler.*`, `egress.*`, `quantum.*`, `guardrails.*`, and `admin.*` directly — they execute deterministically in-process, and YOU (the connected agent) provide the reasoning. • App-generated data, structured records, tables, or entities YOU extract → call `graph.add_node`, `graph.add_edge`, `graph.assert_statement`, or `data.commit` (no DocIntel needed). • External binary documents (70+ formats: PDF, DOCX, XLSX, IFC/BIM, CAD, OCR) → call `data.ingest_file` / `data.ingest_text` (pairs with Purple8 DocIntel when configured). • Zero-LLM retrieval for agents → call `graph.hybrid_search`, `graph.vector_search`, `graph.traverse`, `graph.query`, or `graph.semantic_query`. 2. PHASE 2 — BUILD THE FRONTEND WHEN ASKED ('FRONTEND-ONLY' APPLICATION PATTERN): Because Purple8 IS the complete backend (DB, graph, vector search, workflows, HITL, RBAC, audit), never scaffold a separate custom backend (no Express/FastAPI/Prisma glue). When the user asks for a UI/frontend, generate a zero-dependency TypeScript SDK with `p8 sdk ts --out src/lib/purple8.ts` (or call REST `/nodes`, `/edges`, `/query`, `/semantic/query`, `/v1/journeys`, `/mcp/invoke`) and build the React/Next.js/Vite UI directly against Purple8. 3. PHASE 3 — POST-BUILD RUNTIME LLM & MODEL ROUTER CONFIGURATION (POC & PRODUCTION): After the application is built, customers configure their preferred LLM provider (OpenAI, Anthropic, Google/Vertex, AWS Bedrock, Azure OpenAI, Mistral, Cohere, xAI, or local Ollama/vLLM in `/dashboard/ai` / `PUT /ai/config`) or configure the dynamic Model Router via `models.*` (`models.search_known`, `models.upsert`, `models.set_policy`, `models.route_explain`). This powers runtime `rag.query` / `rag.hybrid_query` synthesis, autonomous RAG tuning (`rag.profile_collection` → `rag.tune_collection`), and Journey `ai_step` stage hooks in POC and production. ══ UNIFIED LPG + RDF ON A SINGLE INSTANCE (USE BOTH FOR BEST OUTCOMES) ══ The database industry is divided between Property Graphs (LPG) and Semantic RDF — Purple8 runs BOTH natively on the same engine and joins them in a single query: 1. LPG (`graph.add_node`, `graph.add_edge`, `graph.traverse`, `graph.query`): Use for operational application entities, mutable state, weights, and vector embeddings. 2. RDF (`graph.assert_statement`, `graph.import_nquads`): Use for domain ontologies (FIBO, SNOMED, ISO, IFC/bSDD), regulatory rules, canonical taxonomies, and named-graph provenance quads. 3. The LPG ↔ RDF Bridge (`iri_properties` + `graph.semantic_query`): Store an IRI string on any LPG node/edge property (e.g. `{"jurisdiction_iri": "urn:fibo:jurisdiction:VG"}`), assert RDF quads about that IRI via `graph.assert_statement`, and join LPG patterns (`model='lpg'`, `model='lpg_edge'` with `iri_properties: {"jurisdiction_iri": {"name": "jur"}}`) with RDF quad patterns (`model='rdf'`, `subject: {"name": "jur"}`) in ONE indexed conjunctive call to `graph.semantic_query`! ══ 176 TOOLS ACROSS 19 NAMESPACES ══ SCHEMA NAMESPACE (schema.*) — read tools require viewer; define/update/delete require admin schema.define_node_type Define a node type with property constraints (type: string|integer|float|number|boolean|datetime|list|array|dict|object, required, enum, indexed), immutable_properties, and data_classification (public|internal|restricted|highly_restricted). schema.define_ed
Names, descriptions and schemas were written by the server and are shown as data.
Pattern matches on what the server declares. They show what it says it can do, not what it does.
None yet. Changes appear after a server's second daily check.
| boolean |
| Persist LLM-inferred edges back to the graph. Default false. |
| vector_expansion | boolean | Filter BFS neighbours by cosine similarity. Default true. |
| collection_profile | string | Name of a saved CollectionProfile (from rag.tune_collection save_as). Fills in mode/fusion_alpha/max_hops/seed_k as defaults — explicit params always win. |
| semantic_path_scoring | boolean | Rank paths by keyword overlap + edge-type bonuses. Default true. |
{
"name": "rag.hybrid_query",
"description": "Hybrid Graph-Vector RAG — fuses vector similarity AND graph structural signals at every stage: dual-seed fusion (Weighted RRF over vector rank + degree centrality), vector-guided BFS, and semantic path scoring. Highest accuracy: MRR 0.85, multi-hop 0.91. ~5x slower (p50 ~240 ms). Recommended as the default RAG tool for agents that need high quality.",
"inputSchema": {
"type": "object",
"required": [
"question"
],
"properties": {
"mode": {
"enum": [
"balanced",
"graph_first",
"vector_first"
],
"type": "string",
"default": "balanced",
"description": "Fusion mode. 'balanced' for most questions; 'graph_first' for dense-relationship queries; 'vector_first' for semantic similarity."
},
"seed_k": {
"type": "integer",
"default": 5,
"description": "Seed nodes per signal (1-20). Default 5."
},
"max_hops": {
"type": "integer",
"default": 2,
"description": "BFS expansion depth (1-5). Default 2."
},
"question": {
"type": "string",
"description": "The question to answer."
},
"max_nodes": {
"type": "integer",
"default": 50,
"description": "Maximum subgraph nodes in context (5-200). Default 50."
},
"max_tokens": {
"type": "integer",
"default": 1024,
"description": "LLM output token budget. Default 1024."
},
"temperature": {
"type": "number",
"default": 0,
"description": "LLM sampling temperature. Default 0.0."
},
"fusion_alpha": {
"type": "number",
"description": "Explicit graph weight (0.0=pure vector, 1.0=pure graph). Overrides mode."
},
"label_filter": {
"type": "array",
"items": {
"type": "string"
},
"description": "Restrict retrieval to nodes with these labels."
},
"write_inferred": {
"type": "boolean",
"default": false,
"description": "Persist LLM-inferred edges back to the graph. Default false."
},
"vector_expansion": {
"type": "boolean",
"default": true,
"description": "Filter BFS neighbours by cosine similarity. Default true."
},
"collection_profile": {
"type": "string",
"description": "Name of a saved CollectionProfile (from rag.tune_collection save_as). Fills in mode/fusion_alpha/max_hops/seed_k as defaults — explicit params always win."
},
"semantic_path_scoring": {
"type": "boolean",
"default": true,
"description": "Rank paths by keyword overlap + edge-type bonuses. Default true."
}
}
}
}{
"name": "data.ingest_text",
"description": "Extract entities and relationships from raw text and write them into the graph. Calls preview first, then commits the complete extraction on success. auto_commit=false returns a review-only preview. Pending jobs return job_id for resumption. Original bytes are not stored automatically; supply file_ref or use data.commit with file_bytes_b64 if needed. After an interrupted write, ask the user to confirm a retry; use data.commit with the retained reviewed payload instead of re-extracting. Requires editor role.",
"inputSchema": {
"type": "object",
"required": [
"text",
"source_name"
],
"properties": {
"text": {
"type": "string",
"description": "The raw text to extract knowledge from."
},
"job_id": {
"type": "string",
"description": "Resume an earlier extraction instead of submitting again; repeat the original input arguments."
},
"file_ref": {
"type": "string",
"description": "Optional existing Graph file_id in this tenant, used as the original/document anchor at commit."
},
"auto_commit": {
"type": "boolean",
"default": true,
"description": "false returns the complete preview without graph writes. Review then use data.commit."
},
"source_name": {
"type": "string",
"description": "Label for the source document (provenance)."
},
"profile_hint": {
"enum": [
"",
"aec",
"contract",
"financial",
"scientific",
"general"
],
"type": "string",
"description": "Extraction profile; omit for auto-detection."
},
"wait_seconds": {
"type": "integer",
"default": 30,
"maximum": 600,
"minimum": 0,
"description": "Maximum wait for an admitted extraction. Pending jobs are NOT committed; resume with job_id."
}
}
}
}| doc_type | any |
| entities * | array |
| file_ref | any |
| markdown | string |
| metadata | object | Preserve extraction metadata. For a stored File, sha256 binds the review to original bytes (not Markdown); optional file_version pins its positive integer version. A changed/missing bound source returns source_version_conflict (409) before writes. Unpinned legacy payloads cannot prove that their rev… |
| raw_text | any | Full document text used to extract per-chunk text from section_boundaries. Pass the complete text for accurate MENTIONED_IN linkage. |
| session_id | any |
| source_name | any |
| similarity_k | integer | Number of nearest neighbours to consider per node. |
| chunking_hint | any |
| relationships * | array |
| file_bytes_b64 | any |
| identity_policy | string | review_conflicts rejects conflicting names/types/identifiers and cross-document name-only matches before writes. Supply matching stable identifiers, same-source provenance, or explicit link_existing confirmation. trust_ids preserves caller-managed ID semantics. Explicit identifier evidence is checke… |
| update_entities | boolean | Merge this document's values into entities that already exist. Off by default: existing entities are linked, not modified. Requires edit access to every existing entity (403 otherwise; nothing is written). |
| markdown_sections | array |
| section_boundaries | array |
| similarity_threshold | number | Minimum cosine similarity for SIMILAR_TO edge creation. |
| build_similarity_edges | boolean | Build SIMILAR_TO edges to cross-batch neighbours via vector search. On by default — turns every commit into a native hybrid ingest. |
| suggested_embedding_model | any |
{
"name": "data.commit",
"description": "Commit a reviewed extraction or your own extractor's output without invoking DocIntel. Uses the complete POST /ingest/commit contract: entities, relationships, Markdown, spans, tables/pages, context, file_ref or inline file_bytes_b64 and ingestion options. Existing entities are linked, not edited, unless update_entities=true. For extractor-generated IDs use identity_policy='review_conflicts': name matches alone are not identity proof. On entity_identity_conflict nothing was written; correct/exclude the incoming entity and update relationship endpoints, or explicitly confirm identity_resolution='link_existing', then retry. link_existing never edits existing facts. After interruption or a lost response, ask the user to confirm retrying the retained reviewed payload. Reuse entity IDs, assertion keys and file_ref; do not automatically re-extract. Retain metadata.sha256 (original bytes) and optional metadata.file_version. On source_version_conflict nothing was written: obtain and review current-source extraction and ask for confirmation, rather than replaying or relabeling the old review. SIMILAR_TO edges (enabled by default) are similarity, not factual assertions. Inspect embedding, document_chunks, structured_content and original_file outcomes; a successful write alone does not guarantee retrieval readiness. Requires editor role.",
"inputSchema": {
"type": "object",
"$defs": {
"LinkRule": {
"type": "object",
"title": "LinkRule",
"required": [
"column",
"target_label"
],
"properties": {
"edge": {
"type": "string",
"title": "Edge",
"default": "REFERS_TO"
},
"match": {
"enum": [
"exact_id",
"name_exact",
"name_normalised"
],
"type": "string",
"title": "Match",
"default": "name_normalised"
},
"column": {
"type": "string",
"title": "Column",
"maxLength": 256,
"minLength": 1
},
"on_missing": {
"enum": [
"skip",
"create"
],
"type": "string",
"title": "On Missing",
"default": "skip"
},
"target_label": {
"type": "string",
"title": "Target Label"
},
"columns_include": {
"type": "array",
"items": {
"type": "string"
},
"title": "Columns Include",
"maxItems": 32
}
},
"description": "One declared Row → entity link (spec §6)."
},
"CommitPage": {
"type": "object",
"title": "CommitPage",
"required": [
"page_number",
"char_start",
"char_end"
],
"properties": {
"char_end": {
"type": "integer",
"title": "Char End",
"minimum": 0
},
"char_start": {
"type": "integer",
"title": "Char Start",
"minimum": 0
},
"page_number": {
"type": "integer",
"title": "Page Number"
}
},
"description": "A page/slide/sheet as a ``[char_start, char_end)`` range of ``markdown``."
},
"CommitTable": {
"type": "object",
"title": "CommitTable",
"properties": {
"rows": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string"
}
},
"title": "Rows",
"maxItems": 200000
},
"caption": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "null"
}
],
"title": "Caption",
"default": null
},
"header_rows": {
"type": "integer",
"title": "Header Rows",
"default": 1,
"maximum": 10,
"minimum": 0
},
"page_number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Page Number",
"default": null
},
"table_index": {
"type": "integer",
"title": "Table Index",
"default": 0,
"minimum": 0
},
"indexed_columns": {
"type": "object",
"title": "Indexed Columns",
"maxProperties": 64,
"additionalProperties": {
"enum": [
"profile",
"agent",
"user"
],
"type": "string"
}
}
},
"description": "A document table as rows (``[row][col]`` strings, header rows first)."
},
"DocumentContextClaims": {
"type": "object",
"title": "DocumentContextClaims",
"properties": {
"geo": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
],
"title": "Geo",
"default": null,
"description": "Locations mentioned in the content, e.g. ['London, UK']."
},
"author": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Author",
"default": null,
"description": "Authoring entity named in the content, e.g. 'entity:JPMorgan'."
},
"content_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Content Time",
"default": null,
"description": "Primary date the content is ABOUT (ISO-8601), e.g. '2025-09-30'."
},
"content_time_span": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
],
"title": "Content Time Span",
"default": null,
"description": "Optional [start, end] ISO-8601 range the content covers."
},
"doc_type_confidence": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Doc Type Confidence",
"default": null,
"description": "Confidence in the doc_type classification, in [0.0, 1.0]."
}
},
"description": "Content-derived 4D context-signal fields — the *claim* half of the barcode.\n\nThese are extracted from the document by Purple8-DocIntel and are, by nature,\n*claims* (the document asserting facts about itself), as opposed to the\nengine-stamped high-trust fields (``_ctx.ingested_at`` / ``_ctx.tenant`` /\n``_ctx.ingest_actor``) which the graph engine writes itself.\n\nEvery field is **optional** — the barcode degrades gracefully when a signal is\nabsent (missing → neutral at scoring time, never a penalty). The ingest\nrouter translates these to reserved ``_ctx.*`` node properties and runs\n:func:`~purple8_graph.core.context_signal.validate_context_types` before\nwriting, so a malformed claim is rejected at the boundary rather than silently\ncorrupting the retrieval scorer downstream. See ``purple8-company: ip/trade-secrets/context-signal-4d.md``."
},
"ExtractedEntityPayload": {
"type": "object",
"title": "ExtractedEntityPayload",
"required": [
"id",
"type",
"name"
],
"properties": {
"id": {
"type": "string",
"title": "Id"
},
"name": {
"type": "string",
"title": "Name"
},
"type": {
"type": "string",
"title": "Type"
},
"spans": {
"type": "array",
"items": {
"type": "array",
"maxItems": 2,
"minItems": 2,
"prefixItems": [
{
"type": "integer"
},
{
"type": "integer"
}
]
},
"title": "Spans",
"maxItems": 200
},
"include": {
"type": "boolean",
"title": "Include",
"default": true
},
"identity": {
"type": "object",
"title": "Identity",
"description": "Explicit stable identifiers, keyed by namespace (for example company_registration). Not inferred from arbitrary properties.",
"additionalProperties": {
"type": "string"
}
},
"properties": {
"type": "object",
"title": "Properties",
"additionalProperties": true
},
"relation_keys": {
"type": "array",
"items": {
"type": "string"
},
"title": "Relation Keys",
"description": "Shared semantic keys that trigger CO_RELEVANT edges across batches. Any two nodes with the same key will be connected automatically."
},
"identity_resolution": {
"enum": [
"check",
"link_existing"
],
"type": "string",
"title": "Identity Resolution",
"default": "check",
"description": "link_existing explicitly confirms this ID is the intended existing entity despite conflicting identity evidence; it does not request an edit."
}
}
},
"ExtractedRelationshipPayload": {
"type": "object",
"title": "ExtractedRelationshipPayload",
"required": [
"source",
"target",
"type"
],
"properties": {
"type": {
"type": "string",
"title": "Type"
},
"source": {
"type": "string",
"title": "Source"
},
"target": {
"type": "string",
"title": "Target"
},
"include": {
"type": "boolean",
"title": "Include",
"default": true
},
"properties": {
"type": "object",
"title": "Properties",
"additionalProperties": true
},
"edge_dedup_key": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Edge Dedup Key",
"default": null
}
}
}
},
"title": "CommitRequest",
"required": [
"entities",
"relationships"
],
"properties": {
"links": {
"type": "array",
"items": {
"$ref": "#/$defs/LinkRule"
},
"title": "Links",
"maxItems": 64
},
"pages": {
"type": "array",
"items": {
"$ref": "#/$defs/CommitPage"
},
"title": "Pages",
"maxItems": 20000
},
"tables": {
"type": "array",
"items": {
"$ref": "#/$defs/CommitTable"
},
"title": "Tables",
"maxItems": 2000
},
"upsert": {
"type": "boolean",
"title": "Upsert",
"default": true,
"description": "Idempotent re-projection mode (default on): never create __vN twins, and derive deterministic edge ids so re-commits converge instead of duplicating."
},
"context": {
"anyOf": [
{
"$ref": "#/$defs/DocumentContextClaims"
},
{
"type": "null"
}
],
"default": null
},
"file_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "File Id",
"default": null,
"description": "Content-hash / File node ID for a file-backed commit. When provided, the orchestrator creates File → HAS_CHUNK → Chunk edges."
},
"doc_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Doc Type",
"default": ""
},
"entities": {
"type": "array",
"items": {
"$ref": "#/$defs/ExtractedEntityPayload"
},
"title": "Entities"
},
"file_ref": {
"anyOf": [
{
"type": "string",
"maxLength": 128
},
{
"type": "null"
}
],
"title": "File Ref",
"default": null
},
"markdown": {
"type": "string",
"title": "Markdown",
"default": "",
"maxLength": 20000000
},
"metadata": {
"type": "object",
"title": "Metadata",
"description": "Preserve extraction metadata. For a stored File, sha256 binds the review to original bytes (not Markdown); optional file_version pins its positive integer version. A changed/missing bound source returns source_version_conflict (409) before writes. Unpinned legacy payloads cannot prove that their review matches the current source.",
"additionalProperties": true
},
"raw_text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Raw Text",
"default": "",
"description": "Full document text used to extract per-chunk text from section_boundaries. Pass the complete text for accurate MENTIONED_IN linkage."
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Session Id",
"default": null
},
"source_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Source Name",
"default": "unknown"
},
"similarity_k": {
"type": "integer",
"title": "Similarity K",
"default": 5,
"maximum": 20,
"minimum": 1,
"description": "Number of nearest neighbours to consider per node."
},
"chunking_hint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Chunking Hint",
"default": ""
},
"relationships": {
"type": "array",
"items": {
"$ref": "#/$defs/ExtractedRelationshipPayload"
},
"title": "Relationships"
},
"file_bytes_b64": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "File Bytes B64",
"default": null
},
"identity_policy": {
"enum": [
"trust_ids",
"review_conflicts"
],
"type": "string",
"title": "Identity Policy",
"default": "trust_ids",
"description": "review_conflicts rejects conflicting names/types/identifiers and cross-document name-only matches before writes. Supply matching stable identifiers, same-source provenance, or explicit link_existing confirmation. trust_ids preserves caller-managed ID semantics. Explicit identifier evidence is checked in either mode."
},
"update_entities": {
"type": "boolean",
"title": "Update Entities",
"default": false,
"description": "Merge this document's values into entities that already exist. Off by default: existing entities are linked, not modified. Requires edit access to every existing entity (403 otherwise; nothing is written)."
},
"markdown_sections": {
"type": "array",
"items": {
"type": "integer"
},
"title": "Markdown Sections"
},
"section_boundaries": {
"type": "array",
"items": {
"type": "integer"
},
"title": "Section Boundaries"
},
"similarity_threshold": {
"type": "number",
"title": "Similarity Threshold",
"default": 0.7,
"maximum": 1,
"minimum": 0,
"description": "Minimum cosine similarity for SIMILAR_TO edge creation."
},
"build_similarity_edges": {
"type": "boolean",
"title": "Build Similarity Edges",
"default": true,
"description": "Build SIMILAR_TO edges to cross-batch neighbours via vector search. On by default — turns every commit into a native hybrid ingest."
},
"suggested_embedding_model": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Suggested Embedding Model",
"default": ""
}
}
}
}{
"name": "data.ingest_file",
"description": "Send a document file (PDF, DOCX, PPTX, XLSX, HTML, IFC, CSV, …) to Purple8 DocIntel for parsing, entity extraction, and graph ingestion. The document is fetched by DocIntel from a public URL, not a local path. The complete extraction is committed only when finished successfully. auto_commit=false returns a review-only preview; pending jobs return job_id for resumption. URL extraction does not retain original bytes in Graph; supply file_ref or commit an original separately. Use this when the knowledge source is a document rather than raw text. Requires editor role and DocIntel to be running. After an interrupted write, ask the user to confirm a retry; use data.commit with the retained reviewed payload instead of re-extracting.",
"inputSchema": {
"type": "object",
"required": [
"url",
"source_name"
],
"properties": {
"url": {
"type": "string",
"description": "Publicly accessible URL of the document to fetch and process."
},
"job_id": {
"type": "string",
"description": "Resume an earlier extraction instead of submitting again; repeat the original input arguments."
},
"file_ref": {
"type": "string",
"description": "Optional existing Graph file_id in this tenant, used as the original/document anchor at commit."
},
"auto_commit": {
"type": "boolean",
"default": true,
"description": "false returns the complete preview without graph writes. Review then use data.commit."
},
"source_name": {
"type": "string",
"description": "Label for provenance tracking (e.g. 'loan_policy_v3.pdf')."
},
"profile_hint": {
"enum": [
"",
"aec",
"contract",
"financial",
"scientific",
"general"
],
"type": "string",
"description": "Extraction profile; omit for auto-detection."
},
"wait_seconds": {
"type": "integer",
"default": 30,
"maximum": 600,
"minimum": 0,
"description": "Maximum wait for an admitted extraction. Pending jobs are NOT committed; resume with job_id."
}
}
}
}| Properties that cannot be modified after node creation. |
{
"name": "schema.define_node_type",
"description": "Define a new node type — the primitive that lets an agent build the data model itself. The type_name becomes the canonical label for nodes of this type. Set app_id to make the type a per-app IAM boundary (only matching API keys may touch its nodes). Declare properties with per-field type / required / enum constraints, and immutable_properties that cannot change after creation. Fails 409 if the type already exists (use schema.update_node_type to change).",
"inputSchema": {
"type": "object",
"required": [
"type_name"
],
"properties": {
"app_id": {
"type": "string",
"description": "Owning application ID — makes this type an app-level IAM boundary. Omit for tenant-wide types."
},
"type_name": {
"type": "string",
"description": "Canonical node label (1–100 chars)."
},
"properties": {
"type": "object",
"description": "Map of property name → definition. Each definition may set: type (string|str|integer|int|float|number|boolean|bool|datetime|list|array|dict|object), required (bool), description, enum (list of allowed values), default, indexed (bool).",
"additionalProperties": {
"type": "object"
}
},
"description": {
"type": "string",
"description": "Human-readable description of the type."
},
"required_labels": {
"type": "array",
"items": {
"type": "string"
},
"description": "Additional labels every node of this type must carry."
},
"allowed_edge_types": {
"type": "array",
"items": {
"type": "string"
},
"description": "Outgoing edge types this node type may participate in. Omit for unrestricted."
},
"data_classification": {
"type": "string",
"default": "internal",
"description": "public | internal | restricted | highly_restricted. Default internal."
},
"immutable_properties": {
"type": "array",
"items": {
"type": "string"
},
"description": "Properties that cannot be modified after node creation."
}
}
}
}{
"name": "schema.define_edge_type",
"description": "Define a new edge (relationship) type. Constrain which node types may be the source/target, declare edge properties, and set cardinality (one_to_one | one_to_many | many_to_one | many_to_many). Fails 409 if the type already exists.",
"inputSchema": {
"type": "object",
"required": [
"type_name"
],
"properties": {
"app_id": {
"type": "string"
},
"type_name": {
"type": "string",
"description": "Canonical edge type name (1–100 chars)."
},
"properties": {
"type": "object",
"description": "Map of property name → definition. Each definition may set: type (string|str|integer|int|float|number|boolean|bool|datetime|list|array|dict|object), required (bool), description, enum (list of allowed values), default, indexed (bool).",
"additionalProperties": {
"type": "object"
}
},
"cardinality": {
"type": "string",
"default": "many_to_many",
"description": "one_to_one | one_to_many | many_to_one | many_to_many. Default many_to_many."
},
"description": {
"type": "string"
},
"source_node_types": {
"type": "array",
"items": {
"type": "string"
},
"description": "Allowed source node types. Omit for any."
},
"target_node_types": {
"type": "array",
"items": {
"type": "string"
},
"description": "Allowed target node types. Omit for any."
},
"data_classification": {
"type": "string",
"default": "internal",
"description": "public | internal | restricted | highly_restricted. Default internal."
}
}
}
}