Basics
Understanding how workflows execute in TradingGoose is key to building efficient and reliable automations. The execution engine automatically handles dependencies, concurrency, and data flow to ensure your workflows run smoothly and predictably.
How Workflows Execute
TradingGoose's execution engine processes workflows intelligently by analyzing dependencies and running blocks in the most efficient order possible.
Concurrent Execution by Default
Multiple blocks run concurrently when they don't depend on each other. This parallel execution dramatically improves performance without requiring manual configuration.
For example, if a Manual Trigger connects to both a Customer Support agent and a Deep Researcher agent, both agent blocks can execute concurrently.
Dependencies and Explicit Data Mapping
When blocks have multiple active dependencies, the execution engine waits for those dependencies to complete. Connections determine scheduling; they do not automatically merge outputs into an input object or insert content into an Agent prompt.
For example, a Function block connected to agents named support and research can explicitly combine their outputs with return { support: <support.content>, research: <research.content> };. Similarly, reference Knowledge search results explicitly in the downstream Agent prompt. There is no automatically injected input object in Function code.
Smart Routing
Workflows can branch in multiple directions using routing blocks. The execution engine supports both deterministic routing (with Condition blocks) and AI-powered routing (with Router blocks).
For example, a workflow might branch after an initial block into a Condition block (which evaluates a logical expression) and a Router block (which uses AI to choose a path). Each resulting branch executes independently.
Block Types
TradingGoose provides different types of blocks that serve specific purposes in your workflows:
Triggers
Trigger blocks define entrypoints such as Manual, API, Input Form, Chat, and external events. A workflow can have multiple entrypoints; each execution starts from a selected trigger.
Processing Blocks
Agent blocks interact with AI models, Function blocks run custom code, and API blocks connect to external services. These blocks transform and process your data.
Control Flow
Router blocks use AI to choose paths, Condition blocks branch based on logic, Loop blocks iterate over items or counts, and Parallel blocks handle concurrent iterations.
Utility Blocks
Response blocks format final outputs for APIs and chat interfaces. Variables blocks manage workflow-scoped data. Wait blocks pause execution for a duration. Evaluator blocks assess and score outputs.
All blocks execute automatically based on their dependencies - you don't need to manually manage execution order or timing.
Execution Triggers
Workflows can be triggered in several ways, depending on your use case:
Manual Testing
Click "Run" in the workflow editor to test your workflow during development. Perfect for debugging and validation.
Scheduled Execution
Set up recurring executions using cron expressions. Great for regular data processing, reports, or maintenance tasks.
API Deployment
Deploy workflows as HTTP endpoints that can be called programmatically from your applications.
Webhook Integration
Respond to events from external services like GitHub, Stripe, or custom systems in real-time.
Chat Interface
Publish conversational interfaces at /chat/{identifier} on your deployment's origin for user-facing AI applications.
Learn more about each trigger type in the Triggers section of the documentation.
Execution Monitoring
When workflows run, TradingGoose provides real-time visibility into the execution process:
- Live Block States: See which blocks are currently executing, completed, or failed
- Execution Logs: Detailed logs appear in real-time showing inputs, outputs, and any errors
- Performance Metrics: Track execution time and costs for each block
- Path Visualization: Understand which execution paths were taken through your workflow
All execution details are captured and available for review even after workflows complete, helping with debugging and optimization.
Key Execution Principles
Understanding these core principles will help you build better workflows:
- Dependency-Based Execution: Blocks run when their active-path dependencies are satisfied
- Automatic Parallelization: Independent blocks run concurrently without configuration
- Explicit Data Mapping: Reference upstream outputs in block inputs or prompts; connections alone do not insert the data
- Error Handling: Failed blocks stop their execution path but don't affect independent paths
- State Persistence: All block outputs and execution details are preserved for debugging
Next Steps
Now that you understand execution basics, explore:
- Block Types - Learn about specific block capabilities
- Logging - Monitor workflow executions and debug issues
- Cost Calculation - Understand and optimize workflow costs
- Triggers - Set up different ways to run your workflows