Optimize
Category: AI & ML
Node id: optimize
AI-powered optimization analysis with roadmap and quick-win prioritization
What it does
- Multi-category optimization (performance, cost, scalability, security)
- Effort, risk, and impact assessment per recommendation
- Quick-win prioritization with implementation roadmaps
- Tradeoff and dependency analysis
- Budget and timeline-aware recommendations
- Overall optimization score calculation
Use cases
- Optimizing cloud infrastructure costs and resource usage
- Improving pipeline execution performance
- Security posture assessment and hardening recommendations
- Scalability analysis for growing healthcare workloads
Runtime
- Performance tier:
variable
Input ports
| Name | Type | Required | Description |
|---|---|---|---|
target | any | Yes | Code, config, workflow, or system to optimize |
context | any | No | Additional context |
current_metrics | any | No | Current performance/cost metrics |
constraints | any | No | Optimization constraints |
goals | any | No | Specific optimization goals |
budget | any | No | Budget constraints |
timeline | any | No | Implementation timeline |
stakeholders | any | No | Stakeholder requirements |
Output ports
| Name | Type | Required | Description |
|---|---|---|---|
result | json | No | Main result containing optimizations, summary, roadmap, and quick_wins |
metadata | json | No | Execution metadata including model, tokens, overall_score, and counts |
success | boolean | No | Whether the operation succeeded |
Settings
Basic
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| Provider | provider | enum | No | openai | openai, anthropic | LLM provider |
| Model | model | string | No | "" | Model name (auto-selected if empty) | |
| Optimization Type | optimization_type | enum | No | comprehensive | comprehensive, performance, cost, scalability, security | Type of optimization analysis |
| Focus | focus | string | No | "" | Specific area to focus on | |
| Include Roadmap | include_roadmap | boolean | No | true | Include implementation roadmap | |
| Prioritize Quick Wins | prioritize_quick_wins | boolean | No | true | Prioritize low-effort high-impact items |
Auth
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| API Key | api_key | secret | No | API key for the LLM provider | ||
| Base URL | base_url | string | No | "" | Custom API base URL |
Advanced
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| Temperature | temperature | number | No | 0.3 | min 0; max 1 | Sampling temperature |
| Max Tokens | max_tokens | number | No | 4000 | min 1 | Maximum tokens for response |
Errors
| Code | Description |
|---|---|
TARGET_REQUIRED | No target input was provided (code, config, or system to optimize) |
LLM_REQUEST_FAILED | LLM API call failed during optimization analysis |
UNSUPPORTED_PROVIDER | Provider must be openai or anthropic |
Runtime notes
- Each optimization in the array has title, category, priority, effort, risk, and steps fields
- If the LLM response is not valid JSON, a fallback single-optimization result is returned with the raw text
- overall_score in metadata is 0-100; it comes from the LLM analysis, not a computed metric
- The target input can be a string or JSON object; objects are marshaled to JSON before prompting
See Build any workflow for how to put nodes together and Ports, types and data flow for how port types connect.
Something unclear? Send documentation feedback by email.