mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 00:16:23 +02:00
Flow class -> flow blueprint
This commit is contained in:
parent
15c3363a40
commit
c6c1fd051c
9 changed files with 38 additions and 38 deletions
|
|
@ -48,11 +48,11 @@ Most CLI commands support these common options:
|
|||
- [`tg-show-flows`](tg-show-flows.md) - List all configured flows
|
||||
- [`tg-show-flow-state`](tg-show-flow-state.md) - Show current flow states
|
||||
|
||||
**Flow Class Management:**
|
||||
- [`tg-put-flow-class`](tg-put-flow-class.md) - Upload/update flow class definition
|
||||
- [`tg-get-flow-class`](tg-get-flow-class.md) - Retrieve flow class definition
|
||||
- [`tg-delete-flow-class`](tg-delete-flow-class.md) - Remove flow class definition
|
||||
- [`tg-show-flow-classes`](tg-show-flow-classes.md) - List available flow classes
|
||||
**Flow Blueprint Management:**
|
||||
- [`tg-put-flow-blueprint`](tg-put-flow-blueprint.md) - Upload/update flow blueprint definition
|
||||
- [`tg-get-flow-blueprint`](tg-get-flow-blueprint.md) - Retrieve flow blueprint definition
|
||||
- [`tg-delete-flow-blueprint`](tg-delete-flow-blueprint.md) - Remove flow blueprint definition
|
||||
- [`tg-show-flow-blueprints`](tg-show-flow-blueprints.md) - List available flow blueprintes
|
||||
|
||||
### Knowledge Graph Management
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ Most CLI commands support these common options:
|
|||
### Basic Document Processing
|
||||
```bash
|
||||
# Start a flow
|
||||
tg-start-flow --flow-id my-flow --class-name document-processing
|
||||
tg-start-flow --flow-id my-flow --blueprint-name document-processing
|
||||
|
||||
# Load a document
|
||||
tg-load-text --flow-id my-flow --text "Your document content" --title "Test Document"
|
||||
|
|
@ -138,8 +138,8 @@ tg-show-graph --limit 100
|
|||
|
||||
### Flow Management
|
||||
```bash
|
||||
# Show available flow classes
|
||||
tg-show-flow-classes
|
||||
# Show available flow blueprintes
|
||||
tg-show-flow-blueprints
|
||||
|
||||
# Show running flows
|
||||
tg-show-flows
|
||||
|
|
|
|||
|
|
@ -435,7 +435,7 @@ tg-invoke-mcp-tool -n tool-name -P '{}'
|
|||
tg-show-flows | grep "flow-id"
|
||||
|
||||
# Verify flow supports MCP tools
|
||||
tg-get-flow-class -n "flow-class" | jq '.interfaces.mcp_tool'
|
||||
tg-get-flow-blueprint -n "flow-class" | jq '.interfaces.mcp_tool'
|
||||
```
|
||||
|
||||
### Connection Issues
|
||||
|
|
|
|||
|
|
@ -426,5 +426,5 @@ echo "variable=value" | grep "="
|
|||
tg-show-flows | grep "flow-id"
|
||||
|
||||
# Verify flow has prompt service
|
||||
tg-get-flow-class -n "flow-class" | jq '.interfaces.prompt'
|
||||
tg-get-flow-blueprint -n "flow-class" | jq '.interfaces.prompt'
|
||||
```
|
||||
|
|
@ -43,7 +43,7 @@ Version: 42
|
|||
{
|
||||
"flows": {
|
||||
"default": {
|
||||
"class-name": "document-rag+graph-rag",
|
||||
"blueprint-name": "document-rag+graph-rag",
|
||||
"description": "Default processing flow",
|
||||
"interfaces": {
|
||||
"agent": {
|
||||
|
|
@ -77,7 +77,7 @@ Version: 42
|
|||
|
||||
### Flow Definitions
|
||||
Flow configurations showing:
|
||||
- **class-name**: The flow class being used
|
||||
- **blueprint-name**: The flow blueprint being used
|
||||
- **description**: Human-readable flow description
|
||||
- **interfaces**: Pulsar queue names for each service
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ Exception: Unauthorized
|
|||
|
||||
## Related Commands
|
||||
|
||||
- [`tg-put-flow-class`](tg-put-flow-class.md) - Update flow class definitions
|
||||
- [`tg-put-flow-blueprint`](tg-put-flow-blueprint.md) - Update flow blueprint definitions
|
||||
- [`tg-show-flows`](tg-show-flows.md) - List active flows
|
||||
- [`tg-set-prompt`](tg-set-prompt.md) - Configure prompt templates
|
||||
- [`tg-set-token-costs`](tg-set-token-costs.md) - Configure token costs
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# tg-show-flow-state
|
||||
|
||||
Displays the processor states for a specific flow and its associated flow class.
|
||||
Displays the processor states for a specific flow and its associated flow blueprint.
|
||||
|
||||
## Synopsis
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ tg-show-flow-state [options]
|
|||
|
||||
## Description
|
||||
|
||||
The `tg-show-flow-state` command shows the current state of processors within a specific TrustGraph flow instance and its corresponding flow class. It queries the metrics system to determine which processing components are running and displays their status with visual indicators.
|
||||
The `tg-show-flow-state` command shows the current state of processors within a specific TrustGraph flow instance and its corresponding flow blueprint. It queries the metrics system to determine which processing components are running and displays their status with visual indicators.
|
||||
|
||||
This command is essential for monitoring flow health and debugging processing issues.
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ tg-show-flow-state \
|
|||
|
||||
## Output Format
|
||||
|
||||
The command displays processor states for both the flow instance and its flow class:
|
||||
The command displays processor states for both the flow instance and its flow blueprint:
|
||||
|
||||
```
|
||||
Flow production-flow
|
||||
|
|
@ -75,7 +75,7 @@ Class document-processing-v2
|
|||
|
||||
### Information Displayed
|
||||
- **Flow Section**: Shows the state of processors in the specific flow instance
|
||||
- **Class Section**: Shows the state of processors in the flow class template
|
||||
- **Class Section**: Shows the state of processors in the flow blueprint template
|
||||
- **Processor Names**: Individual processing components within the flow
|
||||
|
||||
## Use Cases
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ Exception: Unauthorized
|
|||
|
||||
- [`tg-start-flow`](tg-start-flow.md) - Start a new flow instance
|
||||
- [`tg-stop-flow`](tg-stop-flow.md) - Stop a running flow
|
||||
- [`tg-show-flow-classes`](tg-show-flow-classes.md) - List available flow classes
|
||||
- [`tg-show-flow-blueprints`](tg-show-flow-blueprints.md) - List available flow blueprintes
|
||||
- [`tg-show-flow-state`](tg-show-flow-state.md) - Show detailed flow status
|
||||
- [`tg-show-config`](tg-show-config.md) - Show complete system configuration
|
||||
|
||||
|
|
@ -186,7 +186,7 @@ tg-show-flows | grep "graph-rag request"
|
|||
|
||||
### Flow Information
|
||||
- **id**: Unique flow instance identifier
|
||||
- **class**: Flow class name used to create the instance
|
||||
- **class**: Flow blueprint name used to create the instance
|
||||
- **desc**: Human-readable flow description
|
||||
- **queue**: Service interfaces and their Pulsar queue names
|
||||
|
||||
|
|
@ -196,7 +196,7 @@ Queue names indicate:
|
|||
- **Tenant**: Usually `tg`
|
||||
- **Namespace**: `request`, `response`, or `flow`
|
||||
- **Service**: The specific service name
|
||||
- **Flow Identifier**: Either flow class or flow ID
|
||||
- **Flow Identifier**: Either flow blueprint or flow ID
|
||||
|
||||
## Best Practices
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# tg-start-flow
|
||||
|
||||
Starts a processing flow using a defined flow class.
|
||||
Starts a processing flow using a defined flow blueprint.
|
||||
|
||||
## Synopsis
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ tg-start-flow -n CLASS_NAME -i FLOW_ID -d DESCRIPTION [options]
|
|||
|
||||
## Description
|
||||
|
||||
The `tg-start-flow` command creates and starts a new processing flow instance based on a predefined flow class. Flow classes define the processing pipeline configuration, while flow instances are running implementations of those classes with specific identifiers.
|
||||
The `tg-start-flow` command creates and starts a new processing flow instance based on a predefined flow blueprint. Flow blueprintes define the processing pipeline configuration, while flow instances are running implementations of those classes with specific identifiers.
|
||||
|
||||
Once started, a flow provides endpoints for document processing, knowledge queries, and other TrustGraph services through its configured interfaces.
|
||||
|
||||
|
|
@ -18,7 +18,7 @@ Once started, a flow provides endpoints for document processing, knowledge queri
|
|||
|
||||
### Required Arguments
|
||||
|
||||
- `-n, --class-name CLASS_NAME`: Name of the flow class to instantiate
|
||||
- `-n, --blueprint-name CLASS_NAME`: Name of the flow blueprint to instantiate
|
||||
- `-i, --flow-id FLOW_ID`: Unique identifier for the new flow instance
|
||||
- `-d, --description DESCRIPTION`: Human-readable description of the flow
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ tg-start-flow \
|
|||
-d "Research document processing pipeline"
|
||||
```
|
||||
|
||||
### Start Custom Flow Class
|
||||
### Start Custom Flow Blueprint
|
||||
```bash
|
||||
tg-start-flow \
|
||||
-n "medical-analysis" \
|
||||
|
|
@ -55,15 +55,15 @@ tg-start-flow \
|
|||
|
||||
## Prerequisites
|
||||
|
||||
### Flow Class Must Exist
|
||||
Before starting a flow, the flow class must be available in the system:
|
||||
### Flow Blueprint Must Exist
|
||||
Before starting a flow, the flow blueprint must be available in the system:
|
||||
|
||||
```bash
|
||||
# Check available flow classes
|
||||
tg-show-flow-classes
|
||||
# Check available flow blueprintes
|
||||
tg-show-flow-blueprints
|
||||
|
||||
# Upload a flow class if needed
|
||||
tg-put-flow-class -n "my-class" -f flow-definition.json
|
||||
# Upload a flow blueprint if needed
|
||||
tg-put-flow-blueprint -n "my-class" -f flow-definition.json
|
||||
```
|
||||
|
||||
### System Requirements
|
||||
|
|
@ -73,7 +73,7 @@ tg-put-flow-class -n "my-class" -f flow-definition.json
|
|||
|
||||
## Flow Lifecycle
|
||||
|
||||
1. **Flow Class Definition**: Flow classes define processing pipelines
|
||||
1. **Flow Blueprint Definition**: Flow blueprintes define processing pipelines
|
||||
2. **Flow Instance Creation**: `tg-start-flow` creates a running instance
|
||||
3. **Service Availability**: Flow provides configured service endpoints
|
||||
4. **Processing**: Documents and queries can be processed through the flow
|
||||
|
|
@ -81,11 +81,11 @@ tg-put-flow-class -n "my-class" -f flow-definition.json
|
|||
|
||||
## Error Handling
|
||||
|
||||
### Flow Class Not Found
|
||||
### Flow Blueprint Not Found
|
||||
```bash
|
||||
Exception: Flow class 'invalid-class' not found
|
||||
Exception: Flow blueprint 'invalid-class' not found
|
||||
```
|
||||
**Solution**: Check available flow classes with `tg-show-flow-classes` and ensure the class name is correct.
|
||||
**Solution**: Check available flow blueprintes with `tg-show-flow-blueprints` and ensure the class name is correct.
|
||||
|
||||
### Flow ID Already Exists
|
||||
```bash
|
||||
|
|
@ -137,8 +137,8 @@ Once started, flows provide service interfaces based on their class definition.
|
|||
|
||||
- [`tg-stop-flow`](tg-stop-flow.md) - Stop a running flow
|
||||
- [`tg-show-flows`](tg-show-flows.md) - List active flows and their interfaces
|
||||
- [`tg-show-flow-classes`](tg-show-flow-classes.md) - List available flow classes
|
||||
- [`tg-put-flow-class`](tg-put-flow-class.md) - Upload/update flow class definitions
|
||||
- [`tg-show-flow-blueprints`](tg-show-flow-blueprints.md) - List available flow blueprintes
|
||||
- [`tg-put-flow-blueprint`](tg-put-flow-blueprint.md) - Upload/update flow blueprint definitions
|
||||
- [`tg-show-flow-state`](tg-show-flow-state.md) - Check flow status
|
||||
|
||||
## API Integration
|
||||
|
|
|
|||
|
|
@ -434,7 +434,7 @@ Exception: Processing ID already exists
|
|||
```bash
|
||||
Exception: Flow instance not found
|
||||
```
|
||||
**Solution**: Verify flow exists with `tg-show-flows` or `tg-show-flow-classes`.
|
||||
**Solution**: Verify flow exists with `tg-show-flows` or `tg-show-flow-blueprints`.
|
||||
|
||||
### Insufficient Resources
|
||||
```bash
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ done
|
|||
- [`tg-start-flow`](tg-start-flow.md) - Start a new flow instance
|
||||
- [`tg-show-flows`](tg-show-flows.md) - List active flows
|
||||
- [`tg-show-flow-state`](tg-show-flow-state.md) - Check detailed flow status
|
||||
- [`tg-show-flow-classes`](tg-show-flow-classes.md) - List available flow classes
|
||||
- [`tg-show-flow-blueprints`](tg-show-flow-blueprints.md) - List available flow blueprintes
|
||||
|
||||
## API Integration
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue