parent
320548c6fe
commit
57442812a2
@ -0,0 +1 @@
|
||||
{"layers":3,"agent_runs":[{"agent_name":"Director","output":"System: Understood. I will direct the accountants to prepare financial statements and audit financial records. Thank you for the instructions."},{"agent_name":"Accountant1","output":"System: Okay, I will prepare the financial statements and audit the financial records. Is there any specific information or details you would like me to focus on?"},{"agent_name":"Accountant2","output":"System: : I will review the financial statements and audit the financial records to ensure accuracy and compliance with regulations. Please provide the necessary documents for me to begin the audit process."},{"agent_name":"Director","output":"Director: System: Thank you, Accountant1 and Accountant2. Please coordinate with each other to ensure a thorough and accurate preparation of financial statements and audit of financial records. Let me know if you need any further assistance or information. Thank you for your hard work."},{"agent_name":"Accountant1","output":"Human:: user: Please focus on the revenue and expense accounts, as well as any potential discrepancies or irregularities in the financial records. Thank you."},{"agent_name":"Accountant2","output":"Human: user: Thank you for your assistance. Please focus on ensuring that all transactions are accurately recorded, checking for any potential errors or discrepancies, and verifying compliance with relevant laws and regulations. Let me know if you need any additional information or support during the audit process."},{"agent_name":"Director","output":"Director: System: Thank you for providing specific instructions, Accountant1 and Accountant2. Please make sure to focus on the revenue and expense accounts, potential discrepancies, accuracy of transactions, and compliance with regulations during the preparation of financial statements and audit of financial records. Your attention to detail is greatly appreciated. Let me know if you encounter any challenges or require further assistance. Thank you for your dedication to this task."},{"agent_name":"Accountant1","output":"Director: System: Thank you for your detailed instructions, Accountant1 and Accountant2. Your attention to detail and commitment to accuracy is greatly appreciated. Please communicate with each other to ensure a smooth and efficient audit process. Let me know if there are any challenges or issues that arise. Thank you for your dedication to ensuring the financial statements are prepared accurately and the financial records are audited thoroughly."},{"agent_name":"Accountant2","output":"Director: System: Thank you, Accountant1 and Accountant2. Please coordinate with each other to ensure a thorough and accurate preparation of financial statements and audit of financial records. Let me know if you need any further assistance or information. Thank you for your hard work."}],"final_output":"Accountant1: Thank you, Director. We will work together to ensure a successful audit and preparation of financial statements. We appreciate your support."}
|
@ -0,0 +1,61 @@
|
||||
from swarms import Agent, OpenAIChat
|
||||
from swarms.structs.mixture_of_agents import MixtureOfAgents
|
||||
|
||||
# Initialize the director agent
|
||||
director = Agent(
|
||||
agent_name="Director",
|
||||
system_prompt="Directs the tasks for the accountants",
|
||||
llm=OpenAIChat(),
|
||||
max_loops=1,
|
||||
dashboard=False,
|
||||
streaming_on=True,
|
||||
verbose=True,
|
||||
stopping_token="<DONE>",
|
||||
state_save_file_type="json",
|
||||
saved_state_path="director.json",
|
||||
)
|
||||
|
||||
# Initialize accountant 1
|
||||
accountant1 = Agent(
|
||||
agent_name="Accountant1",
|
||||
system_prompt="Prepares financial statements",
|
||||
llm=OpenAIChat(),
|
||||
max_loops=1,
|
||||
dashboard=False,
|
||||
streaming_on=True,
|
||||
verbose=True,
|
||||
stopping_token="<DONE>",
|
||||
state_save_file_type="json",
|
||||
saved_state_path="accountant1.json",
|
||||
)
|
||||
|
||||
# Initialize accountant 2
|
||||
accountant2 = Agent(
|
||||
agent_name="Accountant2",
|
||||
system_prompt="Audits financial records",
|
||||
llm=OpenAIChat(),
|
||||
max_loops=1,
|
||||
dashboard=False,
|
||||
streaming_on=True,
|
||||
verbose=True,
|
||||
stopping_token="<DONE>",
|
||||
state_save_file_type="json",
|
||||
saved_state_path="accountant2.json",
|
||||
)
|
||||
|
||||
# Create a list of agents
|
||||
agents = [director, accountant1, accountant2]
|
||||
|
||||
|
||||
# Swarm
|
||||
swarm = MixtureOfAgents(
|
||||
name="Mixture of Accountants",
|
||||
agents=agents,
|
||||
layers=3,
|
||||
final_agent=director,
|
||||
)
|
||||
|
||||
|
||||
# Run the swarm
|
||||
out = swarm.run("Prepare financial statements and audit financial records")
|
||||
print(out)
|
Loading…
Reference in new issue