-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathagency.py
More file actions
33 lines (25 loc) · 865 Bytes
/
agency.py
File metadata and controls
33 lines (25 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from dotenv import load_dotenv
from agency_swarm import Agency
from sales_ops import sales_ops
from sales_ops_direct_mcp import sales_ops_direct_mcp
import asyncio
load_dotenv()
# do not remove this method, it is used in the main.py file to deploy the agency (it has to be a method)
def create_agency(load_threads_callback=None):
agency = Agency(
sales_ops, sales_ops_direct_mcp,
communication_flows=[],
name="SalesOpsAgency",
shared_instructions="shared_instructions.md",
load_threads_callback=load_threads_callback,
)
return agency
if __name__ == "__main__":
agency = create_agency()
# test 1 message
# async def main():
# response = await agency.get_response("Hello, how are you?")
# print(response)
# asyncio.run(main())
# run in terminal
agency.terminal_demo()