# Getting Started with Streamline 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](/docs/documentation/streamline/cli-installation)) ## Step 1: Install the Aitronos CLI The Aitronos CLI simplifies automation development and deployment. ```bash # Install via pip pip install aitronos-cli # Verify installation aitronos --version ``` See the [CLI Installation Guide](/docs/documentation/streamline/cli-installation) for detailed instructions. ## Step 2: Authenticate Log in to your Freddy account through the CLI: ```bash 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: ```bash # 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** ```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** ```python """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** ```txt # Add your Python dependencies here requests>=2.31.0 ``` ## Step 4: Test Locally Before deploying, test your automation locally: ```bash # Install dependencies pip install -r requirements.txt # Run your automation python main.py "Test message" ``` ## Step 5: Deploy Your Automation ### Option A: Deploy via GitHub (Recommended) 1. **Create a GitHub repository**: ```bash # 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**: ```bash # 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**: ```bash 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: ```bash # 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 ```bash # Execute with default parameters aitronos streamline execute # Execute with custom parameters aitronos streamline execute \ --param message="Hello from CLI!" ``` ### Execute via API ```bash 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 ```bash # List recent executions aitronos streamline executions list # Get specific execution details aitronos streamline executions get ``` ### Check Status via API ```bash 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](/docs/documentation/streamline/scheduling)** - Run your automation on a schedule 2. **[Project Structure](/docs/documentation/streamline/project-structure)** - Learn about advanced project structures 3. **[GitHub Integration](/docs/documentation/streamline/github-deployment)** - Set up automatic deployments 4. **[Parameters & Configuration](/docs/documentation/streamline/parameters)** - Configure automation parameters 5. **[Best Practices](/docs/documentation/streamline/best-practices)** - Follow recommended patterns ## Common Issues ### Authentication Failed If you get authentication errors: ```bash # 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? - **Documentation**: [Streamline Guides](/docs/documentation/streamline/overview) - **API Reference**: [Streamline API](/docs/api-reference/streamline/introduction) - **Email**: support@aitronos.com - **Hub**: [Freddy Hub](https://freddy-hub.aitronos.com)