Community resources docs

pull/1027/head
Kye Gomez 3 weeks ago
parent 7b0510bcd5
commit 92c9db48e1

@ -0,0 +1,36 @@
# Community Resources
Welcome to the Community Resources page! Here you'll find a curated collection of articles, tutorials, and guides created by the Swarms community and core contributors.
These resources cover a wide range of topics, including building your first agent, advanced multi-agent architectures, API integrations, and using Swarms with both Python and Rust. Whether you're a beginner or an experienced developer, these links will help you deepen your understanding and accelerate your development with the Swarms framework.
## Python
| Title | Description | Link |
|-------|-------------|------|
| **Build Your First Swarms Agent in Under 10 Minutes** | Step-by-step beginner guide to creating your first Swarms agent quickly. | [Read Article](https://medium.com/@devangvashistha/build-your-first-swarms-agent-in-under-10-minutes-ddff23b6c703) |
| **Building Multi-Agent Systems with GPT-5 and The Swarms Framework** | Learn how to leverage GPT-5 with Swarms for advanced multi-agent system design. | [Read Article](https://medium.com/@kyeg/building-multi-agent-systems-with-gpt-5-and-the-swarms-framework-e52ffaf0fa4f) |
| **Learn How to Build Production-Grade Agents with OpenAIs Latest Model: GPT-OSS Locally and in the Cloud** | Guide to building robust agents using OpenAIs GPT-OSS, both locally and in cloud environments. | [Read Article](https://medium.com/@kyeg/learn-how-to-build-production-grade-agents-with-openais-latest-model-gpt-oss-locally-and-in-the-c5826c7cca7c) |
| **Building Gemini 2.5 Agents with Swarms Framework** | Tutorial on integrating Gemini 2.5 models into Swarms agents for enhanced capabilities. | [Read Article](https://medium.com/@kyeg/building-gemini-2-5-agents-with-swarms-framework-20abdcf82cac) |
| **Enterprise Developer Guide: Leveraging OpenAIs o3 and o4-mini Models with The Swarms Framework** | Enterprise-focused guide to using OpenAIs o3 and o4-mini models within Swarms. | [Read Article](https://medium.com/@kyeg/enterprise-developer-guide-leveraging-openais-o3-and-o4-mini-models-with-the-swarms-framework-89490c57820a) |
| **Enneagram of Thoughts Using the Swarms Framework: A Multi-Agent Approach to Holistic Problem Solving** | Explores using Swarms for holistic, multi-perspective problem solving via the Enneagram model. | [Read Article](https://medium.com/@kyeg/enneagram-of-thoughts-using-the-swarms-framework-a-multi-agent-approach-to-holistic-problem-c26c7df5e7eb) |
| **Building Production-Grade Financial Agents with tickr-agent: An Enterprise Solution for Comprehensive Stock Analysis** | How to build advanced financial analysis agents using tickr-agent and Swarms. | [Read Article](https://medium.com/@kyeg/building-production-grade-financial-agents-with-tickr-agent-an-enterprise-solution-for-db867ec93193) |
| **Automating Your Startups Financial Analysis Using AI Agents: A Comprehensive Guide** | Comprehensive guide to automating your startups financial analysis with AI agents using Swarms. | [Read Article](https://medium.com/@kyeg/automating-your-startups-financial-analysis-using-ai-agents-a-comprehensive-guide-b2fa0e2c09d5) |
| **Managing Thousands of Agent Outputs at Scale with The Spreadsheet Swarm: All-New Multi-Agent Architecture** | Learn how to manage and scale thousands of agent outputs efficiently using the Spreadsheet Swarm architecture. | [Read Article](https://medium.com/@kyeg/managing-thousands-of-agent-outputs-at-scale-with-the-spreadsheet-swarm-all-new-multi-agent-f16f5f40fd5a) |
| **Introducing GPT-4o Mini: The Future of Cost-Efficient AI Intelligence** | Discover the capabilities and advantages of GPT-4o Mini for building cost-effective, intelligent agents. | [Read Article](https://medium.com/@kyeg/introducing-gpt-4o-mini-the-future-of-cost-efficient-ai-intelligence-a3e3fe78d939) |
### API
| Title | Description | Link |
|-------|-------------|------|
| **Specialized Healthcare Agents with Swarms Agent Completions API** | Guide to building healthcare-focused agents using the Swarms API. | [Read Article](https://medium.com/@kyeg/specialized-healthcare-agents-with-swarms-agent-completions-api-b56d067e3b11) |
| **Building Multi-Agent Systems for Finance & Accounting with the Swarms API: A Technical Guide** | Technical walkthrough for creating finance and accounting multi-agent systems with the Swarms API. | [Read Article](https://medium.com/@kyeg/building-multi-agent-systems-for-finance-accounting-with-the-swarms-api-a-technical-guide-bf6f7005b708) |
### Swarms Rust
| Title | Description | Link |
|-------|-------------|------|
| **Building Medical Multi-Agent Systems with Swarms Rust: A Comprehensive Tutorial** | Comprehensive tutorial for developing medical multi-agent systems using Swarms Rust. | [Read Article](https://medium.com/@kyeg/building-medical-multi-agent-systems-with-swarms-rust-a-comprehensive-tutorial-1e8e060601f9) |
| **Building Production-Grade Agentic Applications with Swarms Rust: A Comprehensive Tutorial** | Learn to build robust, production-ready agentic applications with Swarms Rust. | [Read Article](https://medium.com/@kyeg/building-production-grade-agentic-applications-with-swarms-rust-a-comprehensive-tutorial-bb567c02340f) |

@ -354,6 +354,7 @@ nav:
- CookBook Index: "examples/cookbook_index.md" - CookBook Index: "examples/cookbook_index.md"
- Paper Implementations: "examples/paper_implementations.md" - Paper Implementations: "examples/paper_implementations.md"
- Templates & Applications: "examples/templates.md" - Templates & Applications: "examples/templates.md"
- Community Resources: "examples/community_resources.md"
- Basic Examples: - Basic Examples:
- Individual Agents: - Individual Agents:
- Basic Agent: "swarms/examples/basic_agent.md" - Basic Agent: "swarms/examples/basic_agent.md"

@ -0,0 +1,20 @@
from swarms import Agent
# Initialize the agent
agent = Agent(
agent_name="Quantitative-Trading-Agent",
agent_description="Quantitative trading and analysis agent",
system_prompt="You are an expert quantitative trading agent. Answer concisely and accurately using your knowledge of trading strategies, risk management, and financial markets.",
model_name="mistral/mistral-tiny",
dynamic_temperature_enabled=True,
output_type="str-all-except-first",
max_loops="auto",
interactive=True,
no_reasoning_prompt=True,
streaming_on=True,
)
out = agent.run(
task="What are the best top 3 etfs for gold coverage?"
)
print(out)

@ -6,13 +6,14 @@ each with detailed backgrounds, political positions, and comprehensive system pr
that reflect their real-world characteristics, voting patterns, and policy priorities. that reflect their real-world characteristics, voting patterns, and policy priorities.
""" """
from functools import lru_cache
from typing import Dict, List, Optional from typing import Dict, List, Optional
from swarms import Agent
from swarms.structs.multi_agent_exec import run_agents_concurrently
from functools import lru_cache
from loguru import logger from loguru import logger
from swarms.structs.agent import Agent
from swarms.structs.conversation import Conversation from swarms.structs.conversation import Conversation
from swarms.structs.multi_agent_exec import run_agents_concurrently
@lru_cache(maxsize=1) @lru_cache(maxsize=1)

@ -96,7 +96,6 @@ from swarms.structs.swarming_architectures import (
star_swarm, star_swarm,
) )
__all__ = [ __all__ = [
"Agent", "Agent",
"BaseStructure", "BaseStructure",

@ -27,9 +27,12 @@ from pydantic import BaseModel
from swarms.agents.ape_agent import auto_generate_prompt from swarms.agents.ape_agent import auto_generate_prompt
from swarms.artifacts.main_artifact import Artifact from swarms.artifacts.main_artifact import Artifact
from swarms.prompts.agent_system_prompts import AGENT_SYSTEM_PROMPT_3 from swarms.prompts.agent_system_prompts import AGENT_SYSTEM_PROMPT_3
from swarms.prompts.max_loop_prompt import generate_reasoning_prompt
from swarms.prompts.multi_modal_autonomous_instruction_prompt import ( from swarms.prompts.multi_modal_autonomous_instruction_prompt import (
MULTI_MODAL_AUTO_AGENT_SYSTEM_PROMPT_1, MULTI_MODAL_AUTO_AGENT_SYSTEM_PROMPT_1,
) )
from swarms.prompts.react_base_prompt import REACT_SYS_PROMPT
from swarms.prompts.safety_prompt import SAFETY_PROMPT
from swarms.prompts.tools import tool_sop_prompt from swarms.prompts.tools import tool_sop_prompt
from swarms.schemas.agent_mcp_errors import ( from swarms.schemas.agent_mcp_errors import (
AgentMCPConnectionError, AgentMCPConnectionError,
@ -41,19 +44,30 @@ from swarms.schemas.base_schemas import (
ChatCompletionResponseChoice, ChatCompletionResponseChoice,
ChatMessageResponse, ChatMessageResponse,
) )
from swarms.schemas.conversation_schema import ConversationSchema
from swarms.schemas.llm_agent_schema import ModelConfigOrigin from swarms.schemas.llm_agent_schema import ModelConfigOrigin
from swarms.schemas.mcp_schemas import (
MCPConnection,
)
from swarms.structs.agent_rag_handler import ( from swarms.structs.agent_rag_handler import (
RAGConfig,
AgentRAGHandler, AgentRAGHandler,
RAGConfig,
) )
from swarms.structs.agent_roles import agent_roles from swarms.structs.agent_roles import agent_roles
from swarms.structs.conversation import Conversation from swarms.structs.conversation import Conversation
from swarms.structs.ma_utils import set_random_models_for_agents
from swarms.structs.safe_loading import ( from swarms.structs.safe_loading import (
SafeLoaderUtils, SafeLoaderUtils,
SafeStateManager, SafeStateManager,
) )
from swarms.telemetry.main import log_agent_data from swarms.telemetry.main import log_agent_data
from swarms.tools.base_tool import BaseTool from swarms.tools.base_tool import BaseTool
from swarms.tools.mcp_client_call import (
execute_multiple_tools_on_multiple_mcp_servers_sync,
execute_tool_call_simple,
get_mcp_tools_sync,
get_tools_for_multiple_mcp_servers,
)
from swarms.tools.py_func_to_openai_func_str import ( from swarms.tools.py_func_to_openai_func_str import (
convert_multiple_functions_to_openai_function_schema, convert_multiple_functions_to_openai_function_schema,
) )
@ -64,28 +78,14 @@ from swarms.utils.generate_keys import generate_api_key
from swarms.utils.history_output_formatter import ( from swarms.utils.history_output_formatter import (
history_output_formatter, history_output_formatter,
) )
from swarms.utils.litellm_tokenizer import count_tokens
from swarms.utils.litellm_wrapper import LiteLLM
from swarms.utils.pdf_to_text import pdf_to_text
from swarms.prompts.react_base_prompt import REACT_SYS_PROMPT
from swarms.prompts.max_loop_prompt import generate_reasoning_prompt
from swarms.prompts.safety_prompt import SAFETY_PROMPT
from swarms.structs.ma_utils import set_random_models_for_agents
from swarms.tools.mcp_client_call import (
execute_multiple_tools_on_multiple_mcp_servers_sync,
execute_tool_call_simple,
get_mcp_tools_sync,
get_tools_for_multiple_mcp_servers,
)
from swarms.schemas.mcp_schemas import (
MCPConnection,
)
from swarms.utils.index import ( from swarms.utils.index import (
exists, exists,
format_data_structure, format_data_structure,
) )
from swarms.schemas.conversation_schema import ConversationSchema from swarms.utils.litellm_tokenizer import count_tokens
from swarms.utils.litellm_wrapper import LiteLLM
from swarms.utils.output_types import OutputType from swarms.utils.output_types import OutputType
from swarms.utils.pdf_to_text import pdf_to_text
def stop_when_repeats(response: str) -> bool: def stop_when_repeats(response: str) -> bool:
@ -899,9 +899,9 @@ class Agent:
bool: True if model supports vision and image is provided, False otherwise. bool: True if model supports vision and image is provided, False otherwise.
""" """
from litellm.utils import ( from litellm.utils import (
supports_vision,
supports_function_calling, supports_function_calling,
supports_parallel_function_calling, supports_parallel_function_calling,
supports_vision,
) )
# Only check vision support if an image is provided # Only check vision support if an image is provided
@ -1549,11 +1549,11 @@ class Agent:
raise raise
def reliability_check(self): def reliability_check(self):
from litellm import model_list
from litellm.utils import ( from litellm.utils import (
supports_function_calling,
get_max_tokens, get_max_tokens,
supports_function_calling,
) )
from litellm import model_list
if self.system_prompt is None: if self.system_prompt is None:
logger.warning( logger.warning(

@ -5,12 +5,12 @@ from typing import Callable, List, Optional, Union
from swarms.structs.agent import Agent from swarms.structs.agent import Agent
from swarms.structs.base_swarm import BaseSwarm from swarms.structs.base_swarm import BaseSwarm
from swarms.structs.conversation import Conversation from swarms.structs.conversation import Conversation
from swarms.utils.formatter import formatter
from swarms.utils.get_cpu_cores import get_cpu_cores from swarms.utils.get_cpu_cores import get_cpu_cores
from swarms.utils.history_output_formatter import ( from swarms.utils.history_output_formatter import (
history_output_formatter, history_output_formatter,
) )
from swarms.utils.loguru_logger import initialize_logger from swarms.utils.loguru_logger import initialize_logger
from swarms.utils.formatter import formatter
logger = initialize_logger(log_folder="concurrent_workflow") logger = initialize_logger(log_folder="concurrent_workflow")

@ -23,10 +23,6 @@ MAX_WORKERS = (
os.cpu_count() * 2 os.cpu_count() * 2
) # Optimal number of workers based on CPU cores ) # Optimal number of workers based on CPU cores
###############################################################################
# 1. System Prompts for Each Scientist Agent
###############################################################################
def exa_search(query: str, **kwargs: Any) -> str: def exa_search(query: str, **kwargs: Any) -> str:
"""Performs web search using Exa.ai API and returns formatted results.""" """Performs web search using Exa.ai API and returns formatted results."""

@ -1,8 +1,8 @@
import os
import concurrent.futures import concurrent.futures
import functools import functools
import inspect import inspect
import json import json
import os
from logging import getLogger from logging import getLogger
from typing import ( from typing import (
Any, Any,

Loading…
Cancel
Save