Overview
TradingGoose's execution engine brings your workflows to life by processing blocks in the correct order, managing data flow, and handling errors gracefully, so you can understand exactly how workflows are executed in TradingGoose.
Block scheduling follows the workflow graph. Router and Condition outputs update the active path at runtime, so only the selected branches continue.
Documentation Overview
Execution Basics
Learn about the fundamental execution flow, block types, and how data flows through your workflow
Logging
Monitor workflow executions with comprehensive logging and real-time visibility
Cost Calculation
Understand how workflow execution costs are calculated and optimized
External API
Access execution logs and set up webhooks programmatically via REST API
Key Concepts
Topological Execution
Blocks execute in dependency order, similar to how a spreadsheet recalculates cells. The execution engine automatically determines which blocks can run based on completed dependencies.
Path Tracking
The engine actively tracks execution paths through your workflow. Router and Condition blocks dynamically update these paths, ensuring only relevant blocks execute.
Layer-Based Processing
Instead of executing blocks one-by-one, the engine identifies layers of blocks that can run in parallel, optimizing performance for complex workflows.
Execution Context
Each workflow maintains a rich context during execution containing:
- Block outputs and states
- Active execution paths
- Loop and parallel iteration tracking
- Environment variables
- Routing decisions
Execution Triggers
Workflows can be executed through multiple channels:
- Manual: Test and debug directly in the editor
- Deploy as API: Create an HTTP endpoint secured with API keys
- Deploy as Chat: Publish a hosted conversational interface
- Webhooks: Respond to external events from third-party services
- Scheduled: Run on a recurring schedule using cron expressions
Deploy as API
When you deploy a workflow as an API, TradingGoose:
- Exposes
POST /api/workflows/{workflowId}/executeon your TradingGoose deployment - Requires you to create or select an API key and pins that key to the deployment
- Accepts POST requests with JSON payloads
- Returns workflow execution results as JSON
Example API call:
curl -X POST https://www.tradinggoose.ai/api/workflows/your-workflow-id/execute \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{"input": {"message": "your data here"}}'Deploy as Chat
Chat deployment creates a conversational interface for your workflow:
- Published at
/chat/{identifier}on your TradingGoose deployment - Access control through public, password, email allow-list, or SSO modes
- Configurable title, description, welcome message, and logo
- Streaming responses for real-time interaction
- Perfect for AI assistants, support bots, or interactive tools
Each deployment method starts execution at the selected trigger block and supplies that trigger's input data.
Deployment Snapshots
Public API, hosted Chat, Schedule, and Webhook entry points execute the workflow's active deployment snapshot. Publish a new deployment after changing the canvas when you want those entry points to use the updated version.
Manual runs from the Workflow Editor use the current live canvas and workflow variables. This lets you test draft changes before deploying them.
The Deploy modal keeps a version history of deployment snapshots. You can inspect a snapshot, compare it with the current draft and active deployment, activate an older version, or load a deployed version back into the editor.
Programmatic Execution
Use the supported Execution API for production integrations. The repository also contains unpublished preview clients for TypeScript and Python; install those from repository source only when developing or evaluating the SDK packages.
Best Practices
Design for Reliability
- Handle errors gracefully with appropriate fallback paths
- Use environment variables for sensitive data
- Add logging to Function blocks for debugging
Optimize Performance
- Minimize external API calls where possible
- Use parallel execution for independent operations
- Store reusable intermediate values with Variables blocks during a run
Monitor Executions
- Review logs regularly to understand performance patterns
- Track costs for AI model usage
- Use workflow snapshots to debug issues
What's Next?
Start with Execution Basics to understand how workflows run, then explore Logging to monitor your executions and Cost Calculation to optimize your spending.