Overview
The Deploy Flow endpoint creates a new revision of your flow and deploys it, making it accessible for execution via the public API. Once deployed, your flow will be available athttps://{flow_name}.flows.graphorlm.com
.
Response Node Required: Your flow must have a configured Response Node for deployment to work properly. The deployment process validates that all required components, including the Response Node, are properly configured.
- Method:
POST
- URL:
https://{flow_name}.flows.graphorlm.com/deploy
- Authentication: Required (API Token)
Authentication
All requests must include a valid API token in the Authorization header:Learn how to generate API tokens in the API Tokens guide.
Request Format
Headers
Header | Value | Required |
---|---|---|
Authorization | Bearer YOUR_API_TOKEN | Yes |
Content-Type | application/json | Yes |
Request Body
The request body should be a JSON object with the following optional fields:Field | Type | Required | Description |
---|---|---|---|
tool_description | string | No | Custom description for the deployed flow that will be used in tool definitions |
Example Request
Minimal Request
For a basic deployment without custom tool description:Response Format
Success Response (200 OK)
Response Fields
Field | Type | Description |
---|---|---|
success | boolean | Whether the deployment was successful |
message | string | Human-readable message about the deployment |
revision_id | string | Unique identifier for the created revision |
status | string | Current status of the flow (should be “Deployed”) |
Code Examples
JavaScript/Node.js
Python
cURL
PHP
Deployment Process
The deployment process involves several steps:- Validation: Checks if the flow exists and is properly configured
- Revision Creation: Creates a new revision with updated node IDs
- Graph Update: Updates the flow graph with the new revision
- Component Deployment: Deploys all flow components (dataset, chunking, retrieval, Response Node, etc.)
- Traffic Routing: Routes 100% of traffic to the new revision
- Status Update: Updates the flow status to “Deployed”
Deployment can take several minutes depending on flow complexity and the number of components that need to be processed.
Deployment Requirements
Before deploying a flow, ensure:1. Flow Configuration
- ✅ Flow has been created and saved
- ✅ Response Node is configured and properly connected
- ✅ All required components are configured
- ✅ Dataset node has source documents selected
- ✅ Response Node model and prompt configuration is complete and valid
2. Source Documents
- ✅ Documents are uploaded to the project
- ✅ Documents are processed and in “Completed” status
- ✅ At least one document is selected in dataset nodes
3. Flow Components
- ✅ All nodes have valid configurations
- ✅ Node connections are properly established
- ✅ Required parameters are set for each component
4. API Access
- ✅ Valid API token with deployment permissions
- ✅ Flow name is unique and follows naming conventions
Error Responses
Common Error Codes
Status Code | Description | Common Causes |
---|---|---|
400 | Bad Request | Invalid flow configuration, missing required components |
401 | Unauthorized | Invalid or missing API token |
404 | Not Found | Flow doesn’t exist or insufficient permissions |
500 | Internal Server Error | Deployment process failed, infrastructure issues |
Error Response Format
Example Error Responses
Flow Not Found
Invalid Configuration
Deployment Failed
Missing Response Node
Insufficient Permissions
Tool Description Usage
Thetool_description
parameter is used when your deployed flow is accessed via MCP (Model Context Protocol) or when it’s used as a tool in other systems. It helps describe what your flow does and how it should be used.
Best Practices for Tool Descriptions
- Be Specific: Clearly describe what your flow does
- Include Use Cases: Mention what types of queries it handles best
- Mention Data Sources: Indicate what kind of documents or data it processes
Examples of Good Tool Descriptions
Integration Examples
Automated Deployment Pipeline
Batch Deployment for Multiple Flows
Best Practices
Pre-Deployment Checklist
- ✅ Ensure Response Node is configured and connected
- ✅ Test your flow configuration in the GraphorLM interface
- ✅ Verify all documents are processed and available
- ✅ Ensure dataset nodes have appropriate source selections
- ✅ Test component configurations individually
- ✅ Validate Response Node model, prompt, and API settings
Deployment Strategy
- Start Small: Deploy simple flows first to validate the process
- Monitor Performance: Watch deployment progress and check for errors
- Version Control: Keep track of revision IDs for rollback if needed
- Gradual Rollout: Test thoroughly before production deployment
Post-Deployment
- Verify Functionality: Test the deployed flow with sample queries
- Monitor Performance: Check response times and accuracy
- Update Documentation: Document the deployment and any custom configurations
- Set Up Monitoring: Implement logging and error tracking
Security Considerations
- API Token Management: Use environment variables for tokens
- Access Control: Ensure only authorized users can deploy flows
- Network Security: Use HTTPS for all deployment requests
- Audit Trail: Keep logs of all deployments for compliance
Troubleshooting
Flow Not Found Error
Flow Not Found Error
Solution: Verify that:
- The flow exists in your GraphorLM project
- The flow name in the URL exactly matches the flow name in the system
- Your API token has access to the correct project
- The flow has been saved properly in the flow builder
Invalid Configuration Error
Invalid Configuration Error
Solution: Check your flow configuration:
- Ensure you have a Response Node configured in your flow
- Ensure all required nodes are present
- Verify dataset nodes have source documents selected
- Check that all node parameters are properly configured
- Validate Response Node model and prompt configuration
- Ensure all node connections are properly established
Missing Response Node
Missing Response Node
Solution: For “No Response Node found” deployment errors:
- Add a Response Node to your flow
- Configure the Response Node with a valid model and prompt
- Connect the Response Node properly to receive input from other nodes
- The Response Node is required to generate responses for deployed flows
- Ensure the Response Node is not disconnected from the flow
Deployment Timeout
Deployment Timeout
Solution: For slow deployments:
- Complex flows may take several minutes to deploy
- Check if large datasets are being processed
- Try deploying during off-peak hours
- Contact support if deployment consistently times out
Source Document Issues
Source Document Issues
Solution: Verify your documents:
- All documents are uploaded and processed
- Documents have “Completed” status in the sources list
- At least one document is selected in dataset nodes
- Documents are accessible and not corrupted
Authentication Failures
Authentication Failures
Solution: Check your API authentication:
- Verify API token is valid and not expired
- Ensure token has deployment permissions
- Check that token belongs to the correct project
- Regenerate token if necessary
Internal Server Errors
Internal Server Errors
Solution: For deployment infrastructure issues:
- Check GraphorLM status page for service incidents
- Try deployment again after a few minutes
- Simplify flow configuration if possible
- Contact support with revision ID if error persists
Monitoring and Management
After successful deployment, you can:Check Deployment Status
- Monitor flow execution through the GraphorLM dashboard
- Use the Run Flow endpoint to test functionality
- Review logs and performance metrics
Update Deployments
- Modify your flow configuration in the GraphorLM interface
- Deploy again to create a new revision
- Previous revisions are automatically replaced
Rollback if Needed
- Contact support if you need to rollback to a previous revision
- Keep track of working revision IDs for reference