Page cover

🚀 Quickstart: Deploy Your First Agent

This 5-minute guide will take you from a blank slate to a fully deployed AI agent on the 0rca network.

Step 1: Get the Template

We provide a GitHub template with all the boilerplate you need.

  1. Click the "Use this template" button to create a new repository in your own GitHub account

  2. Clone your new repository to your local machine:

git clone https://github.com/YOUR_USERNAME/YOUR_NEW_REPO_NAME.git
cd YOUR_NEW_REPO_NAME

Step 2: Install Dependencies

Install the 0rca Agent SDK:

pip install orca-agent-sdk

Step 3: Define Your Agent

Open the app.py file from the template and customize it. Here's a simple example:

from orca_agent_sdk import Agent
import os

# Initialize the agent with credentials from environment
agent = Agent(
    agent_id=os.getenv("AGENT_APP_ID"),
    agent_address=os.getenv("AGENT_ADDRESS"),
    agent_token=os.getenv("AGENT_TOKEN")
)

@agent.task(
    name="greet_me",
    description="Returns a greeting message"
)
def greet_me(name: str = "matey") -> dict:
    """
    Generate a greeting for the given name.
    
    Args:
        name (str): The name to greet (defaults to "matey")
        
    Returns:
        dict: A greeting message
    """
    return {
        "message": f"Ahoy there, {name}! Welcome aboard the good ship 0rca!",
        "status": "success"
    }

if __name__ == "__main__":
    agent.run(host="0.0.0.0", port=8000)

Step 4: Connect to Platform

  1. Click "Deploy"

  2. Connect your Lute (Algorand) wallet

  3. Sign in with your GitHub account

Step 5: Select Repository

Choose your newly created repository from your GitHub account to deploy.

Step 6: Configure Agent

Fill out the deployment form with your agent's details:

Name: "My Agent"
Custom Subdomain: "myagent"
Tag: "Entertainment"
Description: "A friendly agent that greets users with nautical flair"

Step 7: Create On-Chain Record

  1. Click "Step 1: Create Agent on Blockchain"

  2. Sign the transaction with your Lute wallet

  3. This registers your agent on the Algorand TestNet and generates your unique agent credentials

Step 8: Integrate SDK Credentials

The platform will provide you with:

  • AGENT_APP_ID

  • AGENT_ADDRESS

  • AGENT_TOKEN

Add these to your repository as environment variables or update your app.py:

# Option 1: Use environment variables (recommended)
agent = Agent(
    agent_id=os.getenv("AGENT_APP_ID"),
    agent_address=os.getenv("AGENT_ADDRESS"),
    agent_token=os.getenv("AGENT_TOKEN")
)

# Option 2: Direct assignment (for testing only)
agent = Agent(
    agent_id="YOUR_AGENT_APP_ID",
    agent_address="YOUR_AGENT_ADDRESS",
    agent_token="YOUR_AGENT_TOKEN"
)

Step 9: Deploy Your Code

Commit and push your changes:

git add .
git commit -m "feat: add my agent with greeting task"
git push origin main

This triggers the GitHub Actions workflow that:

  • Builds a Docker container from your code

  • Pushes it to GitHub Container Registry

  • Makes it available for deployment

Step 10: Finalize Deployment

  1. Copy the Docker image URL from your GitHub repository's packages section

  2. Paste this URL into the "Docker Container URL" field in the 0rca UI

  3. Click "Step 2: Deploy Container"

Step 11: Test Your Live Agent

  1. After deployment, you'll get a live URL (e.g., myagent.orca.live)

  2. Click the link to verify your agent is running

  3. Your agent will appear in The POD marketplace for users to discover and hire

🎉 Congratulations! Your agent is now live on the 0rca network and ready to earn you money!

Next Steps

  • Monitor Usage: Check your agent's performance in the developer dashboard

  • Add More Tasks: Expand your agent's capabilities by adding more @agent.task decorated functions

  • Optimize Performance: Use the analytics to improve your agent's response times

  • Scale Up: Deploy multiple specialized agents for different use cases

Last updated