# What is Jinba? Source: https://carnot.mintlify.app/en/introduction Build, run, and deploy AI-powered workflows with natural language Jinba is a platform that enables you to build, run, and deploy reusable business workflows with AI—all in one seamless experience. Jinba Overview Jinba consists of three products:

Build with AI

**Design and build** workflows.

* Build tools via chat-based interface * Review and edit with flowcharts * Integrate with external services * Publish as APIs or batch processes

Use with AI

**Invoke and execute** workflows and services.

* Execute external services via chat * Call Jinba Flow workflows easily * Auto-generate input forms from data * AI-powered via MCP integration

Tools for AI Beta

**Manage and execute** AI agent tools.

* Centralized tool registry * Sandbox execution in containers * REST API, SDK, and MCP support * Semver versioning and publishing
*** ## Jinba Flow Jinba Flow Editor Jinba Flow lets you design and build workflows. Generate flows automatically through chat, then visually review and edit them with an intuitive flowchart interface. Workflows can be published as APIs or batch processes for easy reuse. Detailed features of Jinba Flow, workflow automation in 3 steps, and use cases *** ## Jinba App Jinba App is the product for invoking and executing your created workflows and external services. Execute via chat, with auto-generated input forms (UI) when needed, providing a safe execution experience even for non-engineers. Through MCP (Model Context Protocol), AI can access workflows built in Jinba Flow and external services to achieve user goals. Learn about Jinba App's screen layout, main features, and how to use MCP Its successor, **Jinba App Neo** Beta, is also available — an agent-centric AI platform built on Anthropic's Claude. Create an agent per use case, attach skills, connectors, and knowledge to it, and put it to work through chat. Agents, skills, connectors, knowledge, and memory in the next-generation Jinba App *** ## Jinba Toolbox Beta Jinba Toolbox is a centralized tool management and execution platform for AI agents. Register, version, and share tools across your organization, then execute them in isolated sandbox environments. Learn about Jinba Toolbox's centralized registry, sandbox execution, and AI integration # Execution Model Source: https://carnot.mintlify.app/en/pages/architecture/execution-model How workflows execute from trigger to completion Understanding the execution model helps you design reliable workflows and debug issues effectively. ## Build Time vs Run Time Workflows have two distinct phases: Design your workflow in the editor. Define steps, configure tools, and set up dependencies. The runner interprets and executes the manifest. Steps run in dependency order as data flows through. ## Execution Timeline When a workflow runs, it follows this timeline: Execution begins via API call, schedule, MCP, or manual run Input parameters validated, manifest loaded Steps run according to dependency graph Errors caught, retries attempted if configured Final result returned to caller ## Step Execution Patterns Steps with dependencies run one after another Independent steps run simultaneously Steps run only when `when` condition is true Steps repeat for each item via `forEach` ### Sequential Execution Steps with `needs` wait for their dependencies: ```yaml theme={null} steps: - id: step_a tool: TOOL_A - id: step_b tool: TOOL_B needs: [step_a] # Waits for step_a - id: step_c tool: TOOL_C needs: [step_b] # Waits for step_b ``` **Execution order:** `step_a` → `step_b` → `step_c` ### Parallel Execution Steps without shared dependencies run in parallel: ```yaml theme={null} steps: - id: input tool: INPUT_TEXT - id: branch_a tool: TOOL_A needs: [input] - id: branch_b tool: TOOL_B needs: [input] # Runs parallel with branch_a - id: merge tool: TOOL_C needs: [branch_a, branch_b] # Waits for both ``` **Execution order:** `input` → (`branch_a` ∥ `branch_b`) → `merge` ### Conditional Execution Use `when` for conditional logic: ```yaml theme={null} steps: - id: classify tool: GEMINI_CHAT input: - name: prompt value: "Classify as 'urgent' or 'normal': {{inputs.message}}" - id: urgent_handler tool: SLACK_POST_MESSAGE needs: [classify] when: "'{{steps.classify.result.content}}' == 'urgent'" input: - name: message value: "URGENT: {{inputs.message}}" - id: normal_handler tool: GMAIL_SEND needs: [classify] when: "'{{steps.classify.result.content}}' == 'normal'" input: - name: body value: "{{inputs.message}}" ``` Only one handler executes based on the classification result. ### Loop Execution (forEach) Process collections with `forEach`: ```yaml theme={null} steps: - id: get_items tool: INPUT_JSON input: - name: value value: '[{"name": "Alice"}, {"name": "Bob"}, {"name": "Carol"}]' - id: greet_each tool: GEMINI_CHAT forEach: "{{steps.get_items.result}}" needs: [get_items] input: - name: prompt value: "Write a greeting for {{item.name}}" ``` The step executes once for each item in the collection. ## Failure Modes | Failure Type | Cause | Handling | | - | - | - | | **Validation Error** | Invalid input parameters or manifest | Execution stops immediately | | **Tool Error** | External service failure or timeout | Step marked failed | | **Timeout Error** | Step exceeds configured time limit | Step terminated | | **Dependency Error** | Required step failed | Dependent steps skipped | | **Condition Error** | Invalid `when` expression | Step skipped with warning | ## Step Status States Each step transitions through these states: | Status | Description | | - | - | | **Pending** | Waiting for dependencies to complete | | **Running** | Currently executing | | **Success** | Completed successfully | | **Failed** | Execution failed with error | | **Skipped** | Condition not met or dependency failed | ## Variable Resolution Variables are resolved at execution time: | Pattern | Resolved To | | - | - | | `{{inputs.name}}` | Input parameter value | | `{{steps.step_id.result}}` | Full result of completed step | | `{{steps.step_id.result.field}}` | Specific field from step result | | `{{secrets.KEY_NAME}}` | Credential from workspace secrets | | `{{item}}` | Current item in forEach loop | | `{{item.field}}` | Field from current loop item | ## Error Handling Best Practices 1. **Validate Early**: Use INPUT\_\* tools to validate data at the start 2. **Check Outputs**: Add validation steps after critical operations 3. **Use Conditions**: Handle different outcomes with `when` clauses 4. **Design for Failure**: Consider what happens when external services fail 5. **Review History**: Use execution history to analyze failures ## Debugging Tips | Issue | Solution | | - | - | | Step not running | Check `needs` dependencies are satisfied | | Wrong data | Verify variable reference syntax | | Condition not working | Test `when` expression with actual values | | Loop not iterating | Ensure `forEach` target is an array | | Timeout | Increase step timeout or optimize logic | ## What's Next? Learn debugging techniques Complete manifest syntax reference # System Architecture Source: https://carnot.mintlify.app/en/pages/architecture/system-architecture How Jinba Flow components work together Jinba Flow consists of four main components that work together to enable workflow automation. ## Component Overview Visual interface for creating workflows using Chat, Graph, or YAML YAML representation of your workflow definition Execution engine that processes manifests and runs steps External interfaces for triggering and integrating workflows ## Data Flow ```mermaid theme={null} flowchart LR Editor["Editor
(Design)"] --> Manifest["Manifest
(YAML)"] Manifest --> Runner["Runner
(Execute)"] Runner --> API["API / MCP
(Deploy)"] API -.->|Feedback Loop| Editor ``` ## Component Details ### 1. Flow Editor (Design Time) The Flow Editor provides three methods to create workflows: | Method | Interface | Best For | | - | - | - | | **Chat Panel** | Natural language | Quick prototyping, non-technical users | | **Graph Editor** | Visual drag-and-drop | Understanding flow structure | | **YAML Panel** | Direct code editing | Precise control, version control | All three methods produce the same output: a **Manifest**. ### 2. Manifest (Bridge) The Manifest is a YAML document that defines your workflow: ```yaml theme={null} steps: - id: step_id tool: TOOL_NAME input: - name: param value: "{{reference}}" needs: [dependency_step] when: "condition" forEach: "{{collection}}" ``` | Field | Purpose | | - | - | | `id` | Unique identifier for the step | | `tool` | The tool to execute | | `input` | Parameters passed to the tool | | `needs` | Dependencies on other steps | | `when` | Conditional execution | | `forEach` | Loop over a collection | ### 3. Runner (Execution Time) The Runner interprets manifests and executes workflows: Load and validate the manifest YAML Build dependency graph from `needs` fields Run steps in topological order, parallelizing when possible Manage errors, retries, and conditional skips Collect results and return to caller **Key Capabilities:** * Parallel execution of independent steps * Variable resolution (`{{steps.*.result}}`) * Credential injection from workspace secrets * Timeout and retry management ### 4. API / MCP (Deployment) Published workflows expose two integration interfaces: | Interface | Endpoint | Use Case | | - | - | - | | **REST API** | `POST /api/v2/external/flows/{flowId}/published-run` | Programmatic integration | | **MCP Server** | Model Context Protocol | AI agent tools | **Authentication:** * API Key required for all external calls * Keys scoped to workspace * Rate limiting applied ## Execution Flow API call, schedule, MCP invocation, or manual run starts execution Runner loads the published manifest version Input parameters validated against defined schema Steps run according to dependency graph Results returned via API response or MCP result ## Security Boundaries | Boundary | Protection | | - | - | | **Editor → Manifest** | Schema validation prevents invalid YAML | | **API → Runner** | API key authentication required | | **Runner → Tools** | Credential isolation per workspace | | **Runner → External** | Secure sandbox execution environment | ## Workspace Isolation Each workspace maintains: * **Credentials**: API keys and OAuth tokens * **Flows**: Workflow definitions * **Versions**: Published snapshots * **Execution History**: Run logs and artifacts Workspaces are completely isolated from each other. ## What's Next? Deep dive into how steps execute Learn about API endpoints # API Source: https://carnot.mintlify.app/en/pages/basics/api Learn how to call your published workflows via API The triggers panel. Find the endpoint URL, secret key, and a ready-to-use cURL snippet API key management in workspace settings. Issue API keys for connecting Jinba App and using MCP tools ## Overview Jinba Flow provides REST API endpoints that allow you to execute published workflows programmatically. Once a workflow is published, you can call it from external systems, webhooks, or any application that can make HTTP requests. ## API Access ### Prerequisites To use the API, you need: 1. **Published Workflow**: The workflow must be published (see [Publish](/en/pages/basics/publish)) 2. **API Key**: An API key is automatically generated when you publish a workflow 3. **Authentication**: Use the API key in the Authorization header ### API Endpoints #### Run Published Workflow **Endpoint**: `POST /api/v2/external/flows/{flowId}/published-run` **Authentication**: Bearer token (API key) **Request Body**: ```json theme={null} { "args": [ { "name": "input1", "value": "example value" } ], "mode": "sync" // or "async" } ``` **Response**: Workflow execution result ## Authentication ### API Keys When you publish a workflow, an API key is automatically generated: * **Automatic Generation**: Created when you first publish * **Flow-Scoped**: Each workflow has its own API key * **Secure Storage**: Keys are stored securely in your workspace * **Viewing Keys**: Access keys from workflow settings ### Using API Keys Include your API key in the Authorization header: ```bash theme={null} Authorization: Bearer YOUR_API_KEY ``` **Security Best Practices**: * Never share API keys publicly * Store keys securely in environment variables * Rotate keys regularly if compromised * Use different keys for different environments ## Calling Workflows via API ### Synchronous Execution Synchronous execution waits for the workflow to complete before returning: ```bash theme={null} curl -X POST https://api.jinba.dev/api/v2/external/flows/{flow-id}/published-run \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "args": [ {"name": "input1", "value": "example"} ], "mode": "sync" }' ``` **Characteristics**: * **Blocking**: Request waits for completion * **Immediate Response**: Returns result when workflow finishes * **Timeout**: May timeout for long-running workflows * **Use Case**: When you need immediate results ### Asynchronous Execution Asynchronous execution returns immediately and runs the workflow in the background: ```bash theme={null} curl -X POST https://api.jinba.dev/api/v2/external/flows/{flow-id}/published-run \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "args": [ {"name": "input1", "value": "example"} ], "mode": "async" }' ``` **Characteristics**: * **Non-Blocking**: Returns immediately with run ID * **Background Execution**: Workflow runs asynchronously * **Status Check**: Use run ID to check status later * **Use Case**: For long-running workflows or fire-and-forget scenarios ## Input Arguments ### Argument Format Arguments are passed as an array of name-value pairs: ```json theme={null} { "args": [ { "name": "parameter_name", "value": "parameter_value" } ] } ``` ### Argument Types Arguments can be: * **Strings**: Text values * **Numbers**: Numeric values * **Booleans**: True/false values * **Objects**: Complex nested data structures * **Arrays**: Lists of values ### Example Arguments ```json theme={null} { "args": [ { "name": "email", "value": "user@example.com" }, { "name": "count", "value": 10 }, { "name": "options", "value": { "includeMetadata": true, "format": "json" } } ] } ``` ## Response Format ### Success Response ```json theme={null} { "status": "success", "result": { // Workflow output }, "stepOutputs": { "step_1": { "status": "success", "result": {} } } } ``` ### Error Response ```json theme={null} { "status": "failed", "error": { "name": "ErrorType", "value": "Error message", "traceback": "Stack trace" }, "stepOutputs": { "step_1": { "status": "failed", "error": { "name": "StepError", "value": "Step error message" } } } } ``` ## API Usage Examples ### Python Example ```python theme={null} import requests url = "https://api.jinba.dev/api/v2/external/flows/{flow-id}/published-run" headers = { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" } data = { "args": [ {"name": "input1", "value": "example"} ], "mode": "sync" } response = requests.post(url, headers=headers, json=data) result = response.json() print(result) ``` ### JavaScript/Node.js Example ```javascript theme={null} const fetch = require('node-fetch'); const url = 'https://api.jinba.dev/api/v2/external/flows/{flow-id}/published-run'; const headers = { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }; const body = { args: [ { name: 'input1', value: 'example' } ], mode: 'sync' }; fetch(url, { method: 'POST', headers: headers, body: JSON.stringify(body) }) .then(res => res.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error)); ``` ### Webhook Integration You can call workflows from webhooks: ```bash theme={null} # Example webhook payload curl -X POST https://api.jinba.dev/api/v2/external/flows/{flow-id}/published-run \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "args": [ {"name": "webhook_data", "value": "{\"event\": \"user_signup\", \"user_id\": 123}"} ] }' ``` ## Error Handling ### Common Errors #### 401 Unauthorized **Cause**: Invalid or missing API key **Solution**: Verify your API key is correct and included in the Authorization header #### 404 Not Found **Cause**: Workflow not found or not published **Solution**: * Verify the workflow ID is correct * Ensure the workflow is published * Check that the workflow is not archived #### 403 Forbidden **Cause**: API key doesn't have access to this workflow **Solution**: Verify the API key is scoped to the correct workflow or workspace #### 400 Bad Request **Cause**: Invalid request format or missing required arguments **Solution**: * Check request body format * Verify all required arguments are provided * Validate argument types match workflow expectations ### Retry Logic For production applications, implement retry logic: ```python theme={null} import time import requests def call_workflow_with_retry(url, headers, data, max_retries=3): for attempt in range(max_retries): try: response = requests.post(url, headers=headers, json=data, timeout=30) if response.status_code == 200: return response.json() elif response.status_code == 429: # Rate limit time.sleep(2 ** attempt) # Exponential backoff continue else: response.raise_for_status() except requests.exceptions.RequestException as e: if attempt == max_retries - 1: raise time.sleep(2 ** attempt) return None ``` ## Rate Limiting API requests may be subject to rate limiting: * **Rate Limits**: Limits may apply based on your subscription plan * **429 Status**: Returns 429 Too Many Requests when limit exceeded * **Retry-After**: Header indicates when to retry * **Best Practice**: Implement exponential backoff for retries ## API Key Management ### Viewing API Keys 1. Open your published workflow 2. Navigate to workflow settings 3. Go to **API** or **Publish Settings** section 4. View your API key ### Regenerating API Keys If your API key is compromised: 1. Go to workflow settings 2. Navigate to API section 3. Regenerate the API key 4. Update all applications using the old key **Important**: Regenerating a key invalidates the old key immediately. ## Best Practices 1. **Use Environment Variables**: Store API keys in environment variables, not in code 2. **Error Handling**: Implement proper error handling and retry logic 3. **Timeout Configuration**: Set appropriate timeouts for API calls 4. **Logging**: Log API calls for debugging and monitoring 5. **Security**: Never commit API keys to version control 6. **Async for Long Tasks**: Use async mode for long-running workflows 7. **Input Validation**: Validate inputs before sending to API ## Related Features * [Publish](/en/pages/basics/publish) - Learn about publishing workflows * [Scheduling](/en/pages/basics/scheduling) - Learn about scheduling workflows * [Workspace](/en/pages/basics/workspace) - Learn about workspace management # Archive Feature Source: https://carnot.mintlify.app/en/pages/basics/archive How to archive and restore flows # Archive Feature The archive feature allows you to hide flows that are no longer needed without deleting them permanently. Archived flows can be restored within 30 days, so you don't have to worry about accidental deletion. ## What is Archive Archive is a "soft delete" feature for flows. Instead of permanently deleting a flow, it temporarily hides it so you can restore it if needed later. ### Characteristics of Archived Flows * **Cannot edit**: Flows cannot be edited while archived * **Cannot run**: Flow execution is disabled while archived * **Can view**: Flow contents can still be viewed * **Restorable**: Can be restored to its original state within 30 days ### What Happens When You Archive * **Removed from MCP**: If registered as an MCP tool, it will be automatically removed * **Unpublished**: Published flows will be unpublished ### Permanent Deletion After 30 Days Archived flows are **permanently deleted after 30 days**. Please note that restoration is not possible after permanent deletion. ## Archiving a Flow 1. Find the flow you want to archive in the flow list 2. Click the menu (...) in the top right of the flow card 3. Select "Archive" 4. Click "Archive" in the confirmation dialog You can also archive multiple flows at once: 1. Select the checkboxes of the flows you want to archive 2. Click "Delete" from the bulk action menu that appears at the top 3. Click "Archive" in the confirmation dialog ## Viewing Archived Flows Archived flows are not displayed in the list by default. To view them: 1. Click the filter button on the flow list page 2. Check "Include archived" in the "Archived" section 3. Archived flows will appear in the list Archived flows are displayed with an "Archived" badge. ## Restoring a Flow To restore an archived flow: 1. Enable "Include archived" in the filter 2. Find the flow you want to restore 3. Select "Restore" from the flow card menu The restored flow becomes editable and executable again. However, MCP registration and published status removed during archiving are not automatically restored, so you'll need to reconfigure them if needed. ## Important Notes * Archiving unpublishes the flow and removes MCP registration * Scheduled executions are also stopped * **Permanently deleted after 30 days** - restore needed flows before the deadline * Restoration is not possible after permanent deletion # Method 1: Chat Panel Source: https://carnot.mintlify.app/en/pages/basics/chat Create flows using the Jinba Copilot through natural language conversation. If you need help creating or editing your flow, you can use the Jinba Copilot to help. It can help you make edits based on your conversation, and if tools require you to set up API keys or credentials from other services, it will also alert you. ## How It Works The Jinba Copilot uses natural language processing to understand your requirements and automatically generates the appropriate flow structure. Simply describe what you want to accomplish, and the copilot will: * Suggest appropriate tools and configurations * Create the necessary manifest structure * Help you set up API keys and credentials * Guide you through the process step by step ## Step-by-Step Process ### 1. Generate Your Workflow **Jinba Flow uses AI to generate workflows from scratch**. Simply: * Go to the chat input screen on the main page * Enter your requirements in natural language * The AI will automatically start generating your workflow The chat screen also includes several sample templates to help you get started. For example, you can try creating a Gmail draft workflow. Chat Interface - Generate Your Workflow ### 2. Review and Accept Changes When the workflow generation is complete, you'll see a screen asking you to accept the changes. Click **"Accept Changes"** to proceed. ### 3. Configure Details Once the workflow is generated, you can: * Click on each module to access detailed settings * Modify content, email addresses, or other parameters * Select your Google account (if you set up OAuth in step 1) ### 4. Execute Your Workflow After configuring the details: * Click the **"Execute"** button in the top right * The system will automatically process your workflow * Results will appear in the bottom right corner ### 5. View Results Once execution is complete, you can see the actual results. For example, if you created a Gmail draft, you'll find the email saved in your Gmail drafts folder. ## Getting Started 1. Open the chat interface in your Jinba Flow editor 2. Describe your workflow in natural language 3. Follow the copilot's suggestions and prompts 4. Review and refine the generated flow 5. Test and iterate as needed This method is perfect for beginners or when you want to quickly prototype ideas without diving into technical details. # CLI Source: https://carnot.mintlify.app/en/pages/basics/cli Install the Jinba CLI and operate Jinba Flow from your terminal ## Overview The Jinba CLI (`jinba`) is the official command-line interface for Jinba. It lets you call the Jinba Flow API from your terminal — list workspaces, create and update flows, upload files, and more — without writing HTTP requests by hand. ## Installation ### Requirements * Node.js 20 or later ### Install The CLI is published to npm as a public package. Install it globally: ```bash theme={null} npm install -g @jinba/cli ``` ### Verify the installation ```bash theme={null} jinba --version jinba --help ``` ### Update ```bash theme={null} npm install -g @jinba/cli@latest ``` When a newer version is available, the CLI also prints an update notice in interactive terminal sessions. Older versions may eventually stop being supported; in that case the API asks you to upgrade with the same command. ## Authentication Most API commands require a Jinba user API key. Run any API command and the CLI will prompt for the key if one has not been saved yet: ```bash theme={null} jinba flow api workspace list ``` Get your key from your [profile page](https://flow.jinba.io/profile). The key is stored locally at `~/.config/jinba/config.json`. To remove the saved key: ```bash theme={null} jinba logout ``` You can also configure the CLI via environment variables — useful in CI: | Variable | Purpose | | - | - | | `JINBAFLOW_API_KEY` | API key to use instead of the saved one | | `JINBAFLOW_API_BASE_URL` | Override the API base URL | | `JINBAFLOW_DISABLE_UPDATE_CHECK` | Disable the update notice | ## Usage Commands follow this pattern: ```bash theme={null} jinba flow api [options] ``` Examples: ```bash theme={null} jinba flow api workspace list jinba flow api flow create --workspace-id ws_123 --name "My Flow" --description "Example description" jinba flow api flow create --workspace-id ws_123 --stdin < payload.json jinba flow api workspace archive --workspace-id ws_123 --dry-run jinba flow api file upload --workspace-id ws_123 --file ./report.pdf ``` Every command includes help: ```bash theme={null} jinba flow api flow create --help ``` ## Notes * Path parameters can be passed as positional arguments or as flags such as `--workspace-id`. * `--stdin` reads a JSON object and merges it with explicit flags. * Mutating commands support `--dry-run` and automatically send an `Idempotency-Key`. * Destructive commands (archive, delete, revoke, etc.) prompt for confirmation by default; pass `--yes` or `--force` to skip it. * File upload commands accept a local file path (e.g. `--file ./report.pdf`); the CLI infers the content type from the extension. # Core Concepts Source: https://carnot.mintlify.app/en/pages/basics/core-concepts Essential terminology and concepts for understanding Jinba Flow Understanding these core concepts will help you build effective workflows in Jinba Flow. ## Key Terms | Term | Definition | Example | | - | - | - | | **Flow** | A workflow that connects multiple Steps with dependencies | Email received → AI summarizes → Slack notification. This refers to the entire sequence of processing. | | **Step** | An individual unit of processing that makes up a Flow | Each individual process like receiving email, AI summarization, Slack notification. | | **Tool** | A component that performs a specific action | AI models, API integrations, file processing | | **Secrets** | Securely stored sensitive values | API keys, OAuth tokens | | **Workspace** | A space to organize your Flows, Secrets, and team resources | Project workspace | The diagram below shows how these concepts relate to each other: * A single **Workspace** can be shared by multiple **Accounts**, and one Account can belong to several Workspaces. * Each Workspace contains one or more **Flows**, and every Flow is composed of ordered **Steps**. * Each Step implements its functionality through exactly one **Tool**. * **Secrets** live at the Workspace level, but the same Secret can be reused across multiple Flows and Steps inside that Workspace. * Secrets are how Steps reach **External Services** (APIs, OAuth integrations) without exposing credentials in flow definitions. Relationship between Flow, Step, and Tool ## What's Next? Learn about the three ways to create workflows Create workflows using natural language # Credit Costs Source: https://carnot.mintlify.app/en/pages/basics/credit-costs Understand the credit costs for different tools in Jinba Flow The usage page. Track Jinba Credit and Copilot Credit consumption by workflow, tool, and user ## Overview Jinba Flow uses two types of credits: **Jinba Credits** and **Copilot Credits**. Each credit type serves different purposes and has different reset periods. > Note: Credits and subscription tiers are managed at the **organization** level. > All members of an organization share the same subscription plan and pooled credits. ### At a Glance * Some tools consume **Jinba Credits** when you run them. * For tools that support it, you can **bring your own API key** to skip Jinba Credit consumption. * The **required credits** for Jinba-enabled tools are shown as a badge on the tool configuration page. ## Credit Types ### Jinba Credits **Jinba Credits** are used for executing tools in workflows. They allow you to use Jinba's API keys without needing your own credentials. Credits are pooled per organization. * **Reset Period**: Monthly (resets on subscription renewal or every 30 days for enterprise users) * **Usage**: Deducted when running workflow tools like AI models, search APIs, and data processing services * **Cost Variation**: Tools are priced in one of three ways — a flat cost per run, per-token metering, or a price computed from the media the run produces * **Custom API Key Bypass**: You can provide your own API keys to bypass credit charges for certain tools * **Subscription Limits**: * Free: 1,000 credits/month * Standard: 8,000 credits/month * Professional: 100,000 credits/month * Enterprise: Unlimited ### Copilot Credits **Copilot Credits** are used for AI assistance features and copilot functionality, such as generating step descriptions, summaries, and metadata. Credits are pooled per organization. * **Reset Period**: Daily (resets every day at midnight) * **Usage**: Deducted when using copilot features (1 credit per request) * **Cost**: 1 credit per copilot request * **Subscription Limits**: * Free: 100 credits/day * Standard: 300 credits/day * Professional: 500 credits/day * Enterprise: Unlimited ## Jinba Credit Cost Structure Tools are priced in one of three ways: **per token** for the LLM tools, **per unit of media produced** for image and video generation, and a **flat cost per run** for everything else. The credits a tool requires are shown as a badge on its configuration page. ### Per-Token Pricing (LLM Tools) These tools are billed from the tokens a run actually uses: * **OPENAI\_INVOKE** / **OPENAI\_INVOKE\_WITH\_FILE** * **ANTHROPIC\_INVOKE** / **ANTHROPIC\_INVOKE\_WITH\_FILE** * **GEMINI\_INVOKE** / **GEMINI\_INVOKE\_WITH\_FILE** / **GEMINI\_INVOKE\_WITH\_IMAGE** * **GROK\_CHAT** * **OPENAI\_DEEP\_RESEARCH** * **WORD\_TEMPLATE\_GENERATE** * **ANTHROPIC\_AGENT** * **BROWSER\_USE\_SANDBOX\_RUN\_TASK** **How it works:** 1. The cost is calculated from the model you select and the tokens the run reports — input, output, and, on models that support prompt caching, cached reads and cache writes at their own rates. 2. Before the step runs, a **reservation** is held against your balance, so a run cannot start unless you can cover it. When the step finishes, the reservation is replaced by the real cost, which is usually lower. 3. Each tool has a **fallback charge**. It is the least a step settles at when a run reports no token usage at all, or when the model it ran has no published rate. It is also a *lower* bound on the reservation in step 2 — several tools hold considerably more than their fallback before they start, so read the reservation table below, not this one, to know what balance a run needs. | Tool | Fallback charge | | - | - | | **GEMINI\_INVOKE** / **\_WITH\_FILE** / **\_WITH\_IMAGE** | 20 credits | | **ANTHROPIC\_INVOKE** / **\_WITH\_FILE** | 20 credits | | **OPENAI\_INVOKE** / **\_WITH\_FILE** | 20 credits | | **GROK\_CHAT** | 20 credits | | **OPENAI\_DEEP\_RESEARCH** | 60 credits | | **WORD\_TEMPLATE\_GENERATE** | 60 credits | | **BROWSER\_USE\_SANDBOX\_RUN\_TASK** | 160 credits | | **ANTHROPIC\_AGENT** | 300 credits | A run that does report tokens on a priced model settles at its actual token cost, with no floor applied — usually well below the fallback. A short `GEMINI_INVOKE` on `gemini-flash-latest` at roughly 1,500 input and 750 output tokens settles at **1 credit**, not 20. Long contexts, long answers and multi-step agent runs cost proportionally more, and can run well above the fallback. #### What a run holds before it starts Four tools can consume far more than their fallback, so they reserve a realistic — or worst-case — figure up front rather than the fallback. This is the balance the run needs to *start*; the reservation is released and replaced by the actual token cost when the step finishes, which is normally much lower. | Tool | Held to start | | - | - | | **OPENAI\_DEEP\_RESEARCH** | **1,280** on `o4-mini-deep-research` (the default), **6,400** on `o3-deep-research` | | **BROWSER\_USE\_SANDBOX\_RUN\_TASK** | Scales with `max_steps`: **160** at the 20-step default, up to **3,072** at the 100-step maximum | | **WORD\_TEMPLATE\_GENERATE** | **276** — sized from the tool's own 16,000-token output limit | | **GROK\_CHAT** | **96** on the default `grok-4.3`, **180** on `grok-4.5` | Every other tool in the table above reserves close to its fallback. A run that cannot cover its reservation fails to start with an insufficient-credits error, even when the work itself would have cost far less than the amount held. ### Media Generation Pricing These tools produce no tokens, so they are priced from what they generate. The cost is fully determined by the step's settings, which means you can work it out before you run it. **OPENAI\_SORA2** is billed per second of video, at a rate set by the model and the output resolution: | Model | Resolution | Per second | 4s | 8s | 12s | | - | - | - | - | - | - | | `sora-2` | 720x1280 / 1280x720 | 160 credits | 640 | 1,280 | 1,920 | | `sora-2-pro` | 720x1280 / 1280x720 | 480 credits | 1,920 | 3,840 | 5,760 | | `sora-2-pro` | 1024x1792 / 1792x1024 | 800 credits | 3,200 | 6,400 | 9,600 | **GEMINI\_GENERATE\_IMAGE** is billed per image generated: | Model | Per image | | - | - | | `gemini-3.1-flash-image` (default) | 108 credits | | `gemini-2.5-flash-image` (retires 2026-10-02) | 63 credits | | `gemini-3-pro-image` | 215 credits | A step keeps running on the model it names until Google shuts that model down, and is charged at that model's rate. Once the model is retired, the step runs on its successor and is charged the successor's rate instead — so `gemini-2.5-flash-image` is 63 credits today and 108 from 2026-10-02. New steps default to `gemini-3.1-flash-image`. If a cost-driving setting (a model, a duration, a resolution) is filled in by an expression such as `{{ steps.plan.output.model }}`, the reservation assumes the most expensive option it could resolve to, because the value is not known until the step runs. The final charge is the price of what actually ran. ### 1 Credit Per Use These tools consume **1 credit** each time they are executed: * **PYTHON\_SANDBOX\_RUN** - Execute Python code in a secure sandbox (always requires credits) ### 10 Credits Per Use These tools consume **10 credits** each time they are executed: * **EXAAI\_SEARCH** - AI-powered search using Exa (can use your own API key) * **PERPLEXITY\_SEARCH** - Search using Perplexity AI (can use your own API key) * **SERPAPI\_SEARCH** - Search using SerpAPI (can use your own API key) * **FIRECRAWL\_SCRAPE** - Scrape web content using Firecrawl (can use your own API key) * **ARXIV\_INVOKE\_AGENT** - Access research papers from arXiv (always requires credits) * **YOUTUBE\_GET\_TRANSCRIPT** - Extract transcripts from YouTube videos (always requires credits) ### 20 Credits Per Use These tools consume **20 credits** each time they are executed: * **LLAMA\_CLOUD\_PARSE** - Parse documents with LlamaCloud (can use your own API key) ### 100 Credits Per Use These tools consume **100 credits** each time they are executed: * **JINBA\_FLEX\_PARSER** - Flexible document parsing (can use your own API key) ## Copilot Credit Usage Copilot Credits are consumed when using AI assistance features: * **Step Description Generation**: 1 credit per request * **Flow Summary Generation**: 1 credit per request * **Metadata Generation**: 1 credit per request * **Cron Expression Parsing**: 1 credit per request * **Chat/Copilot Conversations**: 1 credit per request ## Bring Your Own API Key For tools that support it, you can provide your own API keys to avoid paying credits: When a tool supports "bring your own API key," you can configure your own credentials to bypass credit charges. Tools marked with "always requires credits" will consume credits regardless of configuration. ### How to Configure Your API Keys 1. Navigate to the **Credentials** section in your workspace settings 2. Select the appropriate service (e.g., Anthropic, OpenAI, Gemini) 3. Enter your API key 4. Save your configuration Once configured, the system will use your API key instead of consuming credits when you use those tools. ### Tools That Always Require Credits Some tools always require credits because they use Jinba's infrastructure or specialized services: * **ARXIV\_INVOKE\_AGENT** (10 credits) - Uses OpenAI API + E2B sandbox * **YOUTUBE\_GET\_TRANSCRIPT** (10 credits) - Uses Smartproxy residential proxy * **PYTHON\_SANDBOX\_RUN** (1 credit) - Uses E2B code interpreter sandbox These tools cannot use external API keys and will always deduct from your credit balance. # Debug Source: https://carnot.mintlify.app/en/pages/basics/debug Learn how to debug your workflows and troubleshoot issues The run dialog. Set input parameters and test-run the flow The run history panel. Check each run's status (completed/failed) and run ID ## Overview Jinba Flow provides several debugging features to help you identify and fix issues in your workflows. You can run individual steps, view execution history, inspect step outputs, and analyze errors to quickly resolve problems. ## Debugging Features ### Single Step Execution Test individual steps in isolation to verify they work correctly: * **Isolated Testing**: Run a single step without executing the entire workflow * **Previous Outputs**: Use outputs from previous workflow runs as input * **Quick Validation**: Verify step configuration and logic before full execution * **Error Isolation**: Identify which specific step is causing issues ### Flow Run History View and analyze past workflow executions: * **Execution Logs**: See detailed logs of all workflow runs * **Step Status**: Check which steps succeeded, failed, or were skipped * **Timing Information**: View execution time for each step * **Output Inspection**: Examine outputs from each step ### Error Messages Comprehensive error reporting helps identify issues: * **Step-Level Errors**: See exactly which step failed and why * **Error Details**: View error messages, stack traces, and context * **Validation Errors**: Get clear messages about configuration issues ## Running a Single Step ### Step 1: Open Your Workflow 1. Open your workflow in the Flow Editor 2. Navigate to the step you want to debug 3. Ensure the step is properly configured ### Step 2: Run Single Step 1. Click on the step you want to test 2. Look for the **Run Step** or **Test Step** option 3. If previous outputs are available, they will be used as input 4. Click to execute the step ### Step 3: Review Results 1. Check the step output in the step panel 2. Verify the output matches your expectations 3. If there are errors, review the error message 4. Make adjustments and test again **Note**: Single step execution uses outputs from your most recent workflow run. If no previous run exists, the step will run with empty or default inputs. ## Using Previous Outputs When debugging a step, you can use outputs from previous workflow executions: 1. **Automatic Detection**: The system automatically detects available previous outputs 2. **Output Selection**: Previous step outputs are used as inputs for the step being tested 3. **Manual Override**: You can manually specify inputs if needed This allows you to test steps in the context of actual workflow data without running the entire workflow. ## Viewing Flow Run History ### Accessing Run History 1. Open your workflow in the Flow Editor 2. Navigate to the **Runs** or **History** tab 3. View a list of all workflow executions ### Analyzing Run Results Each run shows: * **Status**: Success, failure, or in progress * **Execution Time**: How long the workflow took to complete * **Step Status**: Individual status for each step * **Outputs**: Final workflow output * **Errors**: Any errors that occurred during execution ### Inspecting Step Outputs 1. Click on a specific run in the history 2. Expand individual steps to see their outputs 3. Review input and output data for each step 4. Identify where issues occurred ## Understanding Error Messages ### Common Error Types #### Validation Errors These occur when step configuration is incorrect: * **Missing Required Fields**: Required inputs or configs are not provided * **Invalid Values**: Input values don't match expected types or formats * **Missing Dependencies**: Referenced steps or secrets don't exist **Example**: "Missing required input: 'api\_key'" #### Execution Errors These occur during step execution: * **API Errors**: External service returned an error * **Timeout Errors**: Step execution exceeded time limit * **Permission Errors**: Insufficient permissions for the operation **Example**: "API request failed: 401 Unauthorized" #### Dependency Errors These occur when step dependencies aren't met: * **Missing Previous Outputs**: Required previous step outputs are not available * **Circular Dependencies**: Steps have circular dependency chains * **Invalid References**: Referenced step IDs don't exist **Example**: "Step 'step\_2' depends on 'step\_1' which was not executed" ### Reading Error Messages Error messages typically include: 1. **Error Type**: What kind of error occurred 2. **Step ID**: Which step failed 3. **Error Message**: Human-readable description 4. **Stack Trace**: Technical details for debugging (if available) 5. **Context**: Additional information about the error ## Debugging Workflow ### Step-by-Step Debugging Process 1. **Identify the Problem**: Review error messages and failed steps 2. **Isolate the Issue**: Use single step execution to test individual steps 3. **Check Inputs**: Verify that step inputs are correct 4. **Review Configuration**: Ensure step configs (API keys, settings) are valid 5. **Test Fixes**: Make changes and test again with single step execution 6. **Run Full Workflow**: Once individual steps work, run the full workflow ### Common Debugging Scenarios #### Scenario 1: Step Fails Immediately **Problem**: A step fails as soon as it starts executing. **Debugging Steps**: 1. Check step configuration (API keys, settings) 2. Verify input values are correct 3. Test the step in isolation using single step execution 4. Review error message for specific issues #### Scenario 2: Step Produces Unexpected Output **Problem**: Step executes successfully but output is incorrect. **Debugging Steps**: 1. Review step inputs to ensure they're correct 2. Check step logic and tool configuration 3. Test with different input values 4. Compare with expected output format #### Scenario 3: Workflow Fails Mid-Execution **Problem**: Workflow starts successfully but fails partway through. **Debugging Steps**: 1. Identify which step failed from run history 2. Check if previous steps produced correct outputs 3. Verify step dependencies are correct 4. Test the failing step in isolation #### Scenario 4: Conditional Logic Issues **Problem**: Steps with `when` conditions aren't executing as expected. **Debugging Steps**: 1. Verify condition expressions are correct 2. Check that referenced step outputs exist 3. Test condition evaluation with actual data 4. Review step execution order ## Best Practices 1. **Test Incrementally**: Build and test workflows step by step 2. **Use Single Step Execution**: Test individual steps before running full workflow 3. **Review Run History**: Regularly check execution history for patterns 4. **Validate Inputs**: Ensure inputs are correct before execution 5. **Check Error Messages**: Read error messages carefully for specific guidance 6. **Test with Real Data**: Use actual data when possible for more accurate testing 7. **Document Expected Behavior**: Note expected outputs for easier debugging ## Troubleshooting Tips ### Step Not Executing * **Check Dependencies**: Ensure all required previous steps completed successfully * **Verify Conditions**: If step has `when` condition, ensure condition is met * **Review Execution Order**: Check that steps are ordered correctly ### Unexpected Outputs * **Inspect Inputs**: Verify inputs to the step are what you expect * **Check Tool Configuration**: Ensure tool settings are correct * **Review Tool Documentation**: Confirm you're using the tool correctly ### Performance Issues * **Check Execution Time**: Review step execution times in run history * **Identify Slow Steps**: Find steps that take longest to execute * **Optimize Configuration**: Adjust settings to improve performance ### API Errors * **Verify Credentials**: Check that API keys and credentials are valid * **Review Rate Limits**: Ensure you're not exceeding API rate limits * **Check Service Status**: Verify external services are operational ## Related Features * [Publish](/en/pages/basics/publish) - Learn about publishing workflows * [Workspace](/en/pages/basics/workspace) - Learn about workspace management * [Credit Costs](/en/pages/basics/credit-costs) - Understand workflow execution costs # Method 2: Graph Editor (Drag & Drop) Source: https://carnot.mintlify.app/en/pages/basics/drag_and_drop Create flows using the visual drag-and-drop graph editor with pre-built modules. Click on the + icon in the graph view of the editor in order to see a full list of our available tools. By clicking on the created node, you can see the inputs and configuration needed for it and create basic flows in the side panel. The tool palette. Click "+" to browse tools by function or by service and add them to the canvas ## How It Works The Graph Editor uses a visual drag-and-drop interface where you can: * Browse available tools and modules * Drag them onto the canvas * Connect them using the connection points * Configure each module through the side panel * Visualize the flow structure in real-time ## Key Features You can use the top and bottom dots to connect tools to each other to form dependencies, and you can click on the three dots to the right of the tool name to delete it. ## Advanced Options You may want to learn to use the manifest editor view in order to make more advanced flows, but advanced options are also available in the `Advanced Options` tab of the side panel. This method is ideal for those who prefer to work with existing tools rather than writing code from scratch. # History and Versions Source: https://carnot.mintlify.app/en/pages/basics/history-versions Learn about workflow version history and execution history The versions panel. Review the history of published versions ## Overview Jinba Flow automatically tracks versions of your workflows and maintains a complete execution history. This allows you to view past changes, restore previous versions, and analyze workflow execution patterns. ## Workflow Versions ### What are Versions? Every time you make significant changes to a workflow, Jinba Flow creates a new version: * **Automatic Versioning**: Versions are created automatically when you publish, restore, or accept copilot changes * **Version History**: All versions are preserved, allowing you to see the evolution of your workflow * **Version Labels**: Versions are labeled to indicate their purpose (PUBLISH, RESTORE, COPILOT\_CHANGE\_ACCEPTION) ### Version Types #### Published Version The version that is currently published and accessible via API or MCP: * **Stable Reference**: This version remains unchanged even if you edit the workflow * **API Access**: External systems use this version * **MCP Tools**: AI assistants use this version when invoking the workflow #### Current/Editable Version The version you're currently editing: * **Active Development**: This is your working version * **Unpublished Changes**: May have changes not yet published * **Preview Mode**: You can preview other versions while keeping this as your working version #### Previous Versions All other versions in the workflow's history: * **Historical Record**: Complete history of all workflow changes * **Restoration**: Can be restored to become the current editable version * **Comparison**: Can be compared with current version ## Viewing Version History ### Accessing Versions 1. Open your workflow in the Flow Editor 2. Navigate to the **Versions** panel (usually in the right sidebar) 3. View the list of all workflow versions ### Version Information Each version shows: * **Creation Date**: When the version was created * **Label**: Version type (PUBLISH, RESTORE, COPILOT\_CHANGE\_ACCEPTION) * **Status**: Whether it's published, current, or previous * **Steps**: The workflow steps at that point in time ### Previewing Versions You can preview any version without making it your current version: 1. Click on a version in the versions list 2. The workflow editor shows that version's steps 3. You can see how the workflow looked at that point 4. Click the current version again to exit preview mode **Note**: Previewing a version doesn't change your current editable version. You can preview and compare without affecting your work. ## Restoring Versions ### When to Restore You might want to restore a previous version if: * **Recent Changes Caused Issues**: Recent edits broke the workflow * **Revert to Stable Version**: Go back to a known working version * **Undo Accidental Changes**: Recover from unintended modifications ### How to Restore 1. Open the **Versions** panel 2. Find the version you want to restore 3. Click the **Restore** button (or similar action) 4. Confirm the restoration 5. The selected version becomes your current editable version **Important Notes**: * Restoring creates a new version with label "RESTORE" * Your current editable version is preserved in history * The restored version becomes your working version * You can restore again if needed ## Version Labels Versions are automatically labeled based on how they were created: ### PUBLISH Created when you publish a workflow: * **Purpose**: Marks the version that was published * **Stability**: This version remains stable for API/MCP access * **Updates**: New publishes create new PUBLISH versions ### RESTORE Created when you restore a previous version: * **Purpose**: Marks a version that was restored from history * **Recovery**: Indicates you went back to a previous state * **History**: Preserves the restoration action in history ### COPILOT\_CHANGE\_ACCEPTION Created when you accept changes suggested by the Copilot: * **Purpose**: Marks versions created through AI assistance * **Collaboration**: Tracks AI-assisted workflow improvements * **Learning**: Helps identify patterns in AI suggestions ## Execution History ### What is Execution History? Execution history tracks all workflow runs: * **Complete Record**: Every workflow execution is recorded * **Version Tracking**: Each run is linked to the version that was executed * **Performance Data**: Execution times and results are tracked * **Error Logging**: Failed executions include error details ### Viewing Execution History 1. Navigate to your workflow 2. Open the **Runs** or **History** tab 3. View a chronological list of all executions ### Execution Information Each execution shows: * **Execution Date**: When the workflow was run * **Status**: Success, failure, or in progress * **Version**: Which workflow version was executed * **Execution Time**: How long the workflow took * **Inputs**: Arguments passed to the workflow * **Outputs**: Results from the execution * **Errors**: Any errors that occurred (if failed) ### Filtering Execution History You can filter execution history by: * **Status**: Show only successful, failed, or running executions * **Date Range**: Filter by when executions occurred * **Version**: View executions of a specific version * **Source**: Filter by how the workflow was triggered (manual, API, scheduled, etc.) ### Execution History Retention By default, execution history is kept with no time limit. An organization owner or admin can set a retention period in Jinba Auth, under **Organization → Run history retention**: keep forever (the default), 7, 30 or 90 days, or a custom number of days. Once an execution is older than the retention period: * **Deleted**: The inputs and outputs of every step, including large outputs kept in file storage. Deletion is permanent. * **Not deleted**: * The record of the execution itself — when it ran, who ran it, which workflow, whether it succeeded or failed, and how many credits it used. * Files that a workflow read, or saved to the workspace's files. Things to know before setting a period: * The setting applies to every workspace in the organization. * Deletion runs once a day, so data is removed within about a day of passing the retention period. * Shortening the period also deletes the data of existing executions that are already older than the new period. This cannot be undone. * Executions that are still running, including ones waiting for an approval, are not affected until they finish. * When you re-run a workflow from a step, outputs of an execution whose data was deleted cannot be reused, so the earlier steps run again. * If an execution re-used the outputs of an older one (re-run from a step), the older execution's data is kept until every execution re-using it has passed the retention period. There is no upper limit: as long as the workflow keeps being re-run from a step, large outputs of the execution that first produced them can be kept indefinitely. To bound how long data is kept, run the workflow from the start from time to time. ## Using History for Debugging ### Version Comparison Compare different versions to understand changes: 1. Preview a previous version 2. Compare with your current version 3. Identify what changed between versions 4. Understand the impact of modifications ### Execution Analysis Use execution history to: * **Identify Patterns**: Find recurring issues or successes * **Performance Tracking**: See which versions performed better * **Error Analysis**: Review failed executions to identify problems * **Usage Patterns**: Understand how the workflow is being used ### Debugging Workflow 1. **Find Problematic Version**: Identify when issues started 2. **Compare Versions**: See what changed between working and broken versions 3. **Review Executions**: Check execution history for that version 4. **Restore if Needed**: Restore a working version if current version has issues ## Best Practices 1. **Regular Publishing**: Publish stable versions regularly to create checkpoints 2. **Meaningful Changes**: Make significant changes before creating new versions 3. **Version Review**: Periodically review version history to understand evolution 4. **Execution Monitoring**: Regularly check execution history for issues 5. **Restore Strategically**: Use restoration when needed, but understand it creates new versions 6. **Document Changes**: Use workflow descriptions or notepads to document major changes ## Version Management ### Version Lifecycle 1. **Creation**: Version created automatically on significant actions 2. **Development**: Current editable version is where you work 3. **Publishing**: Publishing creates a stable PUBLISH version 4. **History**: All versions are preserved in history 5. **Restoration**: Previous versions can be restored ### Version Limits * **Storage**: All versions are stored indefinitely * **Access**: You can access any version in history * **Performance**: Large version histories may take longer to load ## Related Features * [Publish](/en/pages/basics/publish) - Learn about publishing workflows * [Debug](/en/pages/basics/debug) - Learn about debugging workflows * [Archive Feature](/en/pages/basics/archive) - Learn about archiving workflows # Knowledge Source: https://carnot.mintlify.app/en/pages/basics/knowledge Learn about knowledge bases, vector search, and how to build RAG systems The knowledge base list. Create and manage vector databases for semantic search ## Overview Jinba Flow's Knowledge feature provides powerful vector database capabilities for building RAG (Retrieval-Augmented Generation) systems. You can create knowledge bases, upload documents, perform semantic search, and integrate AI-powered question-answering into your workflows. ## What are Knowledge Bases? Knowledge Bases are vector databases that store documents with automatic chunking and vectorization. They enable semantic search capabilities, allowing you to find information based on meaning rather than exact text matches. ### Key Features * **Document Storage**: Upload PDFs, DOCX, text files, and other formats * **Automatic Processing**: Documents are automatically chunked and vectorized * **Semantic Search**: Find relevant information using natural language queries * **RAG Support**: Perfect for building AI-powered question-answering systems * **Vector Embeddings**: Uses OpenAI's text-embedding-3-large for high-quality embeddings ## Creating a Knowledge Base 1. Navigate to **Storage** in the workspace sidebar 2. Click on the **Knowledge Bases** tab 3. Click **Create Knowledge Base** 4. Enter a name and description for your knowledge base 5. The knowledge base is created and ready for file uploads ## Adding Files to Knowledge Base ### Using the UI 1. Open your knowledge base from the Storage page 2. Click **Upload File** or **Add File** 3. Select files from your computer or provide a URL 4. Files are automatically processed: * **Parsing**: Extract text content from documents * **Chunking**: Split documents into manageable chunks (configurable) * **Embedding**: Convert chunks to vector embeddings * **Indexing**: Store vectors for fast similarity search ### Using Workflows You can also add files to knowledge bases programmatically using the `JINBA_KNOWLEDGE_BASE_FILE_ADD` tool: ```yaml theme={null} - id: add_file_to_kb name: add_file_to_kb tool: JINBA_KNOWLEDGE_BASE_FILE_ADD config: - name: token value: "{{secrets.JINBA_API_TOKEN}}" input: - name: knowledgeBaseId value: "{{secrets.KNOWLEDGE_BASE_ID}}" - name: file value: "https://example.com/document.pdf" - name: filename value: "document.pdf" - name: executionMode value: "SYNCHRONOUS" - name: chunkerSettings value: chunkSize: 512 chunkOverlap: 128 chunkingIdentifier: "\\n\\n" ``` **File Processing Status**: * **pending**: File uploaded, waiting for processing * **processing**: File is being chunked and vectorized * **completed**: File is ready for search * **failed**: Processing encountered an error ## Vector Search Vector search enables semantic search across your knowledge base using natural language queries. ### How It Works 1. **Query Vectorization**: Your search query is converted to a vector using OpenAI's text-embedding-3-large 2. **Similarity Search**: The system finds chunks with similar vectors 3. **Ranking**: Results are ranked by similarity score 4. **Filtering**: Results below the threshold are filtered out ### Using Vector Search ```yaml theme={null} - id: search_kb name: search_kb tool: JINBA_VECTOR_SEARCH config: - name: token value: "{{secrets.JINBA_API_TOKEN}}" input: - name: query value: "How do I configure authentication?" - name: knowledgeBaseId value: "{{secrets.KNOWLEDGE_BASE_ID}}" - name: topK value: 5 - name: threshold value: 0.3 ``` **Parameters**: | Parameter | Type | Required | Default | Description | | - | - | - | - | - | | `query` | string | Yes | - | Natural language search query | | `knowledgeBaseId` | string | Yes | - | ID of the knowledge base to search | | `topK` | number | No | 3 | Number of results to return (1-50) | | `threshold` | number | No | 0.3 | Similarity threshold (0-1) | ## Building RAG (Retrieval-Augmented Generation) Systems RAG combines retrieval of relevant information from knowledge bases with AI generation to create accurate, context-aware responses. ### What is RAG? RAG (Retrieval-Augmented Generation) is a technique that: 1. **Retrieves** relevant information from a knowledge base using semantic search 2. **Augments** the AI prompt with retrieved context 3. **Generates** responses based on both the query and retrieved context This approach allows AI models to answer questions using your own documents and data, rather than relying solely on their training data. ### Step-by-Step: Building a RAG System #### Step 1: Create a Knowledge Base 1. Go to **Storage** → **Knowledge Bases** 2. Create a new knowledge base (e.g., "Company Documentation") 3. Note the knowledge base ID for later use #### Step 2: Upload Documents 1. Open your knowledge base 2. Upload relevant documents (PDFs, DOCX, text files) 3. Wait for processing to complete (files show "completed" status) #### Step 3: Build the RAG Workflow Create a workflow that combines vector search with AI generation: ```yaml theme={null} - id: user_question name: user_question tool: INPUT_TEXT input: - name: description value: "Enter your question" - id: search_knowledge_base name: search_knowledge_base tool: JINBA_VECTOR_SEARCH config: - name: token value: "{{secrets.JINBA_API_TOKEN}}" input: - name: query value: "{{steps.user_question.result}}" - name: knowledgeBaseId value: "{{secrets.KNOWLEDGE_BASE_ID}}" - name: topK value: 5 - name: threshold value: 0.3 - id: generate_answer name: generate_answer tool: ANTHROPIC_INVOKE config: - name: version value: claude-3-5-sonnet-20241022 input: - name: prompt value: | Based on the following information from our knowledge base, answer the user's question. Question: {{steps.user_question.result}} Relevant Information: {{#each steps.search_knowledge_base.result.results}} **Source: {{file.filename}}** (Relevance: {{score}}) {{chunk.content}} --- {{/each}} Please provide a comprehensive and accurate answer based on the information above. If the information doesn't contain enough details to answer the question, say so. ``` #### Step 4: Configure Secrets 1. Go to **Credentials** in your workspace 2. Add your **Jinba API Token** as a secret 3. Store your **Knowledge Base ID** as a secret (or use it directly in the workflow) ### Advanced RAG Patterns #### Multi-Step RAG with Refinement ```yaml theme={null} - id: initial_search name: initial_search tool: JINBA_VECTOR_SEARCH config: - name: token value: "{{secrets.JINBA_API_TOKEN}}" input: - name: query value: "{{steps.user_question.result}}" - name: knowledgeBaseId value: "{{secrets.KNOWLEDGE_BASE_ID}}" - name: topK value: 10 - id: refine_query name: refine_query tool: ANTHROPIC_INVOKE config: - name: version value: claude-3-5-sonnet-20241022 input: - name: prompt value: | Based on the initial search results, generate a more specific search query. Original Query: {{steps.user_question.result}} Initial Results: {{#each steps.initial_search.result.results}} - {{file.filename}}: {{chunk.content}} {{/each}} Generate a refined search query that will find more specific information. - id: refined_search name: refined_search tool: JINBA_VECTOR_SEARCH config: - name: token value: "{{secrets.JINBA_API_TOKEN}}" input: - name: query value: "{{steps.refine_query.result.text}}" - name: knowledgeBaseId value: "{{secrets.KNOWLEDGE_BASE_ID}}" - name: topK value: 5 - name: threshold value: 0.4 - id: final_answer name: final_answer tool: ANTHROPIC_INVOKE config: - name: version value: claude-3-5-sonnet-20241022 input: - name: prompt value: | Answer the user's question using the refined search results. Question: {{steps.user_question.result}} Refined Search Results: {{#each steps.refined_search.result.results}} **{{file.filename}}** (Score: {{score}}) {{chunk.content}} {{/each}} Provide a detailed, accurate answer. ``` ## Managing Knowledge Base Files ### Updating Files You can update existing files in a knowledge base using the `JINBA_KNOWLEDGE_BASE_UPDATE` tool: ```yaml theme={null} - id: update_kb_file name: update_kb_file tool: JINBA_KNOWLEDGE_BASE_UPDATE config: - name: token value: "{{secrets.JINBA_API_TOKEN}}" input: - name: knowledgeBaseId value: "{{secrets.KNOWLEDGE_BASE_ID}}" - name: knowledgeBaseFileId value: "{{secrets.FILE_ID}}" - name: fileUrl value: "https://example.com/updated-document.pdf" - name: updateType value: "FULL_REFRESH" - name: executionMode value: "SYNCHRONOUS" ``` **Update Types**: * **FULL\_REFRESH**: Replaces the entire file with new content * Other update modes may be available depending on your configuration ## Chunking Configuration When adding files to knowledge bases, you can configure how documents are chunked: * **chunkSize**: Size of each chunk in tokens (default: 512, max: 8192) * **chunkOverlap**: Overlap between chunks in tokens (default: 128, max: 2048) * **chunkingIdentifier**: String used to identify chunk boundaries (default: "\n\n") **Best Practices**: * **Smaller chunks (256-512)**: Better for precise information retrieval * **Larger chunks (1024-2048)**: Better for maintaining context * **Overlap**: Helps maintain context across chunk boundaries ## RAG Best Practices 1. **Quality Knowledge Base**: Upload high-quality, relevant documents 2. **Appropriate Chunking**: Use appropriate chunk sizes (typically 512-1024 tokens) 3. **Threshold Tuning**: Adjust similarity thresholds based on your use case 4. **TopK Selection**: Retrieve enough context (typically 3-10 chunks) for comprehensive answers 5. **Prompt Engineering**: Craft prompts that clearly instruct the AI to use retrieved context 6. **Source Attribution**: Always cite sources for transparency and verification 7. **Error Handling**: Handle cases where no relevant information is found ## Use Cases for RAG * **Customer Support**: Answer questions using product documentation * **Internal Knowledge**: Access company policies and procedures * **Research Assistant**: Search through research papers and documents * **Legal Document Q\&A**: Answer questions about contracts and legal documents * **Technical Documentation**: Help developers find information in technical docs * **Product Information**: Answer questions about product specifications ## Related Features * [Workspace](/en/pages/basics/workspace) - Learn about workspace management and file storage * [Vector Search Tool](/en/pages/tools/jinba/vector_search) - Detailed vector search documentation * [Knowledge Base Tool](/en/pages/tools/jinba/knowledge_base) - Knowledge base management tools # Method 3: YAML Coding Panel Source: https://carnot.mintlify.app/en/pages/basics/manifest Write manifests directly in YAML format for complete control over your flows. A manifest in your site defines the execution flow of tools and scripts, specifying dependencies and data transformations. This document outlines how to structure and write a manifest following the format used in your system. The code panel. Edit the entire flow directly as a YAML manifest ## How It Works Direct coding creation gives you complete control over your flows by writing YAML manifests directly. This method offers: * Full control over every aspect of your flow * Ability to create complex workflows * Integration with custom tools and APIs * Precise control over execution order and conditions * Advanced features like conditional execution and loops ## Writing Your Own Manifest To create a manifest: 1. **Define an `id` and `name`** for each step. 2. **Choose the appropriate `tool`**, such as `INPUT_JSON` or `PYTHON_SANDBOX`. 3. **Specify input values** under `input`. 4. **List dependencies** using `needs` to ensure correct execution order. By following this structure, you can build a clear, modular workflow for processing data efficiently. ## Step Components Each step in a Jinba Flow manifest is composed of several key components that define its behavior and relationship with other steps. Here's a detailed breakdown: ### 1. Basic Step Structure ```yaml theme={null} - id: step_id # Unique identifier for the step tool: TOOL_NAME # The tool to use (e.g., LLM, PYTHON_SANDBOX) input: # Input parameters required by the tool - name: parameter_name # Name of the input parameter value: parameter_value # Value for the parameter config: # Optional: Tool-specific configuration - name: config_name # Name of the configuration parameter value: config_value # Value for the configuration needs: # Optional: List of step IDs that must complete first - step_id1 # Step that must complete before this one - step_id2 # Another dependency when: "condition" # Optional: Condition that must be true for step to run forEach: "items" # Optional: Run step for each item in a collection ``` Each field serves a specific purpose: * `id`: Required unique identifier for referencing the step * `tool`: Required name of the tool to execute (must be one of the available tools) * `input`: Required list of input parameters specific to the tool * `config`: Optional tool-specific configuration (e.g., API tokens, temperature for LLM) * `needs`: Optional list of step IDs that must complete before this step runs * `when`: Optional condition that must evaluate to true for the step to execute * `forEach`: Optional field to execute the step multiple times over a collection ### 2. Configuration Used to set tool-specific settings: ```yaml theme={null} config: - name: config_name value: config_value ``` Example: ```yaml theme={null} config: - name: temperature value: 0.7 - name: token value: "{{secrets.API_TOKEN}}" ``` ### 3. Dependencies Specify which steps must complete before this step can run: ```yaml theme={null} needs: - step_id1 - step_id2 ``` Example: ```yaml theme={null} - id: summarize tool: LLM needs: - fetch_content - analyze_sentiment ``` ### 4. Conditional Execution Control whether a step should run based on conditions: ```yaml theme={null} when: "" ``` Examples: ```yaml theme={null} when: "'{{steps.check_genre.result.content}}' == 'General'" when: "{{steps.count_items.result}} > 5" ``` ### 5. Loop Execution Execute a step for each item in a collection: ```yaml theme={null} forEach: "{{steps.input_list.result}}" ``` Example: ```yaml theme={null} - id: process_items tool: PYTHON_SANDBOX_RUN forEach: "{{steps.get_items.result}}" input: - name: code value: "process_item('{{item}}')" - name: data_type value: "STRING" ``` ### 6. Result Reference Reference results from previous steps: ```yaml theme={null} value: "{{steps.step_id.result}}" # Access entire result value: "{{steps.step_id.result.content}}" # Access specific property ``` ### Important Notes * **Step IDs**: Must be unique within the workflow * **Dependencies**: * Create an implicit execution order * Can form complex graphs (including diamond patterns) * Circular dependencies are not allowed * **Conditions**: * Support basic comparisons and logical operators * Can reference results from previous steps * Evaluated before step execution * **Variable References**: * Use `{{steps.step_id.result}}` to access previous step results * Use `{{secrets.SECRET_NAME}}` to access configured secrets * Use `{{item}}` in forEach loops to access the current item * **YAML Syntax**: * Use `|` for a multi-line string until the indentation ends. ## Jinja2 Template Syntax Jinba Flow supports Jinja2 templating for dynamic value generation and complex logic in manifest files. This powerful feature allows you to create more flexible and reusable workflows. When using templates, you have access to: * `steps`: Results from previous steps * `item`: Current item in forEach loops * `secrets`: Configured secrets * Built-in functions like `zip()`, `range()`, etc. Use `{%-` and `-%}` to control whitespace in the output, where the `-` removes whitespace before or after the block. ### Basic Syntax 1. **Variable Interpolation** ```yaml theme={null} value: "{{ variable }}" ``` 2. **Control Structures** ```yaml theme={null} # For loops {%- for item in items %} {{ item }} {%- endfor %} # Conditional statements {%- if condition %} {{ value }} {%- endif %} ``` 3. **Accessing Step Results** ```yaml theme={null} value: "{{ steps.step_id.result }}" value: "{{ steps.step_id.result.content }}" ``` ### Common Use Cases 1. **Processing Lists** ```yaml theme={null} - id: process_items tool: PYTHON_SANDBOX_RUN input: - name: code value: |- items = [] {%- for item in steps.input_list.result %} items.append({ "id": "{{item.id}}", "value": "{{item.value}}" }) {%- endfor %} - name: data_type value: "STRING" ``` 2. **Conditional Logic** ```yaml theme={null} - id: conditional_step tool: PYTHON_SANDBOX_RUN input: - name: code value: |- {%- if steps.check.result.status == 'success' %} print("Processing successful case") {%- else %} print("Handling error case") {%- endif %} - name: data_type value: "STRING" ``` 3. **Combining Multiple Lists** ```yaml theme={null} - id: combine_data tool: PYTHON_SANDBOX_RUN input: - name: code value: |- results = [] {%- for item1, item2 in zip(list1, list2) %} results.append(f"{item1}: {item2}") {%- endfor %} - name: data_type value: "STRING" ``` ### Common Patterns 1. **Filtering Lists** ```yaml theme={null} {%- for item in items if item.status == 'active' %} {{ item.name }} {%- endfor %} ``` 2. **Setting Default Values** ```yaml theme={null} {{ variable | default('default_value') }} ``` 3. **String Manipulation** ```yaml theme={null} {{ variable | upper }} {{ variable | trim }} {{ variable | replace('old', 'new') }} ``` ## Example Manifest Below is an example manifest that processes numerical data through multiple steps: ```yaml theme={null} {- id: input_data name: input_data tool: INPUT_JSON config: [] input: - name: value value: "[1, 2, 3, 4, 5]" - id: branch_a1 name: branch_a1 tool: PYTHON_SANDBOX config: [] input: - name: code value: | data = {{steps.input_data.result}} result = sum([x for x in data if x % 2 == 0]) result # even numbers sum needs: - input_data - id: branch_a2 name: branch_a2 tool: PYTHON_SANDBOX config: [] input: - name: code value: | result = {{steps.branch_a1.result.text}} * 2 result # double the sum needs: - branch_a1} ``` ## Breakdown of Each Step ### 1. **Input Data (`input_data`)** * Uses the `INPUT_JSON` tool to define an array of numbers `[1, 2, 3, 4, 5]`. ### 2. **Branch A1 (`branch_a1`)** * Uses `PYTHON_SANDBOX` to compute the sum of even numbers from `input_data`. * Depends on `input_data`. ### 3. **Branch A2 (`branch_a2`)** * Doubles the result from `branch_a1`. * Depends on `branch_a1`. ### 4. **Branch B1 (`branch_b1`)** * Computes the sum of odd numbers from `input_data`. * Depends on `input_data`. # Model Context Protocol Source: https://carnot.mintlify.app/en/pages/basics/mcp Learn how to set up your workspace MCP server. The MCP page. Add published flows in the workspace as MCP tools # What is Model Context Protocol (MCP)? MCP is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications. Just as USB-C provides a standardized way to connect your devices to various peripherals and accessories, MCP provides a standardized way to connect AI models to different data sources and tools. Read more [here.](https://modelcontextprotocol.io/introduction?utm_source=chatgpt.com) # Setting Up Your Workspace MCP server When you set up a flow, you can use tools beginning with `INPUT_` to set the inputs that your tool will have. For example, ```yaml theme={null} - id: word_1 tool: INPUT_TEXT input: - name: value value: DEFAULT_VALUE - name: data_type value: STRING - id: word_2 tool: INPUT_TEXT input: - name: value value: DEFAULT_VALUE - name: data_type value: STRING - id: concat tool: PYTHON_SANDBOX_RUN needs: - word_1 - word_2 input: - name: code value: | word_1 = steps.word_1.result.output word_2 = steps.word_2.result.output f"{word_1} {word_2}" - name: data_type value: STRING ``` The above flow would show the parameters `word_1` and `word_2` for the MCP tool. Please note that tool IDs, not names, are used to reference the tools in the flow. After you add these `INPUT_` tools, you can navigate to the MCP tab of your workspace to configure flows to be used for MCP, set prompts for the flows to describe what they do, and set the prompts for the parameters of your configured flows as well. # Connecting to LLM To connect your workspace MCP to an LLM, use the sample configuration found on the MCP tab of your workspace. Remember to replace the secret key! If you have no other MCP servers, you can paste the whole file, otherwise, you can add just the `jinbaflow` section (for Jinba Flow) to your file. Here is an example of a configuration file: Set `YOUR_TOKEN` to a workspace API key or a personal API key (`sk-user-…`) created in your profile settings. Personal key owners must be members of the target workspace and have permission to run flows. Frozen and archived workspaces cannot be accessed with personal keys. With a personal key, runs are attributed to the key owner, and flows use that owner's personal secrets. Credits are charged to the organization that owns the flow's workspace. A personal key can access multiple workspaces, so do not share it with others. Revoking the key or leaving the workspace blocks subsequent requests. ```JSON theme={null} { "mcpServers": { "jinbaflow": { "command": "npx", "args": [ "-y", "supergateway", "--streamableHttp", "https://api.jinba.io/api/v2/workspaces/uuid-here-1234-5678-foobar/mcp", "--header", "Authorization: Bearer YOUR_TOKEN" ] } } } ``` # Overview Source: https://carnot.mintlify.app/en/pages/basics/overview Jinba Flow provides three different interfaces for creating workflows. By utilizing the characteristics of each interface appropriately, you can build workflows exactly as you envision. The flow editor. Edit steps visually on the canvas, and ask the AI copilot for changes in the left chat panel ## Chat Panel Use the Jinba Copilot to create flows through natural language conversation. This method is perfect for beginners or when you want to quickly prototype ideas. **Best for:** * Beginners learning Jinba Flow * Quick prototyping * Natural language interaction * Getting started without technical knowledge [Learn more about Chat Panel →](./chat) ## Graph Editor (Drag & Drop) Use the visual drag-and-drop graph editor to build flows by connecting pre-built modules. This method provides a visual approach to flow creation. **Best for:** * Building flows with existing tools * Understanding flow structure * Quick assembly of common patterns [Learn more about Graph Editor (Drag & Drop) →](./drag_and_drop) ## YAML Coding Panel Write manifests directly in YAML format for complete control over your flows. This method offers the most flexibility and power. **Best for:** * Advanced users * Custom tool integration * Complex workflows * Complete control over execution [Learn more about YAML Coding Panel →](./manifest) ## Choosing Your Method * **Start with Chat Panel** if you're new to Jinba Flow or want to quickly explore possibilities * **Use Graph Editor (Drag & Drop)** if you prefer visual interfaces and want to work with existing tools * **Choose YAML Coding Panel** if you need full control and are comfortable with YAML configuration All three methods can be used together - you might start with chat to prototype, then refine with the graph editor, and finally optimize with YAML coding. # Publish Source: https://carnot.mintlify.app/en/pages/basics/publish Learn how to publish your workflows and make them available via API or MCP The publish menu. Publish the current version, configure triggers, or expose the flow as an MCP tool ## Overview Publishing a workflow in Jinba Flow makes it available for execution via API calls or as an MCP (Model Context Protocol) tool. When you publish a workflow, you create a stable version that can be accessed by external systems, other workflows, or AI assistants. ## What is Publishing? Publishing a workflow: * **Creates a Version**: Saves the current workflow state as a published version * **Generates API Access**: Creates an API key that allows external access to your workflow * **Enables API Execution**: Makes the workflow callable via REST API endpoints * **Enables MCP Integration**: Allows the workflow to be used as an MCP tool for AI assistants * **Locks the Version**: The published version remains stable even if you make changes to the workflow ## Publishing a Workflow ### Step 1: Prepare Your Workflow Before publishing, ensure your workflow is: 1. **Valid**: All steps are properly configured 2. **Tested**: Run the workflow to verify it works correctly 3. **Complete**: All required inputs and outputs are defined ### Step 2: Publish from the Flow Editor 1. Open your workflow in the Flow Editor 2. Review your workflow to ensure it's ready 3. Click the **Publish** button in the editor toolbar 4. If validation passes, the workflow will be published **Note**: The publish button may show different states: * **Publish**: Workflow is not published * **Republish**: Workflow is published but has unpublished changes * **Published**: Workflow is published and up to date ### Step 3: Publishing Options When publishing, you can choose how your workflow is made available: #### Publish as API Publishing as API makes your workflow accessible via REST API: * **API Endpoint**: Your workflow can be called using HTTP requests * **API Key**: An API key is automatically generated for authentication * **Use Cases**: Integration with external systems, webhooks, scheduled tasks #### Publish as MCP Tool Publishing as MCP makes your workflow available as a tool for AI assistants: * **MCP Integration**: The workflow appears as a tool in MCP-compatible AI assistants * **Parameter Configuration**: Define input parameters that AI assistants can use * **Use Cases**: AI-powered automation, assistant workflows, conversational interfaces **Note**: You can publish a workflow as both API and MCP simultaneously. ## Publishing Process ### Direct Publishing For most workspaces, publishing is immediate: 1. Click **Publish** in the flow editor 2. The workflow is validated 3. A new version is created and marked as published 4. An API key is generated (if not already exists) 5. The workflow becomes available via API/MCP ### Approval Process (Enterprise) For Enterprise workspaces with approval processes enabled: 1. Click **Publish** in the flow editor 2. Enter an optional comment explaining the changes 3. Submit an approval request 4. The workflow version is created but not immediately published 5. An approver reviews and approves the request 6. Once approved, the workflow is automatically published **Approval Workflow**: * Approval requests appear in the approver's dashboard * Approvers can review changes and comments * Approvers can approve or reject the request * Approved workflows are automatically published ## Unpublishing a Workflow You can unpublish a workflow to make it unavailable: 1. Open the published workflow in the Flow Editor 2. Click the **Publish** toggle to turn it off 3. Confirm the unpublish action 4. The workflow is no longer accessible via API or MCP **Important Notes**: * Unpublishing does not delete the workflow or its versions * You can republish at any time * If the workflow is published as MCP, unpublishing will remove it from MCP tools * API keys remain but the workflow won't be accessible ## Published Versions ### Version Management When you publish a workflow: * **Version Created**: A new flow version is created with label "PUBLISH" * **Version History**: All published versions are saved in version history * **Stable Reference**: The published version remains unchanged even if you edit the workflow * **Version Comparison**: You can compare different versions to see changes ### Republishing When you make changes to a published workflow: 1. The workflow shows "unpublished changes" indicator 2. Click **Republish** to publish the new version 3. The new version replaces the previous published version 4. The old version remains in history for reference ## Using Published Workflows ### Via API Once published, you can call your workflow via API: ```bash theme={null} curl -X POST https://api.jinba.dev/api/v1/flows/{flow-id}/run \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "args": [ {"name": "input1", "value": "example"} ] }' ``` ### Via MCP Published workflows appear as tools in MCP-compatible AI assistants: * **Tool Name**: Based on your workflow name * **Parameters**: Defined input parameters from your workflow * **Description**: Uses your workflow description * **Usage**: AI assistants can invoke your workflow as a tool ### Via JINBA\_FLOW\_RUN Tool You can also call published workflows from other workflows using the `JINBA_FLOW_RUN` tool: ```yaml theme={null} - id: call_published_flow name: call_published_flow tool: JINBA_FLOW_RUN config: - name: token value: "{{secrets.JINBA_API_TOKEN}}" input: - name: id value: "{{secrets.PUBLISHED_FLOW_ID}}" - name: args value: - name: input1 value: "example value" ``` ## API Keys ### Automatic Generation When you publish a workflow: * An API key is automatically generated * The key is scoped to the specific workflow * The key is stored securely in your workspace * You can view the key in workflow settings ### Managing API Keys 1. Go to your workflow settings 2. Navigate to the **API** or **Publish Settings** section 3. View or regenerate your API key 4. Use the key in API requests for authentication **Security Best Practices**: * Never share API keys publicly * Rotate keys regularly * Use different keys for different environments * Revoke keys if compromised ## Publishing Best Practices 1. **Test Before Publishing**: Always test your workflow thoroughly before publishing 2. **Version Control**: Use meaningful version labels and comments 3. **Documentation**: Document your workflow's inputs, outputs, and behavior 4. **Error Handling**: Implement proper error handling in your workflows 5. **Security**: Review permissions and access controls before publishing 6. **Monitoring**: Monitor published workflow usage and performance 7. **Gradual Rollout**: Test with a small audience before full deployment ## Publishing Status Indicators The flow editor shows different states: * **Unpublished**: Workflow is not published (gray indicator) * **Published**: Workflow is published and up to date (green indicator) * **Unpublished Changes**: Workflow has changes not yet published (yellow indicator) * **Publishing**: Workflow is currently being published (loading indicator) ## Troubleshooting ### Cannot Publish * **Validation Errors**: Fix any validation errors in your workflow * **Missing Permissions**: Ensure you have publish permissions * **Approval Required**: Submit an approval request if required ### Published Workflow Not Accessible * **Check API Key**: Verify the API key is correct * **Check Permissions**: Ensure the API key has proper permissions * **Verify Endpoint**: Confirm you're using the correct API endpoint * **Check Status**: Verify the workflow is actually published ### MCP Tool Not Appearing * **Publish Required**: The workflow must be published to appear as MCP tool * **MCP Configuration**: Ensure MCP is properly configured in workspace settings * **Parameter Definition**: Define input parameters for MCP tool usage ## Related Features * [Workspace](/en/pages/basics/workspace) - Learn about workspace management * [MCP](/en/pages/basics/mcp) - Learn about Model Context Protocol integration * [Archive Feature](/en/pages/basics/archive) - Learn about archiving workflows # Quickstart Source: https://carnot.mintlify.app/en/pages/basics/quickstart Create and run your first workflow in 10 minutes Get started with Jinba Flow by building a simple workflow that searches the web and summarizes results using AI. ## What You'll Build A workflow that: 1. Searches Google for a topic you specify 2. Summarizes the results using AI 3. Returns a concise summary ## Prerequisites * A Jinba Flow account ([Sign up here](https://flow.jinba.io/)) * No coding experience required ## Steps Go to [flow.jinba.io](https://flow.jinba.io/) and sign in to your account. In the chat panel, type a natural language description of what you want to accomplish: ``` Search Google for "AI productivity tools" and summarize the top results ``` Click "Create Flow" (or press Enter) to let the AI generate your workflow. Chat Interface The flow is created in the left chat panel, and a manifest defining the step structure is automatically generated in the right YAML coding panel. Flow generation in progress Review the AI-generated flow and click **"Accept Changes"** to confirm the generated workflow. Accept changes screen Once the flow is confirmed, the workflow will be displayed in the central graph editor. Click the "Execute" button in the top right to run the workflow. Execute flow button Once execution completes successfully, click "View Details" displayed at the bottom right to check the execution results. Flow execution results Once the flow has executed successfully, click the "Deploy" button in the top right to publish your workflow. Deploy button ## What's Next? Learn the key terms and concepts used in Jinba Flow Explore the three ways to create workflows Browse the catalog of tools you can use Connect your external services # Scheduling Source: https://carnot.mintlify.app/en/pages/basics/scheduling Learn how to schedule workflows to run automatically Schedule settings in the triggers panel. Run flows automatically at a set interval ## Overview Jinba Flow allows you to schedule workflows to run automatically at specified times using cron expressions. Scheduled workflows execute the published version, making them perfect for automated tasks, periodic data processing, and scheduled reports. ## What is Scheduling? Scheduling enables automatic execution of workflows: * **Automatic Execution**: Workflows run automatically based on a schedule * **Cron Expressions**: Use standard cron syntax to define execution times * **Published Version**: Scheduled workflows always use the published version * **Timezone Support**: Specify timezones for accurate scheduling ## Prerequisites To schedule a workflow: 1. **Published Workflow**: The workflow must be published (see [Publish](/en/pages/basics/publish)) 2. **Schedule Permission**: You need permission to schedule workflows in the workspace 3. **Cron Expression**: Define when the workflow should run ## Setting Up Scheduling ### Step 1: Open Workflow Settings 1. Open your published workflow in the Flow Editor 2. Navigate to the **Runs** or **Settings** section 3. Find the **Schedule** section ### Step 2: Enable Scheduling 1. Toggle the **Enable Schedule** switch to ON 2. The schedule configuration form appears ### Step 3: Configure Schedule 1. Enter a cron expression or use the visual schedule builder 2. Optionally specify a timezone 3. Review the schedule description (e.g., "Every day at midnight") 4. Save the schedule ### Step 4: Verify Schedule 1. Check that the schedule is active 2. View the next scheduled execution time 3. Monitor scheduled executions in the execution history ## Cron Expressions ### Basic Cron Syntax Cron expressions consist of five fields: ``` ┌───────────── minute (0 - 59) │ ┌───────────── hour (0 - 23) │ │ ┌───────────── day of month (1 - 31) │ │ │ ┌───────────── month (1 - 12) │ │ │ │ ┌───────────── day of week (0 - 6) (Sunday to Saturday) │ │ │ │ │ * * * * * ``` ### Common Cron Examples #### Every Minute ``` * * * * * ``` #### Every Hour ``` 0 * * * * ``` #### Daily at Midnight ``` 0 0 * * * ``` #### Daily at Noon ``` 0 12 * * * ``` #### Every Monday at 9 AM ``` 0 9 * * 1 ``` #### First Day of Every Month at Midnight ``` 0 0 1 * * ``` #### Every 15 Minutes ``` */15 * * * * ``` #### Every Day at 2:30 AM ``` 30 2 * * * ``` #### Weekdays at 9 AM ``` 0 9 * * 1-5 ``` #### First Day of Every Quarter at Midnight ``` 0 0 1 */3 * ``` ## Timezone Support ### Specifying Timezone You can specify a timezone using the `CRON_TZ` prefix: ``` CRON_TZ=America/New_York 0 9 * * * ``` This runs the workflow at 9 AM Eastern Time every day. ### Common Timezones * `UTC`: Coordinated Universal Time * `America/New_York`: Eastern Time * `America/Chicago`: Central Time * `America/Los_Angeles`: Pacific Time * `Europe/London`: Greenwich Mean Time * `Asia/Tokyo`: Japan Standard Time * `Australia/Sydney`: Australian Eastern Time **Note**: If no timezone is specified, the schedule uses UTC. ## Schedule Management ### Enabling a Schedule 1. Open workflow settings 2. Navigate to the Schedule section 3. Toggle **Enable Schedule** to ON 4. Configure the cron expression 5. Save the schedule ### Disabling a Schedule 1. Open workflow settings 2. Navigate to the Schedule section 3. Toggle **Enable Schedule** to OFF 4. The schedule is immediately disabled **Note**: Disabling a schedule stops all future executions but doesn't affect currently running workflows. ### Updating a Schedule 1. Open workflow settings 2. Navigate to the Schedule section 3. Modify the cron expression 4. Save the changes **Important**: Schedule updates take effect immediately. The next execution uses the new schedule. ## Scheduled Execution Behavior ### Published Version Scheduled workflows always execute the **published version**: * **Stability**: Uses the stable published version, not your current edits * **Consistency**: Ensures scheduled executions use the same version * **Updates**: Republish to update the scheduled workflow version ### Execution Context Scheduled executions: * **Source**: Marked as "SCHEDULE" in execution history * **Arguments**: Use default or empty arguments (unless configured) * **Permissions**: Run with workspace permissions * **Logging**: All executions are logged in execution history ### Execution Monitoring Monitor scheduled executions: 1. View execution history 2. Filter by source "SCHEDULE" 3. Check execution status and results 4. Review any errors that occurred ## Best Practices 1. **Test Before Scheduling**: Test your workflow thoroughly before scheduling 2. **Publish Stable Versions**: Only schedule workflows with stable published versions 3. **Timezone Awareness**: Always specify timezones for accurate scheduling 4. **Monitor Executions**: Regularly check execution history for scheduled runs 5. **Error Handling**: Implement error handling in workflows for scheduled execution 6. **Resource Management**: Consider resource usage for frequently scheduled workflows 7. **Documentation**: Document schedule purpose and timing in workflow description ## Common Use Cases ### Daily Reports Schedule workflows to generate daily reports: ``` # Every day at 8 AM 0 8 * * * ``` ### Data Synchronization Schedule periodic data synchronization: ``` # Every 6 hours 0 */6 * * * ``` ### Weekly Summaries Schedule weekly summary generation: ``` # Every Monday at 9 AM 0 9 * * 1 ``` ### Monthly Processing Schedule monthly data processing: ``` # First day of every month at midnight 0 0 1 * * ``` ### Frequent Monitoring Schedule frequent monitoring tasks: ``` # Every 5 minutes */5 * * * * ``` ## Troubleshooting ### Schedule Not Running **Possible Causes**: * Schedule is disabled * Workflow is not published * Cron expression is invalid * Workflow is archived **Solutions**: 1. Verify schedule is enabled 2. Ensure workflow is published 3. Validate cron expression syntax 4. Check workflow is not archived ### Wrong Execution Time **Possible Causes**: * Timezone not specified * Incorrect cron expression * Timezone conversion issues **Solutions**: 1. Specify timezone explicitly 2. Verify cron expression 3. Test with a simple schedule first ### Execution Failures **Possible Causes**: * Workflow errors * Missing credentials * Resource limitations **Solutions**: 1. Check execution history for errors 2. Verify credentials are configured 3. Review workflow logic 4. Check resource availability ## Schedule Validation ### Cron Expression Validation The system validates cron expressions: * **Syntax Check**: Ensures valid cron syntax * **Range Validation**: Validates field ranges * **Error Messages**: Provides clear error messages for invalid expressions ### Visual Schedule Builder Many interfaces provide visual schedule builders: * **Point-and-Click**: Select schedule options visually * **Preview**: See schedule description before saving * **Validation**: Automatic validation of schedule settings ## Related Features * [Publish](/en/pages/basics/publish) - Learn about publishing workflows * [API](/en/pages/basics/api) - Learn about calling workflows via API * [History and Versions](/en/pages/basics/history-versions) - Learn about execution history # Step Module Options Source: https://carnot.mintlify.app/en/pages/basics/step-options Learn how to use advanced step options like loops (forEach), conditions (when), and dependencies (needs) in your workflows The step settings screen. Switch between form/YAML, configure run conditions, loops, and error handling, and inspect input/output data ## Overview Each step in a Jinba Flow can be configured with advanced options that control how and when it executes. These options allow you to create sophisticated workflows with conditional logic, loops, and complex dependencies. ## Step Dependencies (needs) The `needs` option specifies which steps must complete before the current step can run. This creates an execution order and ensures data is available when needed. ### Basic Usage ```yaml theme={null} - id: analyze_data tool: PYTHON_SANDBOX_RUN needs: - fetch_data - validate_input input: - name: code value: "process({{steps.fetch_data.result}})" ``` ### Key Points * **Execution Order**: Steps with `needs` wait for all specified dependencies to complete * **Parallel Execution**: Steps without dependencies run in parallel automatically * **Failure Handling**: If a dependency fails or is skipped, dependent steps are also skipped * **Diamond Patterns**: Complex dependency graphs are supported (A→B, A→C, B→D, C→D) ### Example: Multi-Branch Workflow ```yaml theme={null} - id: input_data tool: INPUT_JSON input: - name: value value: "[1, 2, 3, 4, 5]" - id: process_even tool: PYTHON_SANDBOX_RUN needs: - input_data input: - name: code value: | data = {{steps.input_data.result}} result = [x for x in data if x % 2 == 0] - id: process_odd tool: PYTHON_SANDBOX_RUN needs: - input_data input: - name: code value: | data = {{steps.input_data.result}} result = [x for x in data if x % 2 != 0] - id: combine_results tool: PYTHON_SANDBOX_RUN needs: - process_even - process_odd input: - name: code value: | even = {{steps.process_even.result}} odd = {{steps.process_odd.result}} result = {"even": even, "odd": odd} ``` ## Conditional Execution (when) The `when` option allows a step to execute only if a specified condition is true. This enables dynamic workflow behavior based on previous step results. ### Basic Syntax ```yaml theme={null} - id: conditional_step tool: TOOL_NAME when: "" input: - name: param value: "value" ``` ### Condition Expressions Conditions support: * **String Comparison**: `"{{steps.check.result.status}}" == "success"` * **Numeric Comparison**: `{{steps.count.result}} > 5` * **Boolean Evaluation**: `{{steps.validate.result.isValid}} == true` ### Example: Conditional Branching ```yaml theme={null} - id: check_type tool: PYTHON_SANDBOX_RUN input: - name: code value: | result = {"type": "premium"} - id: premium_processing tool: PYTHON_SANDBOX_RUN when: "'{{steps.check_type.result.type}}' == 'premium'" needs: - check_type input: - name: code value: | result = "Processing premium user..." - id: standard_processing tool: PYTHON_SANDBOX_RUN when: "'{{steps.check_type.result.type}}' == 'standard'" needs: - check_type input: - name: code value: | result = "Processing standard user..." ``` ### Important Notes * Conditions are evaluated **before** step execution * If the condition is false, the step status becomes `skipped` * Skipped steps don't affect downstream steps that depend on them (they will also be skipped) * Use single quotes around template variables in string comparisons ## Loop Execution (forEach) The `forEach` option executes a step multiple times, once for each item in a collection. This is useful for batch processing lists of data. ### Basic Syntax ```yaml theme={null} - id: process_items tool: TOOL_NAME forEach: "{{steps.get_list.result}}" input: - name: item value: "{{item}}" ``` ### How It Works 1. The `forEach` value is evaluated to get a list/array 2. The step executes once for each item in the list 3. Inside the step, `{{item}}` refers to the current item 4. Results are collected as an array ### Example: Processing Multiple Items ```yaml theme={null} - id: get_users tool: INPUT_JSON input: - name: value value: | [ {"id": 1, "name": "Alice"}, {"id": 2, "name": "Bob"}, {"id": 3, "name": "Charlie"} ] - id: greet_users tool: PYTHON_SANDBOX_RUN forEach: "{{steps.get_users.result}}" needs: - get_users input: - name: code value: | user = {{item}} result = f"Hello, {user['name']}!" - id: combine_greetings tool: PYTHON_SANDBOX_RUN needs: - greet_users input: - name: code value: | greetings = {{steps.greet_users.result}} result = "\n".join([g['result'] for g in greetings]) ``` ### Accessing Item Properties ```yaml theme={null} forEach: "{{steps.items.result}}" input: - name: id value: "{{item.id}}" - name: name value: "{{item.name}}" ``` ### forEach with Index If you need the index of the current item, you can use Jinja2 loops in the input: ```yaml theme={null} - id: process_with_index tool: PYTHON_SANDBOX_RUN input: - name: code value: | items = {{steps.get_items.result}} results = [] {%- for item in items %} results.append({"index": {{loop.index}}, "value": "{{item}}"}) {%- endfor %} result = results ``` ## Combining Options You can combine `needs`, `when`, and `forEach` in a single step: ```yaml theme={null} - id: process_active_items tool: PYTHON_SANDBOX_RUN needs: - get_items - check_enabled when: "{{steps.check_enabled.result.active}} == true" forEach: "{{steps.get_items.result}}" input: - name: code value: | item = {{item}} result = f"Processed: {item}" ``` **Evaluation Order**: 1. Wait for all `needs` dependencies to complete 2. Check if `when` condition is true 3. If true, execute `forEach` loop (or single execution if no forEach) ## Best Practices ### Dependencies * Keep dependency chains shallow when possible * Use parallel execution to improve performance * Clearly name steps to make dependencies readable ### Conditions * Use meaningful condition expressions * Consider all possible outcomes (success, failure, edge cases) * Test conditions with various input values ### Loops * Limit loop iterations to avoid long execution times * Handle empty arrays gracefully * Consider memory usage for large datasets ## Related * [YAML Coding Panel](/en/pages/basics/manifest) - Complete YAML syntax reference * [Variables & Templates](/en/pages/basics/variables) - Variable placeholders and Jinja2 templates * [Debug](/en/pages/basics/debug) - Debugging workflow execution # Variables & Templates Source: https://carnot.mintlify.app/en/pages/basics/variables Learn how to use variable placeholders and Jinja2 templates to create dynamic workflows ## Overview Jinba Flow supports powerful templating capabilities that allow you to: * Reference results from previous steps * Access configured secrets securely * Use Jinja2 templates for complex logic * Create dynamic, reusable workflows ## Variable Placeholders ### Basic Syntax Variables are enclosed in double curly braces: `{{ variable }}` ### Available Variables | Variable | Description | Example | | - | - | - | | `steps..result` | Result from a previous step | `{{steps.fetch_data.result}}` | | `steps..result.` | Specific property from result | `{{steps.api_call.result.content}}` | | `secrets.` | Configured workspace secret | `{{secrets.API_KEY}}` | | `item` | Current item in forEach loop | `{{item}}` | | `item.` | Property of current item | `{{item.id}}` | ### Accessing Step Results ```yaml theme={null} # Access entire result - name: data value: "{{steps.previous_step.result}}" # Access specific property - name: content value: "{{steps.llm_response.result.content}}" # Access nested property - name: user_email value: "{{steps.get_user.result.user.email}}" # Access array element - name: first_item value: "{{steps.get_list.result[0]}}" ``` ### Using Secrets Secrets are configured at the workspace level and accessed securely: ```yaml theme={null} config: - name: api_key value: "{{secrets.OPENAI_API_KEY}}" - name: token value: "{{secrets.GITHUB_TOKEN}}" ``` **Security Notes**: * Secrets are encrypted at rest * Never hardcode sensitive values in workflows * Use secrets for API keys, tokens, and credentials ## Jinja2 Templates Jinba Flow supports full Jinja2 templating for advanced logic. Templates are processed before step execution. ### Control Structures #### For Loops ```yaml theme={null} value: | items = [] {%- for user in steps.get_users.result %} items.append({ "id": "{{user.id}}", "name": "{{user.name}}" }) {%- endfor %} ``` #### Conditional Statements ```yaml theme={null} value: | {%- if steps.check.result.status == 'success' %} print("Processing successful") {%- else %} print("Handling error") {%- endif %} ``` #### Loop with Index ```yaml theme={null} value: | {%- for item in items %} {{loop.index}}: {{item}} {%- endfor %} ``` ### Built-in Functions Jinja2 provides useful built-in functions: ```yaml theme={null} # zip - Combine multiple lists {%- for a, b in zip(list1, list2) %} {{a}}: {{b}} {%- endfor %} # range - Generate number sequence {%- for i in range(5) %} Item {{i}} {%- endfor %} # length/count Total: {{items|length}} ``` ### Filters Apply transformations to values: ```yaml theme={null} # String manipulation {{ variable | upper }} {{ variable | lower }} {{ variable | trim }} {{ variable | replace('old', 'new') }} # Default values {{ variable | default('fallback_value') }} # JSON handling {{ data | tojson }} # List operations {{ items | first }} {{ items | last }} {{ items | join(', ') }} ``` ### Whitespace Control Use `{%-` and `-%}` to control whitespace: ```yaml theme={null} value: | {%- for item in items -%} {{item}} {%- endfor -%} ``` * `{%-` removes whitespace before the tag * `-%}` removes whitespace after the tag ## Common Patterns ### Processing Lists ```yaml theme={null} - id: process_items tool: PYTHON_SANDBOX_RUN input: - name: code value: | results = [] {%- for item in steps.input_list.result %} results.append({ "id": "{{item.id}}", "processed": True }) {%- endfor %} result = results ``` ### Conditional Data Selection ```yaml theme={null} - id: select_data tool: PYTHON_SANDBOX_RUN input: - name: code value: | {%- if steps.config.result.mode == 'full' %} data = {{steps.full_data.result}} {%- else %} data = {{steps.summary_data.result}} {%- endif %} result = data ``` ### Combining Multiple Sources ```yaml theme={null} - id: merge_data tool: PYTHON_SANDBOX_RUN input: - name: code value: | combined = [] {%- for user, order in zip(steps.users.result, steps.orders.result) %} combined.append({ "user": "{{user.name}}", "order": "{{order.id}}" }) {%- endfor %} result = combined ``` ### Filtering Lists ```yaml theme={null} value: | active_items = [] {%- for item in items if item.status == 'active' %} active_items.append("{{item.name}}") {%- endfor %} ``` ### Building Dynamic Prompts ```yaml theme={null} - id: generate_prompt tool: LLM input: - name: prompt value: | Analyze the following items: {%- for item in steps.items.result %} - {{item.name}}: {{item.description}} {%- endfor %} Provide insights based on the above data. ``` ## Best Practices ### Variable References * Use descriptive step IDs for clarity * Access only the properties you need * Handle potential null/undefined values with defaults ### Templates * Keep templates readable with proper indentation * Use whitespace control for clean output * Break complex logic into multiple steps ### Secrets * Never log or expose secret values * Use workspace-level secrets for team sharing * Rotate secrets regularly ### Performance * Avoid deeply nested templates * Limit loop iterations * Pre-process data when possible ## Troubleshooting ### Common Issues **Variable not found** * Check step ID spelling * Ensure the referenced step runs before current step * Verify the property path is correct **Template syntax error** * Check for balanced braces `{{ }}` * Verify Jinja2 tag syntax `{% %}` * Look for missing quotes in strings **Unexpected output** * Use debug steps to inspect intermediate values * Check whitespace handling * Verify data types (string vs object) ## Related * [Step Module Options](/en/pages/basics/step-options) - forEach, when, needs * [YAML Coding Panel](/en/pages/basics/manifest) - Complete YAML syntax * [Debug](/en/pages/basics/debug) - Debugging workflows # What is Jinba Flow? Source: https://carnot.mintlify.app/en/pages/basics/what-is-jinba-flow A product for designing and building workflows Jinba Flow is a product for designing and building workflows. Generate flows automatically through chat, then visually review and edit them with an intuitive flowchart interface. Workflows can be published as APIs or batch processes for easy reuse. Jinba Flow Editor ## Workflow Automation in 3 Steps **Auto-generate workflows with natural language** Describe what you want and get instant flow generation Intuitive drag & drop for flexible editing and building Supports complex logic: branches, loops, and more **Diverse tools & secure AI integration** Connect Slack, Gmail, Notion, GitHub, Python, and more Easily integrate GPT, Claude, Gemini via MCP Safe execution environment for advanced business tasks **One-click publish and operate** Deploy instantly as REST API Publish as MCP server for agent integration Easy to call from existing systems and apps ## Use Cases Monitor channels, summarize discussions, and post updates automatically Extract, transform, and load data across multiple sources Process documents with AI for extraction, summarization, and insights ## Enterprise Features For organizations requiring advanced security and control: * **Private Hosting**: On-premises or private cloud deployment * **SSO & RBAC**: Single Sign-On and role-based access control * **Audit Logs**: Detailed tracking for compliance * **Dedicated Support**: Engineering support for workflow development * **Private Models**: Use AWS Bedrock, Azure AI, or custom models ## Get Started Build your first workflow in 10 minutes Learn the key terms and concepts # Workspace Source: https://carnot.mintlify.app/en/pages/basics/workspace Learn about workspaces in Jinba Flow and how to manage them The workspace home. Create flows in natural language, and access flows, storage, secrets, and admin features from the sidebar ## What is a Workspace? A workspace in Jinba Flow is your personal or team environment where you create, manage, and execute workflows. Think of it as your dedicated space for organizing all your automation projects, credentials, and configurations. ## Key Features of Workspaces ### Flow Management * **Create and Organize Flows**: Build multiple workflows within a single workspace * **Version Control**: Track changes and manage different versions of your flows * **Flow Sharing**: Share flows with team members or make them public * **Flow Templates**: Save and reuse common workflow patterns ### Credentials Management * **Secure Storage**: Store API keys and OAuth credentials securely * **Service Integration**: Configure credentials for various external services * **Access Control**: Manage who can access which credentials * **Credential Organization**: Organize credentials by service type or project ### Settings and Configuration * **Workspace Settings**: Customize workspace preferences and behavior * **Team Management**: Invite team members and manage permissions * **Billing and Subscriptions**: Manage your subscription plan and billing information * **Usage Monitoring**: Track credit usage and workflow execution statistics ### Files and Storage Management * **File Storage**: Upload, organize, and manage files in your workspace * **File Sharing**: Share files using temporary links or permanent URIs * **Knowledge Bases**: Create and manage vector databases for RAG systems * **Output Files**: Access files generated by workflow executions from the flow editor ### MCP Integration * **MCP Server Setup**: Configure your workspace as an MCP server * **Flow Exposure**: Expose your flows as MCP tools for use with LLMs * **Parameter Configuration**: Set up input parameters for MCP-enabled flows ## Workspace Types ### Personal Workspace A personal workspace is your individual space where you can: * Create and manage your own workflows * Store personal credentials * Track your own usage and credits * Access all basic features ### Team Workspace (Enterprise) Team workspaces provide additional collaboration features: * **Shared Resources**: Share flows, credentials, and configurations with team members * **Role-Based Access**: Assign different roles and permissions to team members * **Team Analytics**: View team-wide usage statistics and performance metrics * **Approval Workflows**: Implement approval processes for critical operations * **Organization Management**: Manage multiple teams and workspaces under one organization ## Getting Started with Your Workspace 1. **Access Your Workspace**: Log in to Jinba Flow and navigate to your workspace dashboard 2. **Create Your First Flow**: Use the Chat Panel, Graph Editor, or YAML Coding Panel to create workflows 3. **Configure Credentials**: Set up API keys and OAuth connections for the services you want to use 4. **Upload Files** (Optional): Upload files to your workspace storage for use in workflows 5. **Set Up MCP** (Optional): Configure your workspace MCP server to expose flows to LLMs 6. **Monitor Usage**: Keep track of your credit consumption and workflow executions ## Files and Storage ### File Management Your workspace includes a Storage section where you can: * **Upload Files**: Store documents, data files, and other resources * **Organize Files**: Search, sort, and manage your file collection * **Share Files**: Generate temporary links or permanent URIs for file sharing * **Use in Workflows**: Reference files using permanent URIs (`jinbaflow://{file-id}`) ### Storage Access Access storage from the workspace sidebar: 1. Click **Storage** in the sidebar 2. Use the **Files** tab for file management 3. Use the **Knowledge Bases** tab for vector database management ### Files in Workflows Files stored in your workspace can be: * **Referenced as Input**: Use permanent URIs to reference files in workflow steps * **Generated as Output**: Save workflow results as files * **Processed**: Use file processing tools to extract, convert, or analyze content ### Knowledge Bases Knowledge bases enable RAG (Retrieval-Augmented Generation) functionality: * **Create Knowledge Bases**: Set up vector databases for semantic search * **Upload Documents**: Add PDFs, DOCX, and text files for indexing * **Automatic Processing**: Documents are automatically chunked and vectorized * **Vector Search**: Use semantic search to find relevant information For detailed information on building RAG systems, see [Knowledge](/en/pages/basics/knowledge). ## Workspace Members and Roles ### Understanding Workspace Roles Workspaces support different roles that determine what members can do: #### Owner The **Owner** role has full access to the workspace: * **Full Workspace Control**: Manage all workspace settings and configurations * **Member Management**: Invite new members, remove members, and change member roles * **Resource Management**: Create, update, delete, and manage all flows, credentials, and files * **Workspace Deletion**: Can delete the workspace (requires at least one owner to remain) * **MCP Configuration**: Full access to MCP server configuration * **Operation Logs**: View operation logs and audit trails **Important**: Every workspace must have at least one owner. You cannot remove the last owner from a workspace. #### Member The **Member** role has standard access to workspace resources: * **Flow Management**: Create, run, update, and delete flows * **Resource Access**: View and use shared credentials and files * **Limited Settings**: Cannot modify workspace settings or manage members * **No Member Management**: Cannot invite or remove other members #### Viewer (Enterprise) The **Viewer** role has read-only access: * **View Only**: Can view flows, credentials, and files but cannot modify them * **No Execution**: Cannot run flows or create new resources * **No Settings Access**: Cannot access workspace settings ### Adding Members to Your Workspace To add members to your workspace: 1. **Navigate to Workspace Settings**: Go to your workspace settings page 2. **Open Members Section**: Click on the "Members" or "Team" tab 3. **Invite Member**: Click the "Invite Member" button 4. **Enter Email**: Enter the email address of the user you want to invite 5. **Select Role**: Choose the appropriate role (Owner, Member, or Viewer) 6. **Send Invitation**: The user will be added to the workspace with the selected role **Requirements for Inviting Members**: * You must be an **Owner** of the workspace to invite members * The user must already have a Jinba Flow account (they will be found by email) * Your subscription plan must support the number of team members you're adding * Enterprise plans have higher member limits ### Managing Member Roles As a workspace owner, you can: * **Change Roles**: Update a member's role at any time * **Remove Members**: Remove members from the workspace (except the last owner) * **View Member List**: See all current members and their roles * **Monitor Activity**: View member activity and usage statistics **Note**: When you change a member's role, their permissions are updated immediately. Be careful when removing owner access, as owners have critical permissions. ### Workspace Ownership * **Initial Owner**: The user who creates a workspace automatically becomes the first owner * **Multiple Owners**: You can have multiple owners in a workspace for shared management * **Owner Requirements**: A workspace must always have at least one owner * **Transfer Ownership**: You can promote other members to owner role, but cannot remove the last owner ## Workspace Best Practices * **Organize by Project**: Create separate flows for different projects or use cases * **Use Descriptive Names**: Name your flows and credentials clearly for easy identification * **Regular Cleanup**: Archive unused flows to keep your workspace organized * **Monitor Credits**: Regularly check your credit usage to optimize workflow costs * **Secure Credentials**: Never share API keys and regularly rotate them for security * **Manage Access**: Regularly review member roles and remove access for users who no longer need it * **Role Assignment**: Assign the minimum necessary role to members (principle of least privilege) ## Related Features * [Model Context Protocol (MCP)](/en/pages/basics/mcp) - Learn how to set up MCP for your workspace * [Credit Costs](/en/pages/basics/credit-costs) - Understand how credits work and are consumed * [Archive Feature](/en/pages/basics/archive) - Learn how to archive and restore flows # Overview Source: https://carnot.mintlify.app/en/pages/enterprise/index Learn about enterprise features available in Jinba Flow ## Overview Jinba Flow Enterprise provides advanced features designed for organizations that require enhanced security, compliance, and management capabilities. These features are available exclusively with the Enterprise plan. ## Enterprise Features * Workspace permission management by team and individual * Automatic archiving of inactive workspaces * Approval and restrictions for tool publishing * Feature selection through on/off flags * Access restrictions to external tools * On-premises and private cloud support * Audit logs * Role-based access with SSO authentication * Private LLM model support ### On-premises or Private Cloud Hosting Run Jinba in your own environment with complete data control. * **Complete Data Control**: All data remains within your infrastructure * **Custom Deployment**: Deploy on your own servers or private cloud * **Network Isolation**: Keep your workflows and data isolated from public cloud * **Compliance Ready**: Meet strict regulatory requirements with on-premises deployment ### Advanced Access Control Enhanced security and management through role-based permissions and Single Sign-On (SSO) integration. * **Role-Based Access Control (RBAC)**: Define custom roles with granular permissions * **Single Sign-On (SSO)**: Integrate with your existing identity provider (SAML, OAuth, etc.) * **Multi-Factor Authentication (MFA)**: Add an extra layer of security * **Session Management**: Control user sessions and access tokens ### Audit Logs Detailed tracking capabilities for compliance and security monitoring. * **Comprehensive Activity Logging**: Track all user actions and system events * **Compliance Reporting**: Generate reports for regulatory compliance * **Security Monitoring**: Detect and alert on suspicious activities * **Data Retention**: Configure log retention policies according to your requirements ### Organization Management Team spaces, roles, and approval workflows for efficient organization-wide management. * **Team Workspaces**: Organize users and workflows into dedicated spaces * **Approval Workflows**: Implement multi-level approval processes for critical operations * **Resource Quotas**: Set limits and quotas for teams and users * **Centralized Administration**: Manage all aspects of your organization from a single dashboard ### Pre-built and Custom Integrations Access to 100+ pre-built integrations plus custom connectors for internal systems. * **100+ Pre-built Integrations**: Connect with popular services out of the box * **Custom Connectors**: Build integrations for your internal systems and APIs * **API Gateway**: Secure access to your internal services * **Integration Support**: Get assistance from our team for complex integrations ### Dedicated Engineer Support Dedicated engineers provide workflow development support to remove development barriers. * **Technical Support**: Direct access to our engineering team * **Workflow Development**: Get help building and optimizing your workflows * **Best Practices**: Learn industry best practices and optimization techniques * **Priority Support**: Faster response times for critical issues ### Private Model Hosting Securely use AWS Bedrock, Azure AI, or your own models. * **AWS Bedrock Integration**: Use Amazon Bedrock models securely * **Azure AI Integration**: Connect to Azure OpenAI and other Azure AI services * **Custom Model Hosting**: Deploy and use your own AI models * **Model Governance**: Control which models are available to your organization ## Getting Started with Enterprise To learn more about Enterprise features and pricing, please contact our sales team: * **Email**: [contact@carnot.ai](mailto:contact@carnot.ai) * **Support**: Reach out through your account dashboard ## Additional Resources * [Security Documentation](/en/pages/security/index) * [SSO Setup Guide](https://github.com/carnot-technologies/jinba-flow/tree/main/docs/sso) * [Deployment Guide](https://github.com/carnot-technologies/jinba-flow/blob/main/README-DEPLOYMENT.md) # Organizations & Member Invitations Source: https://carnot.mintlify.app/en/pages/enterprise/organization The user journey from inviting a member to an organization to them joining it ## Overview Jinba has an "Organization" layer that spans multiple products (Jinba Flow, Jinba App, and others), which centrally manages the invitation and joining of members. * There are two roles within an organization: **MEMBER** and **OWNER**. * Only global administrators can create new organizations. Regular users cannot create organizations. ## Inviting a member (as the owner)