Overview
Coder Tasks allow you to execute pre-defined code artifacts within your workflow. These tasks integrate the computational power of Coder Artifacts into your workflow processes. Coder Tasks are ideal for custom calculations, data transformations, and complex business logic implementation.Visual Example

Configuration Structure
Required Fields
Field | Type | Description | Required |
---|---|---|---|
name | string | Task identifier | β |
instructions | string | Task instructions | β |
code_artifact_id | integer | Reference to code artifact | β |
input_parameters | array | Input configuration | β |
expected_output | array | Output configuration | β |
dependencies | array | Task dependencies | β |
error_policy | string | Error handling strategy | β |
Input Parameters
The input parameters define what data your Coder Task will receive. These parameters will be passed to thearguments
dictionary in your Coder Artifact function.
Basic Input
Complex Input
Output Parameters
Output parameters define the structure of data that your Coder Task will return. These should match the structure returned by your Coder Artifact function.Simple Output
Complex Output
Workflow Integration
Coder Tasks act as computational nodes in your workflow, taking input from previous tasks, processing it using the referenced Coder Artifact, and outputting results for subsequent tasks.Common Use Cases
1. Data Transformation
2. Custom Calculation
3. Invoice Processing
Best Practices
1. Code Artifact Management
β Do:- Use version control for your Coder Artifacts
- Document dependencies clearly
- Include test cases with your Coder Artifacts
- Handle errors gracefully in your Python code (as shown in the Coder Artifact documentation)
- Hard-code configurations that might change
- Ignore error cases in your Coder Artifact code
- Skip input validation in your Python function
- Mix business logic between Coder Tasks and Coder Artifacts
2. Input Parameters
β Do:- Validate all inputs in your Coder Artifact code
- Document input requirements thoroughly
- Use appropriate types that match your Coder Artifact expectations
- Include examples in your documentation
- Skip validation in your Coder Artifact code
- Use ambiguous parameter names
- Ignore data types that will cause conversion issues
3. Output Handling
β Do:- Define clear output structure that matches your Coder Artifact return values
- Include error information in your response
- Add processing metadata when useful
- Validate outputs in your Coder Artifact code
- Return raw errors without context
- Skip validation of output data
- Use inconsistent formats between Coder Artifact and Coder Task configurations
β οΈ Error Handling
Configuration
Error Types
- Input Validation Errors: Occurs when input doesnβt match expected format
- Processing Errors: Occurs during execution of the Coder Artifact
- System Errors: Occurs due to system limitations or failures
π Integration Examples
With AI Task
With Data Processing
β Common Issues and Solutions
Issue | Solution |
---|---|
Code Artifact Not Found | Verify artifact ID and ensure itβs published |
Input Validation Failed | Check input types and format against Coder Artifact requirements |
Processing Error | Review error logs in your Coder Artifact and retry |
Memory Issues | Optimize data handling in your Python code |
π’ Examples by Industry
Finance
π Connection with Coder Artifacts
Coder Tasks rely on well-designed Coder Artifacts to function properly. When creating a Coder Task:- Select an existing Coder Artifact from your knowledge base
- Configure input parameters that match the expectations of your Coder Artifactβs function
- Define expected output that aligns with what your Coder Artifact function returns
- Provide clear instructions for maintainers to understand the taskβs purpose