Edit a Specific Component
Modify individual Agents, Flows, or Actions in detail
Overview
This tutorial focuses on editing individual components (Agents, Flows, Actions) within a Project. You'll learn component-specific techniques for each type.
Time required: 10-15 minutes per component type
Editing Actions
Actions are Python functions with inputs, outputs, and dependencies.
Opening an Action
- In the Builder workspace, double-click the Action node on the Canvas
- The Properties Panel shows:
- Content tab — Code editor for
Action.py - Input/Output tab — Schema definition
- Requirements — Python dependencies
- Content tab — Code editor for
Modifying the code
Example: Add logging to a data processing Action
Select the Action
Open Properties → Content
Update the code:
import loggingfrom typing import Dict, Listlogger = logging.getLogger(__name__)def process_data(data: List[Dict]) -> List[Dict]: logger.info(f"Processing {len(data)} items") processed = [] for item in data: try: # processing logic result = transform(item) processed.append(result) except Exception as e: logger.error(f"Failed to process item: {e}") continue logger.info(f"Successfully processed {len(processed)} items") return processedUpdate
requirements.txtif adding dependenciesClick Test to run with sample input
Save (auto-saves)
Changing input/output schema
Go to Properties → Input/Output
Modify the schema:
- Add new fields
- Change types
- Update descriptions
- Set required vs. optional
Update the code to match
Test with new schema
Best practices for Actions
Keep them focused — One clear purpose per Action
Type everything — Use proper type hints for all parameters
Handle errors — Don't let exceptions propagate unhandled
Test independently — Each Action should work standalone
Editing Flows
Flows are graphs of connected nodes.
Opening a Flow
- Click the Flow node
- The Canvas zooms into the Flow's internal structure
- You see: Input node, processing nodes, Output node, edges
Adding nodes
Via Triton:
- Ask: "Add a data validation Action to this Flow"
- Triton adds the node and suggests connections
Manually:
- Right-click the Canvas
- Select Add Node
- Choose from: Actions, Agents, sub-Flows
- Drag to position
Connecting nodes
- Click and drag from an output port
- Drop on an input port of another node
- The edge shows data flow direction
- Orange edges = control flow, Blue edges = data flow
Modifying the structure
Serial to parallel conversion:
Before (serial):
Input → Action A → Action B → Action C → OutputAfter (parallel):
Input → Action A ↘ Action B → Merge → Output Action C ↗Steps:
- Add a Merge/Join node
- Disconnect B and C from serial chain
- Connect both to Merge
- Connect Merge to Output
Conditional routing
Add branching logic:
- Add a Router node (or use Agent to decide)
- Connect multiple output paths
- Each path processes different scenarios
- Reconnect at a Merge node if needed
Example:
Input → Router → [if premium] → Enhanced Processing → Output → [if basic] → Standard Processing → OutputBest practices for Flows
Left to right — Arrange nodes in execution order
Group visually — Related nodes should be close together
Name clearly — Label nodes with their purpose
Test incrementally — Verify each section works before adding more
Editing Agents
Agents are LLM-powered components with prompts and tools.
Opening an Agent
- Double-click the Agent node
- Properties Panel shows:
- Content tab — Prompts and model config
- Toolbox — Available tools (Actions/Flows)
- Execute tab — Testing interface
Modifying the System Prompt
The System Prompt defines the Agent's behavior.
Example: Improve a customer service Agent
Before:
You are a helpful assistant.After:
You are a customer service expert for TechCorp, specializing insubscription management and technical support. Guidelines:- Always be polite and professional- Verify the user's identity before accessing account information- Offer solutions, not just explanations- Escalate to human support if unable to resolve- Document all actions taken in the conversationAvailable tools:- check_subscription_status: Get current subscription details- update_billing: Modify billing information- reset_password: Send password reset email- escalate_to_human: Transfer to human supportAlways confirm actions before executing them.Adding/removing tools
- Go to Properties → Content → Toolbox
- Click Add Tool
- Select from available Actions/Flows
- Tools appear in the Agent's context
- Update the System Prompt to mention new tools
Configuring model parameters
Adjust for your use case:
Testing Agent changes
Go to Properties → Execute
Enter a test message or payload:
{ "messages": [ {"role": "user", "content": "I need to cancel my subscription"} ]}Click Execute
Review:
- Agent's response
- Tools called
- Reasoning/chain of thought
- Token usage
Iterate on prompts based on results
Best practices for Agents
Be specific — Vague prompts lead to unpredictable behavior
Limit tools — Too many options confuse the Agent
Test edge cases — Try to break it with unusual inputs
Monitor usage — Track token costs and latency
Using Triton for edits
Triton can help with all component types:
For Actions
- "Add error handling to this Action"
- "Optimize this function for large datasets"
- "Add logging at each step"
For Flows
- "Add parallel processing to this Flow"
- "Insert a validation step after the input"
- "Add error routing to this Flow"
For Agents
- "Make this Agent more concise in responses"
- "Add a tool for checking inventory"
- "Improve the prompt for customer service"
Version management
Track changes to components:
Export before major changes
- Right-click component → Export
- Save the JSON locally
Meaningful naming
- Rename nodes with version info if needed
CustomerServiceAgent_v2
Test before overwriting
- Create a copy to test changes
- Compare performance
- Merge if improvement is confirmed
Common editing scenarios
Scenario 1: Action is too slow
Diagnosis: Profile the Action, find bottlenecks
Solutions:
- Add caching for expensive operations
- Use async/await for I/O operations
- Batch API calls instead of one-by-one
- Optimize algorithms (O(n²) → O(n log n))
Scenario 2: Flow produces wrong output
Diagnosis: Trace the data through each node
Solutions:
- Check schema mismatches between nodes
- Add logging to intermediate nodes
- Test each node individually
- Verify edge connections are correct
Scenario 3: Agent doesn't use tools
Diagnosis: Prompt doesn't encourage tool use
Solutions:
- Explicitly instruct: "Use available tools to answer"
- Provide examples of tool usage in prompt
- Reduce temperature for more deterministic behavior
- Simplify tool descriptions
Scenario 4: Component works in test, fails in production
Diagnosis: Environment differences
Solutions:
- Check Project Variables are set in production
- Verify API keys and credentials
- Review rate limits and quotas
- Check for hardcoded values (don't do this!)
Next steps
Continue exploring the documentation to learn about building new Projects, integrating them into your apps, and understanding Actions, Agents, and Flows.
Was this helpful?
More in Tutorials
Build a New ProjectStill need help? Ask the team