Skip to content
Last updated

This guide will walk you through creating and deploying your first Streamline automation.

Prerequisites

Before you begin, ensure you have:

  • A Freddy account with an active organization
  • Python 3.13+ installed locally
  • Git installed (for GitHub deployment)
  • The Aitronos CLI tool (installation guide)

Step 1: Install the Aitronos CLI

The Aitronos CLI simplifies automation development and deployment.

# Install via pip
pip install aitronos-cli

# Verify installation
aitronos --version

See the CLI Installation Guide for detailed instructions.

Step 2: Authenticate

Log in to your Freddy account through the CLI:

aitronos auth login

This will open your browser to authenticate. Once complete, your session token will be saved locally.

Step 3: Create Your First Automation

Option A: Use a Template

Download the project template to get started quickly:

# Create a new directory
mkdir my-first-automation
cd my-first-automation

# Download template
aitronos streamline template download

This creates a basic automation structure:

my-first-automation/
├── streamline.yaml # Automation configuration
├── main.py # Your automation code
├── requirements.txt # Python dependencies
└── README.md # Documentation

Option B: Create from Scratch

Create the required files manually:

streamline.yaml

name: my-first-automation
description: My first Streamline automation
execution_file: main.py
parameters:
 - name: message
 type: string
 required: false
 default: "Hello, World!"

main.py

"""My first Streamline automation."""

def main(message: str = "Hello, World!"):
 """
 Simple automation that prints a message.

 Args:
 message: The message to print
 """
 print(f"Automation says: {message}")

 return {
 "success": True,
 "message": message,
 "timestamp": "2025-11-27T10:00:00Z"
 }

if __name__ == "__main__":
 import sys
 msg = sys.argv[1] if len(sys.argv) > 1 else "Hello, World!"
 result = main(msg)
 print(result)

requirements.txt

# Add your Python dependencies here
requests>=2.31.0

Step 4: Test Locally

Before deploying, test your automation locally:

# Install dependencies
pip install -r requirements.txt

# Run your automation
python main.py "Test message"

Step 5: Deploy Your Automation

  1. Create a GitHub repository:
# Initialize git
git init
git add .
git commit -m "Initial commit"

# Create repository using CLI
aitronos streamline repo create \
 --name my-first-automation \
 --description "My first Streamline automation" \
 --private
  1. Push your code:
# Add remote (URL provided by CLI)
git remote add origin https://github.com/your-username/my-first-automation.git
git branch -M main
git push -u origin main
  1. Deploy to Streamline:
aitronos streamline deploy \
 --repo https://github.com/your-username/my-first-automation.git \
 --branch main \
 --name "My First Automation"

The CLI will:

  • Upload your automation to Streamline
  • Set up GitHub webhook for automatic sync
  • Return your automation ID

Option B: Manual Upload

Upload directly without Git:

# Create a ZIP file
zip -r automation.zip . -x "*.git*" -x "*__pycache__*" -x "*.pyc"

# Upload to Streamline
aitronos streamline upload \
 --file automation.zip \
 --name "My First Automation"

Step 6: Execute Your Automation

Execute via CLI

# Execute with default parameters
aitronos streamline execute <automation-id>

# Execute with custom parameters
aitronos streamline execute <automation-id> \
 --param message="Hello from CLI!"

Execute via API

curl -X POST "https://api.aitronos.com/v1/streamline/automations/{automation_id}/execute" \
 -H "Authorization: Bearer $FREDDY_SESSION_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{
 "parameters": {
 "message": "Hello from API!"
 },
 "return_mode": "wait"
 }'

Step 7: View Execution Results

Check Status via CLI

# List recent executions
aitronos streamline executions list <automation-id>

# Get specific execution details
aitronos streamline executions get <execution-id>

Check Status via API

curl "https://api.aitronos.com/v1/streamline/executions/{execution_id}" \
 -H "Authorization: Bearer $FREDDY_SESSION_TOKEN"

Next Steps

Now that you have your first automation running:

  1. Add Scheduling - Run your automation on a schedule
  2. Project Structure - Learn about advanced project structures
  3. GitHub Integration - Set up automatic deployments
  4. Parameters & Configuration - Configure automation parameters
  5. Best Practices - Follow recommended patterns

Common Issues

Authentication Failed

If you get authentication errors:

# Re-authenticate
aitronos auth login

# Verify your session
aitronos auth whoami

Deployment Failed

Check your streamline.yaml configuration:

  • Ensure execution_file points to the correct file
  • Verify all required parameters are defined
  • Check that your Python code has no syntax errors

Execution Timeout

If your automation times out:

  • Default timeout is 300 seconds (5 minutes)
  • Optimize your code for better performance
  • Contact support for increased timeout limits

Support

Need help?