SwarmZero Docs
Main WebsitePricingGitHubDiscordX
  • GETTING STARTED
    • Welcome
    • Developing on SwarmZero
    • Quickstart
    • Key Concepts
      • AI
      • ML
      • LLM
      • AI Agents
      • Swarms
    • Contributing to SwarmZero
  • SDK
    • Agent Kit
    • Agent API Schema
    • Observability
      • Langtrace
      • OpenLIT
      • AgentOps
  • EXAMPLES
    • AI Agents
      • Build a Dune Agent with SwarmZero.ai
      • Build a News Agent with SwarmZero.ai using the GDELT API
      • Build a Uniswap Docs Retrieval Agent with SwarmZero.ai
      • Build an AAVE AI Agent to Lend and Borrow Crypto
      • Build & Monitor a Web Search Agent
      • Build a Multi-Chain Crypto Trading Telegram Bot with SwarmZero, Bitquery and DEXRabbit
    • Swarms
      • AI Researcher Swarm
      • Build a Web3 dApp with a Swarm of AI Agents
      • Livepeer Youtube Video Generator Swarm
    • Tools
      • Tools for Building Agents with Livepeer
      • Tools for Building Agents with Dune
      • YouTube Video Editor & Upload Tools
      • File Operations Tools
Powered by GitBook
LogoLogo

Quick Links

  • Main Website
  • Pricing
  • GitHub
  • Discord

© 2025 SwarmZero Technology Solutions Inc. All rights reserved.

On this page

Was this helpful?

  1. GETTING STARTED

Quickstart

PreviousDeveloping on SwarmZeroNextKey Concepts

Last updated 6 months ago

Was this helpful?

Here is a quick tutorial to build and run a simple AI Agent with SwarmZero.ai

Project Requirements
  • Python >= 3.11

Setup

First import the Agent class:

from swarmzero import Agent

Load your environment variables:

from dotenv import load_dotenv
load_dotenv()
Create an Instance and Run the Agent

Then create an Agent instance:

my_agent = Agent(
    name="my_agent",
    functions=[],
    instruction="your instructions for this agent's goal",
)

my_agent.run()
Call the Agent

Finally, call the API endpoint, /api/v1/chat, to see the result:

curl --request POST \
  --url http://localhost:8000/api/v1/chat \
  --header 'Content-Type: multipart/form-data' \
  --form 'user_id="test"' \
  --form 'session_id="test"' \
  --form 'chat_data={ "messages": [ { "role": "user", "content": "Who is Satoshi Nakamoto?" } ] }'

For more clarification and other examples of code, read the tutorial .

here