DocloHybridClient enables hybrid execution modes that combine local processing power with cloud management and observability.
Use Cases
- Config Pull: Pull flow definitions from the cloud, execute locally with your own providers
- Local + Observability: Build flows locally, send execution metrics to the cloud dashboard
- Cost Optimization: Use your own API keys for LLM providers while maintaining cloud visibility
Installation
Initialization
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | Required | Doclo API key |
baseUrl | string | https://app.doclo.ai | Base URL for the API |
convexUrl | string | Same as baseUrl | URL for data operations |
timeout | number | 300000 | Request timeout in ms |
providers | ProviderRegistry | Required | Map of provider refs to instances |
promptRegistryOptions | object | - | Remote prompt registry config |
schemaRegistryOptions | object | - | Remote schema registry config |
Mode 1: Pull from Cloud
Fetch a flow definition from the cloud and execute it locally with your providers:Hybrid Run Options
| Option | Type | Default | Description |
|---|---|---|---|
version | string | Latest | Flow version to execute |
observabilityMode | 'stream' | 'batch-at-end' | 'stream' | When to send events |
flushIntervalMs | number | 5000 | Flush interval for stream mode |
includeInputs | boolean | false | Include inputs in events |
includeOutputs | boolean | false | Include outputs in events |
metadata | object | - | Custom metadata for execution |
Mode 2: Local + Observability
Build flows entirely locally but send execution data to the cloud dashboard:Local Run Options
| Option | Type | Default | Description |
|---|---|---|---|
flowId | string | 'local-flow' | Flow ID for dashboard tracking |
flowVersion | string | - | Version for tracking |
observabilityMode | 'stream' | 'batch-at-end' | 'stream' | When to send events |
flushIntervalMs | number | 5000 | Flush interval for stream mode |
includeInputs | boolean | false | Include inputs in events |
includeOutputs | boolean | false | Include outputs in events |
Remote Registries
Access cloud-managed prompts and schemas:Preloading Assets
For better performance, preload assets before execution:Creating Observability Manually
Create a cloud observability config to wire into flows manually:Result Type
BothrunHybrid and runLocal return a HybridFlowResult:
Access the Cloud Client
The underlyingDocloClient is available for direct cloud operations: