You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
swarms/docs/examples/basic_examples_overview.md

4.0 KiB

Basic Examples Overview

Start your Swarms journey with single-agent examples. Learn how to create agents, use tools, process images, integrate with different LLM providers, and publish to the marketplace.

What You'll Learn

Topic Description
Agent Basics Create and configure individual agents
Tool Integration Equip agents with callable tools and functions
Vision Capabilities Process images and multi-modal inputs
LLM Providers Connect to OpenAI, Anthropic, Groq, and more
Utilities Streaming, output types, and marketplace publishing

Individual Agent Examples

Core Agent Usage

Example Description Link
Basic Agent Fundamental agent creation and execution View Example

Tool Usage

Example Description Link
Agents with Vision and Tool Usage Combine vision and tools in one agent View Example
Agents with Callable Tools Equip agents with Python functions as tools View Example
Agent with Structured Outputs Get consistent JSON/structured responses View Example
Message Transforms Manage context with message transformations View Example

Vision & Multi-Modal

Example Description Link
Agents with Vision Process and analyze images View Example
Agent with Multiple Images Handle multiple images in one request View Example

Utilities

Example Description Link
Agent with Streaming Stream responses in real-time View Example
Agent Output Types Different output formats (str, json, dict, yaml) View Example
Gradio Chat Interface Build chat UIs for your agents View Example
Agent with Gemini Nano Banana Jarvis-style agent example View Example
Agent Marketplace Publishing Publish agents to the Swarms marketplace View Example

LLM Provider Examples

Connect your agents to various language model providers:

Provider Description Link
Overview Guide to all supported providers View Guide
OpenAI GPT-4, GPT-4o, GPT-4o-mini integration View Example
Anthropic Claude models integration View Example
Groq Ultra-fast inference with Groq View Example
Cohere Cohere Command models View Example
DeepSeek DeepSeek models integration View Example
Ollama Local models with Ollama View Example
OpenRouter Access multiple providers via OpenRouter View Example
XAI Grok models from xAI View Example
Azure OpenAI Enterprise Azure deployment View Example
Llama4 Meta's Llama 4 models View Example
Custom Base URL Connect to any OpenAI-compatible API View Example

Next Steps

After mastering basic agents, explore: