runtara-agents
Built-in agent implementations for Runtara workflows. Provides ready-to-use integrations for HTTP, SFTP, CSV, XML, and data transformation.
Overview
Agents are reusable components that execute specific operations within workflows. This crate provides:
- HTTP Agent: Make HTTP requests with authentication support
- SFTP Agent: Upload and download files via SFTP
- CSV Agent: Parse and generate CSV data
- XML Agent: Parse XML documents and extract data
- Transform Agent: Map, filter, and transform data
- Text Agent: String manipulation and formatting
- Utils Agent: Utilities like random generation, hashing, encoding
Installation
Add to your Cargo.toml:
[]
= "1.0"
Built-in Agents
HTTP Agent
Make HTTP requests with various authentication methods:
use http;
// Simple GET request
let response = request.await?;
println!;
println!;
Capabilities:
request: Generic HTTP request- Supports Bearer tokens, API keys, and basic auth via connection extractors
SFTP Agent
Transfer files via SFTP:
use sftp;
// Upload a file
upload.await?;
// Download a file
let result = download.await?;
println!;
Capabilities:
upload: Upload file content to remote pathdownload: Download file from remote pathlist: List directory contents
CSV Agent
Parse and generate CSV data:
use csv;
// Parse CSV string
let result = parse.await?;
for row in result.rows
// Generate CSV from records
let output = generate.await?;
println!;
Capabilities:
parse: Parse CSV string to structured datagenerate: Generate CSV from records
XML Agent
Parse XML documents:
use xml;
let result = parse.await?;
// Access parsed structure
println!;
Capabilities:
parse: Parse XML to JSON structureextract: Extract values using XPath-like expressions
Transform Agent
Transform and map data:
use transform;
// Map fields between structures
let result = map_fields.await?;
// Filter array
let filtered = filter.await?;
Capabilities:
map-fields: Map and transform fields using templatesfilter: Filter arrays based on conditionsmerge: Merge multiple objects
Text Agent
String manipulation:
use text;
// Format string with template
let result = format.await?;
// Split string
let parts = split.await?;
Capabilities:
format: Format strings with templates (Jinja2-like)split: Split string into arrayjoin: Join array into stringreplace: Find and replace
Utils Agent
Utility operations:
use utils;
// Generate random string
let random = random_string.await?;
// Hash data
let hash = hash.await?;
// Base64 encode/decode
let encoded = base64_encode.await?;
Capabilities:
random-string: Generate random stringshash: SHA-256 hashingbase64-encode/base64-decode: Base64 encoding
Connection Extractors
Agents support automatic credential extraction from connection configurations:
use ;
// Extract Bearer token for HTTP requests
let extractor = new;
let headers = extractor.extract?;
// Extract API key
let extractor = new;
let headers = extractor.extract?;
// Extract SFTP credentials
let extractor = new;
let credentials = extractor.extract?;
Agent Registry
Access all registered agents programmatically:
use get_all_agents;
let agents = get_all_agents;
for agent in agents
Related Crates
runtara-dsl- DSL type definitionsruntara-agent-macro- Define custom agentsruntara-workflow-stdlib- Standard library including these agents
License
This project is licensed under AGPL-3.0-or-later.