diff --git a/asb_research.py b/asb_research.py index 0afa08b6..00d778b3 100644 --- a/asb_research.py +++ b/asb_research.py @@ -1,8 +1,7 @@ -import orjson +import json from swarms import AutoSwarmBuilder - swarm = AutoSwarmBuilder( name="My Swarm", description="My Swarm Description", @@ -16,4 +15,4 @@ result = swarm.run( task="Build a swarm to write a research paper on the topic of AI" ) -print(orjson.dumps(result, option=orjson.OPT_INDENT_2).decode()) +print(json.dumps(result, indent=2)) diff --git a/examples/multi_agent/simulations/agent_map/v0/demo_simulation.py b/examples/multi_agent/simulations/agent_map/v0/demo_simulation.py index 790c1c28..2a39ec76 100644 --- a/examples/multi_agent/simulations/agent_map/v0/demo_simulation.py +++ b/examples/multi_agent/simulations/agent_map/v0/demo_simulation.py @@ -1,45 +1,11 @@ -#!/usr/bin/env python3 -""" -Demo script for the Agent Map Simulation. - -This script demonstrates how to set up and run a simulation where multiple AI agents -move around a 2D map and automatically engage in conversations when they come into -proximity with each other. - -NEW: Task-based simulation support! You can now specify what the agents should discuss: - - # Create simulation - simulation = AgentMapSimulation(map_width=50, map_height=50) - - # Add your agents - simulation.add_agent(my_agent1) - simulation.add_agent(my_agent2) - - # Run with a specific task - results = simulation.run( - task="Discuss the impact of AI on financial markets", - duration=300, # 5 minutes - with_visualization=True - ) - -Features demonstrated: -- Creating agents with different specializations -- Setting up the simulation environment -- Running task-focused conversations -- Live visualization -- Monitoring conversation activity -- Saving conversation summaries - -Run this script to see agents moving around and discussing specific topics! -""" - import time from typing import List from swarms import Agent -# Remove the formal collaboration prompt import -from simulations.agent_map_simulation import AgentMapSimulation +from examples.multi_agent.simulations.agent_map.agent_map_simulation import ( + AgentMapSimulation, +) # Create a natural conversation prompt for the simulation NATURAL_CONVERSATION_PROMPT = """ diff --git a/examples/multi_agent/simulations/agent_map/v0/example_usage.py b/examples/multi_agent/simulations/agent_map/v0/example_usage.py index dc2cc208..bbe058b8 100644 --- a/examples/multi_agent/simulations/agent_map/v0/example_usage.py +++ b/examples/multi_agent/simulations/agent_map/v0/example_usage.py @@ -7,8 +7,12 @@ what topic the agents should discuss when they meet. """ from swarms import Agent -from simulations.agent_map_simulation import AgentMapSimulation -from simulations.v0.demo_simulation import NATURAL_CONVERSATION_PROMPT +from examples.multi_agent.simulations.agent_map.agent_map_simulation import ( + AgentMapSimulation, +) +from examples.multi_agent.simulations.agent_map.v0.demo_simulation import ( + NATURAL_CONVERSATION_PROMPT, +) def create_simple_agent(name: str, expertise: str) -> Agent: diff --git a/examples/multi_agent/simulations/agent_map/v0/simple_hospital_demo.py b/examples/multi_agent/simulations/agent_map/v0/simple_hospital_demo.py index 28418122..38f723c9 100644 --- a/examples/multi_agent/simulations/agent_map/v0/simple_hospital_demo.py +++ b/examples/multi_agent/simulations/agent_map/v0/simple_hospital_demo.py @@ -19,7 +19,9 @@ CASE: 34-year-old female with sudden severe headache from typing import List from swarms import Agent -from simulations.agent_map_simulation import AgentMapSimulation +from examples.multi_agent.simulations.agent_map.agent_map_simulation import ( + AgentMapSimulation, +) def create_medical_agent( diff --git a/examples/multi_agent/simulations/agent_map/v0/test_group_conversations.py b/examples/multi_agent/simulations/agent_map/v0/test_group_conversations.py index e55877d5..2baf64ec 100644 --- a/examples/multi_agent/simulations/agent_map/v0/test_group_conversations.py +++ b/examples/multi_agent/simulations/agent_map/v0/test_group_conversations.py @@ -13,7 +13,7 @@ Run this to see agents naturally forming groups and having multi-party conversat from swarms import Agent -from simulations.agent_map_simulation import ( +from examples.multi_agent.simulations.agent_map.agent_map_simulation import ( AgentMapSimulation, Position, ) diff --git a/examples/multi_agent/simulations/agent_map/v0/test_simulation.py b/examples/multi_agent/simulations/agent_map/v0/test_simulation.py index f749bcdd..e5393a86 100644 --- a/examples/multi_agent/simulations/agent_map/v0/test_simulation.py +++ b/examples/multi_agent/simulations/agent_map/v0/test_simulation.py @@ -8,7 +8,7 @@ that all components work correctly without requiring a GUI. import time from swarms import Agent -from simulations.agent_map_simulation import ( +from examples.multi_agent.simulations.agent_map.agent_map_simulation import ( AgentMapSimulation, Position, )