operation required
string
Enum: "start-flow" "stop-flow" "list-flows" "get-flow" "list-blueprints" "get-blueprint" "put-blueprint" "delete-blueprint"
Request Body schema: application/json required
operation required
string
Enum: "start-flow" "stop-flow" "list-flows" "get-flow" "list-blueprints" "get-blueprint" "put-blueprint" "delete-blueprint"
Flow operation:
+" class="sc-iKGpAq sc-cCYyou dXXcln cFvDiF">
Flow operation:
start-flow: Start a new flow instance from a blueprint
stop-flow: Stop a running flow instance
@@ -710,29 +714,29 @@ The config service (/api/v1/config) manages st
put-blueprint: Create/update blueprint definition
delete-blueprint: Delete blueprint definition
-
flow-id string
Flow instance ID (required for start-flow, stop-flow, get-flow)
-
blueprint-name string
Flow blueprint name (required for start-flow, get-blueprint, put-blueprint, delete-blueprint)
-
blueprint-definition object
Flow blueprint definition (required for put-blueprint)
-
description string
Flow description (optional for start-flow)
-
parameters object
flow-id string
Flow instance ID (required for start-flow, stop-flow, get-flow)
+
blueprint-name string
Flow blueprint name (required for start-flow, get-blueprint, put-blueprint, delete-blueprint)
+
blueprint-definition object
Flow blueprint definition (required for put-blueprint)
+
description string
Flow description (optional for start-flow)
+
parameters object
Flow parameters (for start-flow).
+" class="sc-iKGpAq sc-cCYyou dXXcln cFvDiF">
Flow parameters (for start-flow).
All values are stored as strings, regardless of input type.
-
Responses 401 Unauthorized - Invalid or missing bearer token
-
post /api/v1/flow Local development server
-
http://localhost:8088 /api/v1/flow
Request samples Content type application/json
Example Start a flow instance Start flow with defaults Stop a flow instance List running flows Get flow details List available blueprints Get blueprint definition Create/update blueprint Delete blueprint Start a flow instance Copy
Expand all Collapse all { "operation" : "start-flow" ,
"flow-id" : "my-flow" ,
"blueprint-name" : "document-rag" ,
"description" : "My document processing flow" ,
"parameters" :
{ "model" : "gpt-4" ,
"temperature" : "0.7"
} } Response samples Content type application/json
Example Flow started Running flows Flow details Available blueprints Blueprint definition Flow started
Responses
401 Unauthorized - Invalid or missing bearer token
+
post /api/v1/flow Local development server
+
http://localhost:8088 /api/v1/flow
Request samples Content type application/json
Example Start a flow instance Start flow with defaults Stop a flow instance List running flows Get flow details List available blueprints Get blueprint definition Create/update blueprint Delete blueprint Start a flow instance Copy
Expand all Collapse all { "operation" : "start-flow" ,
"flow-id" : "my-flow" ,
"blueprint-name" : "document-rag" ,
"description" : "My document processing flow" ,
"parameters" :
{ "model" : "gpt-4" ,
"temperature" : "0.7"
} } Response samples Content type application/json
Example Flow started Running flows Flow details Available blueprints Blueprint definition Flow started
Document library management (global service)
-
Document library management Document library management Manage document library: add, remove, list documents, and control processing.
+" class="sc-iKGpAq sc-cCYyou dXXcln dHaogz">
Manage document library: add, remove, list documents, and control processing.
Document Library
The librarian service manages a persistent library of documents that can be:
@@ -780,7 +784,7 @@ for processing and handled asynchronously.
Stop ongoing library document processing.
list-processing
List current processing tasks and their status.
- Request Body schema: application/json required
operation required
string
Enum: "add-document" "remove-document" "list-documents" "start-processing" "stop-processing" "list-processing"
Request Body schema: application/json required
operation required
string
Enum: "add-document" "remove-document" "list-documents" "start-processing" "stop-processing" "list-processing"
Library operation:
+" class="sc-iKGpAq sc-cCYyou dXXcln cFvDiF">
Library operation:
add-document: Add document to library
remove-document: Remove document from library
@@ -798,35 +802,35 @@ for processing and handled asynchronously.
stop-processing: Stop library processing
list-processing: List processing status
-
flow collection string
Default: "default"
user string
Default: "trustgraph"
document-id processing-id string
Processing task identifier
-
document-metadata object (DocumentMetadata)
Document metadata for library management
-
processing-metadata object (ProcessingMetadata)
Processing metadata for library document processing
-
content string
Document content (for add-document with inline content)
-
criteria Array of objects
Search criteria for filtering documents
-
Responses 401 Unauthorized - Invalid or missing bearer token
-
post /api/v1/librarian Local development server
-
http://localhost:8088 /api/v1/librarian
Request samples Content type application/json
Example Add document by URL Add document with inline content Remove document List all documents List documents with criteria Start processing library documents Stop processing List processing status Add document by URL Copy
Expand all Collapse all Response samples Content type application/json
Example List of documents Processing status List of documents Copy
Expand all Collapse all { "document-metadatas" :
[ { "title" : "Document 1" ,
"author" : "John Doe" ,
} ,
{ "title" : "Document 2" ,
"author" : "Jane Smith" ,
} ] }
collection string
Default: "default"
user string
Default: "trustgraph"
document-id processing-id string
Processing task identifier
+
document-metadata object (DocumentMetadata)
Document metadata for library management
+
processing-metadata object (ProcessingMetadata)
Processing metadata for library document processing
+
content string
Document content (for add-document with inline content)
+
criteria Array of objects
Search criteria for filtering documents
+
Responses 401 Unauthorized - Invalid or missing bearer token
+
post /api/v1/librarian Local development server
+
http://localhost:8088 /api/v1/librarian
Request samples Content type application/json
Example Add document by URL Add document with inline content Remove document List all documents List documents with criteria Start processing library documents Stop processing List processing status Add document by URL Copy
Expand all Collapse all Response samples Content type application/json
Example List of documents Processing status List of documents Copy
Expand all Collapse all { "document-metadatas" :
[ { "title" : "Document 1" ,
"author" : "John Doe" ,
} ,
{ "title" : "Document 2" ,
"author" : "Jane Smith" ,
} ] }
Knowledge graph core management (global service)
-
Knowledge graph core management Knowledge graph core management Manage knowledge graph cores - persistent storage of triples and embeddings.
+" class="sc-iKGpAq sc-cCYyou dXXcln dHaogz">
Manage knowledge graph cores - persistent storage of triples and embeddings.
Knowledge Cores
Knowledge cores are the foundational storage units for:
@@ -890,7 +894,7 @@ Removes data from flow instance but doesn't delete the core.
Multiple messages with triples or graph-embeddings
Final message with eos: true to signal completion
- Request Body schema: application/json required
operation required
string
Enum: "list-kg-cores" "get-kg-core" "put-kg-core" "delete-kg-core" "load-kg-core" "unload-kg-core"
Request Body schema: application/json required
operation required
string
Enum: "list-kg-cores" "get-kg-core" "put-kg-core" "delete-kg-core" "load-kg-core" "unload-kg-core"
Knowledge core operation:
+" class="sc-iKGpAq sc-cCYyou dXXcln cFvDiF">
Knowledge core operation:
list-kg-cores: List knowledge cores for user
get-kg-core: Get knowledge core by ID
@@ -908,29 +912,29 @@ Removes data from flow instance but doesn't delete the core.
load-kg-core: Load knowledge core into flow
unload-kg-core: Unload knowledge core from flow
-
user string
Default: "trustgraph"
User identifier (for list-kg-cores, put-kg-core, delete-kg-core)
-
id string
Knowledge core ID (for get, put, delete, load, unload)
-
flow string
Flow ID (for load-kg-core)
-
collection string
Default: "default"
Collection identifier (for load-kg-core)
-
triples object
Triples to store (for put-kg-core)
-
graph-embeddings object
Graph embeddings to store (for put-kg-core)
-
Responses 401 Unauthorized - Invalid or missing bearer token
-
post /api/v1/knowledge Local development server
-
http://localhost:8088 /api/v1/knowledge
Request samples Content type application/json
Example List knowledge cores Get knowledge core Store triples Store embeddings Store triples and embeddings together Delete knowledge core Load core into flow Unload core from flow List knowledge cores Response samples Content type application/json
Example List of knowledge cores Knowledge core triples (streaming) Knowledge core embeddings (streaming) End of stream marker Delete successful (empty response) List of knowledge cores Copy
Expand all Collapse all { "ids" :
[ "core-123" ,
"core-456" ,
"core-789"
] }
user string
Default: "trustgraph"
User identifier (for list-kg-cores, put-kg-core, delete-kg-core)
+
id string
Knowledge core ID (for get, put, delete, load, unload)
+
flow string
Flow ID (for load-kg-core)
+
collection string
Default: "default"
Collection identifier (for load-kg-core)
+
triples object
Triples to store (for put-kg-core)
+
graph-embeddings object
Graph embeddings to store (for put-kg-core)
+
Responses 401 Unauthorized - Invalid or missing bearer token
+
post /api/v1/knowledge Local development server
+
http://localhost:8088 /api/v1/knowledge
Request samples Content type application/json
Example List knowledge cores Get knowledge core Store triples Store embeddings Store triples and embeddings together Delete knowledge core Load core into flow Unload core from flow List knowledge cores Response samples Content type application/json
Example List of knowledge cores Knowledge core triples (streaming) Knowledge core embeddings (streaming) End of stream marker Delete successful (empty response) List of knowledge cores Copy
Expand all Collapse all { "ids" :
[ "core-123" ,
"core-456" ,
"core-789"
] }
Collection metadata management (global service)
-
Collection metadata management Collection metadata management Manage collection metadata for organizing documents and knowledge.
+" class="sc-iKGpAq sc-cCYyou dXXcln dHaogz">
Manage collection metadata for organizing documents and knowledge.
Collections
Collections are organizational units for grouping:
@@ -982,45 +986,45 @@ If it exists, metadata is updated. Allows setting name, description, and tags.
delete-collection
Delete a collection by user and collection ID. This removes the metadata but
typically does not delete the associated data (documents, knowledge cores).
- Request Body schema: application/json required
operation required
string
Enum: "list-collections" "update-collection" "delete-collection"
Request Body schema: application/json required
operation required
string
Enum: "list-collections" "update-collection" "delete-collection"
Collection operation:
+" class="sc-iKGpAq sc-cCYyou dXXcln cFvDiF">
Collection operation:
list-collections: List collections for user
update-collection: Create or update collection metadata
delete-collection: Delete collection
-
user string
Default: "trustgraph"
collection string
Collection identifier (for update, delete)
-
timestamp name string
Human-readable collection name (for update)
-
description string
Collection description (for update)
-
tags Array of strings
Collection tags for organization (for update)
-
tag-filter Array of strings
Filter collections by tags (for list)
-
limit integer
Default: 0
Maximum number of results (for list)
-
Responses 401 Unauthorized - Invalid or missing bearer token
-
post /api/v1/collection-management Local development server
-
http://localhost:8088 /api/v1/collection-management
Request samples Content type application/json
Example List all collections for user List collections filtered by tags Create/update collection Delete collection List all collections for user Response samples Content type application/json
Example List of collections Update successful Delete successful List of collections Copy
Expand all Collapse all
user string
Default: "trustgraph"
collection string
Collection identifier (for update, delete)
+
timestamp name string
Human-readable collection name (for update)
+
description string
Collection description (for update)
+
tags Array of strings
Collection tags for organization (for update)
+
tag-filter Array of strings
Filter collections by tags (for list)
+
limit integer
Default: 0
Maximum number of results (for list)
+
Responses 401 Unauthorized - Invalid or missing bearer token
+
post /api/v1/collection-management Local development server
+
http://localhost:8088 /api/v1/collection-management
Request samples Content type application/json
Example List all collections for user List collections filtered by tags Create/update collection Delete collection List all collections for user Response samples Content type application/json
Example List of collections Update successful Delete successful List of collections Copy
Expand all Collapse all
Services hosted within flow instances
-
Agent service - conversational AI with reasoning Agent service - conversational AI with reasoning AI agent that can understand questions, reason about them, and take actions.
+" class="sc-iKGpAq sc-cCYyou dXXcln dHaogz">
AI agent that can understand questions, reason about them, and take actions.
Agent Overview
The agent service provides a conversational AI that:
@@ -1104,29 +1108,29 @@ Each step has: thought, action, arguments, observation.</p>
Multi-turn Conversations
Include history array with previous steps to maintain context.
Each step has: thought, action, arguments, observation.
- Request Body schema: application/json required
question required
string
User question or prompt for the agent
-
state string
Agent state for continuation (optional, for multi-turn)
-
group Array of strings
Group identifiers for collaborative agents (optional)
-
history Array of objects
Conversation history (optional, list of previous agent steps)
-
user string
Default: "trustgraph"
User identifier for multi-tenancy
-
streaming boolean
Default: false
Enable streaming response delivery
-
Responses 401 Unauthorized - Invalid or missing bearer token
-
post /api/v1/flow/{flow}/service/agent Local development server
-
http://localhost:8088 /api/v1/flow/{flow}/service/agent
Request samples Content type application/json
Example Simple question Question with streaming enabled Multi-turn conversation Simple question Response samples Content type application/json
Example Streaming thought chunk Streaming answer chunk Streaming complete marker Legacy non-streaming response Streaming thought chunk
Document RAG - retrieve and generate from documents Request Body schema: application/json required
question required
string
User question or prompt for the agent
+
state string
Agent state for continuation (optional, for multi-turn)
+
group Array of strings
Group identifiers for collaborative agents (optional)
+
history Array of objects
Conversation history (optional, list of previous agent steps)
+
user string
Default: "trustgraph"
User identifier for multi-tenancy
+
streaming boolean
Default: false
Enable streaming response delivery
+
Responses 401 Unauthorized - Invalid or missing bearer token
+
post /api/v1/flow/{flow}/service/agent Local development server
+
http://localhost:8088 /api/v1/flow/{flow}/service/agent
Request samples Content type application/json
Example Simple question Question with streaming enabled Multi-turn conversation Simple question Response samples Content type application/json
Example Streaming thought chunk Streaming answer chunk Streaming complete marker Legacy non-streaming response Streaming thought chunk
Document RAG - retrieve and generate from documents Retrieval-Augmented Generation over document embeddings.
+" class="sc-iKGpAq sc-cCYyou dXXcln dHaogz">
Retrieval-Augmented Generation over document embeddings.
Document RAG Overview
Document RAG combines:
@@ -1192,27 +1196,27 @@ Each step has: thought, action, arguments, observation.
collection : Target specific document collection
user : Multi-tenant isolation
- Request Body schema: application/json required
query required
user string
Default: "trustgraph"
User identifier for multi-tenancy
-
collection string
Default: "default"
Collection to search within
-
doc-limit integer [ 1 .. 100 ]
Default: 20
Maximum number of documents to retrieve
-
streaming boolean
Default: false
Enable streaming response delivery
-
Responses 401 Unauthorized - Invalid or missing bearer token
-
post /api/v1/flow/{flow}/service/document-rag Local development server
-
http://localhost:8088 /api/v1/flow/{flow}/service/document-rag
Request samples Content type application/json
Example Basic document query Streaming query Query with limited retrieval Basic document query Response samples Content type application/json
Example Complete non-streaming response Streaming response chunk Streaming complete marker Complete non-streaming response
Graph RAG - retrieve and generate from knowledge graph Request Body schema: application/json required
query required
user string
Default: "trustgraph"
User identifier for multi-tenancy
+
collection string
Default: "default"
Collection to search within
+
doc-limit integer [ 1 .. 100 ]
Default: 20
Maximum number of documents to retrieve
+
streaming boolean
Default: false
Enable streaming response delivery
+
Responses 401 Unauthorized - Invalid or missing bearer token
+
post /api/v1/flow/{flow}/service/document-rag Local development server
+
http://localhost:8088 /api/v1/flow/{flow}/service/document-rag
Request samples Content type application/json
Example Basic document query Streaming query Query with limited retrieval Basic document query Response samples Content type application/json
Example Complete non-streaming response Streaming response chunk Streaming complete marker Complete non-streaming response
Graph RAG - retrieve and generate from knowledge graph Retrieval-Augmented Generation over knowledge graph.
+" class="sc-iKGpAq sc-cCYyou dXXcln dHaogz">
Retrieval-Augmented Generation over knowledge graph.
Graph RAG Overview
Graph RAG combines:
@@ -1302,33 +1306,33 @@ Each step has: thought, action, arguments, observation.
Multi-hop reasoning ("What's the path from A to B?")
Structural analysis ("What are the main entities related to X?")
- Request Body schema: application/json required
query required
user string
Default: "trustgraph"
User identifier for multi-tenancy
-
collection string
Default: "default"
Collection to search within
-
entity-limit integer [ 1 .. 200 ]
Default: 50
Maximum number of entities to retrieve
-
triple-limit integer [ 1 .. 100 ]
Default: 30
Maximum number of triples to retrieve per entity
-
max-subgraph-size integer [ 10 .. 5000 ]
Default: 1000
Maximum total subgraph size (triples)
-
max-path-length integer [ 1 .. 5 ]
Default: 2
Maximum path length for graph traversal
-
streaming boolean
Default: false
Enable streaming response delivery
-
Responses 401 Unauthorized - Invalid or missing bearer token
-
post /api/v1/flow/{flow}/service/graph-rag Local development server
-
http://localhost:8088 /api/v1/flow/{flow}/service/graph-rag
Request samples Content type application/json
Example Basic graph query Streaming query with custom limits Focused query with tight limits Basic graph query Response samples Content type application/json
Example Complete non-streaming response Streaming response chunk Streaming complete marker Complete non-streaming response { "response" : "Quantum physics and computer science intersect primarily through quantum computing.\nThe knowledge graph shows connections through:\n- Quantum algorithms (Shor's algorithm, Grover's algorithm)\n- Quantum information theory\n- Computational complexity theory\n" ,
"end-of-stream" : false
}
Text completion - direct LLM generation Request Body schema: application/json required
query required
user string
Default: "trustgraph"
User identifier for multi-tenancy
+
collection string
Default: "default"
Collection to search within
+
entity-limit integer [ 1 .. 200 ]
Default: 50
Maximum number of entities to retrieve
+
triple-limit integer [ 1 .. 100 ]
Default: 30
Maximum number of triples to retrieve per entity
+
max-subgraph-size integer [ 10 .. 5000 ]
Default: 1000
Maximum total subgraph size (triples)
+
max-path-length integer [ 1 .. 5 ]
Default: 2
Maximum path length for graph traversal
+
streaming boolean
Default: false
Enable streaming response delivery
+
Responses 401 Unauthorized - Invalid or missing bearer token
+
post /api/v1/flow/{flow}/service/graph-rag Local development server
+
http://localhost:8088 /api/v1/flow/{flow}/service/graph-rag
Request samples Content type application/json
Example Basic graph query Streaming query with custom limits Focused query with tight limits Basic graph query Response samples Content type application/json
Example Complete non-streaming response Streaming response chunk Streaming complete marker Complete non-streaming response { "response" : "Quantum physics and computer science intersect primarily through quantum computing.\nThe knowledge graph shows connections through:\n- Quantum algorithms (Shor's algorithm, Grover's algorithm)\n- Quantum information theory\n- Computational complexity theory\n" ,
"end-of-stream" : false
}
Text completion - direct LLM generation Direct text completion using LLM without retrieval augmentation.
+" class="sc-iKGpAq sc-cCYyou dXXcln dHaogz">
Direct text completion using LLM without retrieval augmentation.
Text Completion Overview
Pure LLM generation for:
@@ -1422,23 +1426,23 @@ Each step has: thought, action, arguments, observation.
Want to leverage knowledge graph relationships
Require citations or provenance
-
Request Body schema: application/json required
system required
string
System prompt that sets behavior and context for the LLM
-
prompt required
string
User prompt or question
-
streaming boolean
Default: false
Enable streaming response delivery
-
Responses 401 Unauthorized - Invalid or missing bearer token
-
post /api/v1/flow/{flow}/service/text-completion Local development server
-
http://localhost:8088 /api/v1/flow/{flow}/service/text-completion
Request samples Content type application/json
Example Basic text completion Code generation with streaming Structured output request Basic text completion { "system" : "You are a helpful assistant that provides concise answers." ,
"prompt" : "Explain the concept of recursion in programming."
} Response samples Content type application/json
Example Complete non-streaming response Streaming response chunk Streaming complete with tokens Complete non-streaming response { "response" : "Recursion is a programming technique where a function calls itself\nto solve a problem by breaking it down into smaller, similar subproblems.\nEach recursive call works on a simpler version until reaching a base case.\n" ,
"in-token" : 45 ,
"out-token" : 128 ,
"model" : "gpt-4" ,
"end-of-stream" : false
}
Prompt service - template-based generation Request Body schema: application/json required
system required
string
System prompt that sets behavior and context for the LLM
+
prompt required
string
User prompt or question
+
streaming boolean
Default: false
Enable streaming response delivery
+
Responses 401 Unauthorized - Invalid or missing bearer token
+
post /api/v1/flow/{flow}/service/text-completion Local development server
+
http://localhost:8088 /api/v1/flow/{flow}/service/text-completion
Request samples Content type application/json
Example Basic text completion Code generation with streaming Structured output request Basic text completion { "system" : "You are a helpful assistant that provides concise answers." ,
"prompt" : "Explain the concept of recursion in programming."
} Response samples Content type application/json
Example Complete non-streaming response Streaming response chunk Streaming complete with tokens Complete non-streaming response { "response" : "Recursion is a programming technique where a function calls itself\nto solve a problem by breaking it down into smaller, similar subproblems.\nEach recursive call works on a simpler version until reaching a base case.\n" ,
"in-token" : 45 ,
"out-token" : 128 ,
"model" : "gpt-4" ,
"end-of-stream" : false
}
Prompt service - template-based generation Execute stored prompt templates with variable substitution.
+" class="sc-iKGpAq sc-cCYyou dXXcln dHaogz">
Execute stored prompt templates with variable substitution.
Prompt Service Overview
The prompt service enables:
@@ -1556,25 +1560,25 @@ Each step has: thought, action, arguments, observation.
Data transformation
Any repeatable LLM task with consistent prompting
-
Request Body schema: application/json required
id required
string
Prompt template ID (stored in config)
-
terms object
Template variables as key-value pairs (values are JSON strings)
-
variables object
Alternative to terms - variables as native JSON values (auto-converted)
-
streaming boolean
Default: false
Enable streaming response delivery
-
Responses 401 Unauthorized - Invalid or missing bearer token
-
post /api/v1/flow/{flow}/service/prompt Local development server
-
http://localhost:8088 /api/v1/flow/{flow}/service/prompt
Request samples Content type application/json
Example Using terms (JSON strings) Using variables (auto-converted) Streaming response Using terms (JSON strings) Copy
Expand all Collapse all Response samples Content type application/json
Example Text output Structured output Streaming chunk Streaming complete Text output
Embeddings - text to vector conversion Request Body schema: application/json required
id required
string
Prompt template ID (stored in config)
+
terms object
Template variables as key-value pairs (values are JSON strings)
+
variables object
Alternative to terms - variables as native JSON values (auto-converted)
+
streaming boolean
Default: false
Enable streaming response delivery
+
Responses 401 Unauthorized - Invalid or missing bearer token
+
post /api/v1/flow/{flow}/service/prompt Local development server
+
http://localhost:8088 /api/v1/flow/{flow}/service/prompt
Request samples Content type application/json
Example Using terms (JSON strings) Using variables (auto-converted) Streaming response Using terms (JSON strings) Copy
Expand all Collapse all Response samples Content type application/json
Example Text output Structured output Streaming chunk Streaming complete Text output
Embeddings - text to vector conversion Convert text to embedding vectors for semantic similarity search.
+" class="sc-iKGpAq sc-cCYyou dXXcln dHaogz">
Convert text to embedding vectors for semantic similarity search.
Embeddings Overview
Embeddings transform text into dense vector representations that:
@@ -1630,19 +1634,19 @@ For bulk operations, use document-load or text-load services.</p>
Single Request
Unlike batch embedding APIs, this endpoint processes one text at a time.
For bulk operations, use document-load or text-load services.
- Request Body schema: application/json required
text required
string
Text to convert to embedding vector
-
Responses 401 Unauthorized - Invalid or missing bearer token
-
post /api/v1/flow/{flow}/service/embeddings Local development server
-
http://localhost:8088 /api/v1/flow/{flow}/service/embeddings
Request samples Content type application/json
Example Short text embedding Sentence embedding Paragraph embedding Short text embedding Response samples Content type application/json
Copy
Expand all Collapse all { "vectors" :
[ 0.023 ,
-0.142 ,
0.089 ,
0.234 ,
-0.067 ,
0.156 ,
0.201 ,
-0.178 ,
0.045 ,
0.312
] }