🔄 Big News! bazed.ai is now sagentic.ai. Same vision, new name!

Skip to content

Deploy with sagentic.ai ​

Alpha: Sagentic Deployment Platform ​

We're developing a deployment platform tailored for Sagentic agents. Here's what you can expect:

  • Simple Deployment: Use npm run deploy or sagentic deploy to launch your agents.
  • Built-In Security and Scalability: Deploy with confidence knowing these are handled automatically.
  • Integrated Observability: Access logs and metrics without additional setup.
  • Self-Documenting API: Connect your agents with ease, thanks to auto-generated API documentation.

We're actively working on this platform and welcome your input.

Deploying your Agents on Sagentic Platform ​

To deploy your agents on Sagentic, you need to have a Sagentic account and an API key. You can obtain your Sagentic API key at any time by visiting the Sagentic Dashboard and clicking "ADD KEY" in the Settings tab.

Assuming you already have an account and a project set up, you can deploy your agents with the following steps:

  1. Make sure your SAGENTIC_API_KEY is set: Set your Sagentic API key as an environment variable. You can do this by adding the following line to your .env file:

    bash
    
    SAGENTIC_API_KEY=your-api-key
  2. Deploy your agent: Run the following commands to deploy your agent:

    bash
    npm run build
    npm run deploy
    bash
    yarn build
    yarn deploy

This command will build your agent and deploy it to the Sagentic platform.

  1. Check the deployment: After deploying your agent, you can invoke it using the Sagentic API. Here's an example of how to do this using curl:

    bash
     curl -X POST https://p.sagentic.ai/spawn
     -H "Authorization: Bearer your-api-key"
     -H "Content-Type: application/json" \
     -d '{
         "type": "<your-username>/<your-project>/YourAgent",
         "options": {
             # ... your agent options ...
         },
         "env": {
           "open-ai/api-key": "your-openai-api-key"
         }
     }'

To understand why <your-username>/<your-project>/YourAgent is used read more about naming conventions here.

You don't have to use curl to invoke your agents - any HTTP client will work. You can also call your agents from your own code using the Sagentic API.

Deploying from CI/CD ​

You can also deploy your agents from your CI/CD pipeline. Here's an example of how to do this using GitHub Actions:

yaml
name: Deploy to Sagentic

on:
  push:
    branches:
      - main

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Set up Node.js
        uses: actions/setup-node@v4
        with:
          node-version: "20"

      - name: Install dependencies
        run: npm install

      - name: Build
        run: npm run build

      - name: Deploy
        run: npm run deploy
        env:
          SAGENTIC_API_KEY: ${{ secrets.SAGENTIC_API_KEY }}

This example workflow will deploy your agents to Sagentic every time you push to the main branch. It uses the SAGENTIC_API_KEY secret - you'll need to set this up in your repository's secrets settings.

Sagentic Namespace and Versioning ​

Agents deployed on Sagentic are namespaced to ensure uniqueness across projects and users. This allows you to seamlessly call agents from different projects without conflicts.

For example, if your project is named my-project, and your username is my-username, your agent will be namespaced as my-username/my-project/HelloAgent.

The project name is obtained from the name field in your package.json file. The username is the same as your Sagentic username.

Agents are versioned to ensure that you can make changes to your agents without breaking existing integrations. When you deploy an agent, it will be assigned a version number based on the version field in your package.json file.

The version number is appended to the agent's name in the format my-username/my-project/HelloAgent@1.0.0. This allows you to specify the version of the agent you want to invoke. If you don't specify a version, the latest version will be used.

You can find fully qualified names for your agents in your Sagentic Dashboard by navigating to the page of your project.

Other Deployment Methods ​

Deploying with Monk.io ​

If you wish to host your agents as services on your own cloud account, we recommend using monk.io. Monk.io provides a straightforward way to get your agents deployed to any cloud in under 10 minutes. Without even writing a Dockerfile, you can deploy your agents to AWS, Azure, Google Cloud, and DigitalOcean.

See Deploying with Monk.io to get started.

Deploying with Docker ​

If you're not using Monk.io, you can deploy your agents with Docker. This is a more involved process - you'll have to do everything yourself.

See DIY Deployment for more information.