Overview
Once you’ve defined your Project description (and possibly requirements), Triton can build it for you. This guide covers how to effectively use Triton to generate components, connect them, and get a working system.Building Actions
Actions are Python functions that do specific tasks.Basic Action creation
You: “Create an Action that fetches data from a REST API” Triton generates:Action.pywith:- Function signature
- Type hints
- Error handling
- Documentation
- Input/output schema
requirements.txtwith dependencies
Action with specific requirements
You: “Create an Action that validates email addresses using a regex and checks against our blocklist in Project Variables” Triton:- Generates regex pattern
- Adds Global Variable reference
- Includes validation logic
- Tests it
Action with API integration
You: “Create an Action that integrates with the Stripe API” Triton:- Uses the Knowledge Store to research API documentation and best practices
- Generates proper API authentication code
- Creates comprehensive testing flows
- Handles errors and edge cases
- Caches API research for future reference
- Research external APIs intelligently
- Store and retrieve API integration patterns
- Generate better code with real-world API understanding
- Test API integrations comprehensively
Action with OAuth integration
You: “Create an Action that sends emails via Gmail” Triton:- Generates the action code with OAuth token access
- Uses
get_oauth_token('google')for authentication - Implements Gmail API calls with proper error handling
- Prompts you to configure OAuth modifier for Google
- Knows which OAuth providers are available (Google, Slack, GitHub, etc.)
- Generates proper token access patterns
- Handles token refresh transparently
- Includes error handling for OAuth failures
- Prompts you to configure the OAuth modifier before execution
Data transformation Action
You: “Create an Action that takes a list of user objects and returns just their email addresses” Triton generates:Action with loops
You: “Create an Action that processes a batch of orders with retry logic” Triton generates:- Action with for loop to iterate over orders
- While loop for retry logic with exponential backoff
- Proper loop state management
- Error handling for individual items
Building Agents
Agents are LLM-powered components with prompts and tools.Simple Agent
You: “Create an Agent that summarizes text” Triton creates:- System prompt:
- Input schema:
{ "text": "string" } - Output schema:
{ "summary": "string" } - Model: GPT-4 (default)
Agent with tools
You: “Create an Agent that answers questions about our product catalog using a search Action” Triton:- First checks if
search_catalogAction exists - If not, asks: “Should I create the search_catalog Action first?”
- Creates the Action
- Creates the Agent with:
- System prompt mentioning available tools
- Tools configuration including
search_catalog - Examples of tool usage
Decision-making Agent
You: “Create an Agent that triages support tickets into urgent/normal/low priority” Triton creates:- Detailed system prompt with triage criteria
- Input schema:
{ "ticket": { "subject": "string", "body": "string", "user_tier": "string" } } - Output schema:
{ "priority": "enum", "reason": "string", "suggested_assignment": "string" } - Lower temperature (0.3) for consistent decisions
Building Flows
Flows connect components into workflows.Linear Flow
You: “Create a Flow that validates input, processes it, and returns results” Triton creates:Parallel processing Flow
You: “Create a Flow that fetches data from 3 different sources simultaneously, then combines the results” Triton creates:- Parallel execution of fetch Actions
- Combine node that waits for all inputs
- Proper error handling if any source fails
Building complete Projects
Combine everything into a Project.End-to-end example
You: “Build a complete Project for processing customer feedback: collect feedback, analyze sentiment, extract themes, generate report” Triton creates: 1. Actions:validate_feedback— Check feedback formatstore_feedback— Save to databasegenerate_report— Format results
analyze_feedback— Sentiment analysis and theme extraction
- Exposes the main Flow as the Project entry point
- Configured with input/output schemas
- Ready to deploy
Incremental building
You don’t have to build everything at once: You: “Start a new Project called ‘Email Processor‘“Triton: Creates empty Project You: “Add an Action to parse email headers”
Triton: Creates
parse_headers Action
You: “Add an Agent to classify emails”Triton: Creates
classify_email Agent
You: “Connect them in a Flow”Triton: Creates Flow linking parse_headers → classify_email You: “Add error handling for malformed emails”
Triton: Adds validation Action and error routing
Building with context
Triton understands your existing work.Building on existing components
You: “Create a new Flow that uses my existing Actions: fetch_data and process_results” Triton:- Scans your Project
- Finds both Actions
- Creates Flow with proper connections
- Uses correct input/output schemas
Consistent naming and patterns
You: “Add another Action similar to fetch_user_data but for products” Triton:- Reviews
fetch_user_dataimplementation - Creates
fetch_product_datawith similar structure - Maintains consistent error handling
- Uses same coding style
Building variants
You: “Create a version of this Agent that’s more concise” Triton:- Copies existing Agent
- Modifies system prompt for brevity
- Names it
{original_name}_concise - Keeps same tools and config
Building best practices
Start with the core path — Build the main workflow first, add enhancements later
Test as you go — Use Execute panel to verify each component
Be specific about behavior — Tell Triton exactly what you want, including edge cases
Let Triton suggest — If unsure, ask “How should I structure this?”
Review generated code — Always check what Triton built before deploying
Common building patterns
Pattern: Extract-Transform-Load (ETL)
You: “Build an ETL pipeline for customer data” Triton creates:- Extract Action (API/database/file)
- Transform Agent/Action (cleanse, normalize)
- Load Action (destination)
- Flow connecting them with error handling
Pattern: Request-Process-Notify
You: “Build a workflow that takes requests, processes them, and notifies users” Triton creates:- Validation Action
- Processing Agent/Flow
- Notification Action (email/webhook)
- Status tracking
Pattern: Fan-out/Fan-in
You: “Process 100 items in parallel, then aggregate results” Triton creates:- Splitter (fan-out)
- Processing Action (parallel)
- Aggregator (fan-in)
- Flow with proper concurrency
Pattern: Retry with backoff
You: “Call this API with automatic retries” Triton adds:- Retry decorator
- Exponential backoff
- Max attempts configuration
- Logging
Troubleshooting building
Problem: Triton doesn’t understand the request
Solution: Break it down- ❌ “Build the whole system”
- ✅ “First, create an Action that validates input”
Problem: Generated code doesn’t match needs
Solution: Provide examples- “Create an Action like this: [paste example]”
- “The output should look like: [paste JSON]“
Problem: Components aren’t connecting properly
Solution: Be explicit- “Connect the output of fetch_data to the input of process_data”
- “Map the ‘results’ field to ‘data’ in the next node”
Problem: Missing error handling
Solution: Ask for it- “Add try-catch to handle network failures”
- “What if the input is empty?”
Next steps
After building:- Test each component with Execute panel
- Edit and refine as needed
- Debug any issues
- Deploy your Project