-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathagent.py
More file actions
36 lines (27 loc) · 971 Bytes
/
Copy pathagent.py
File metadata and controls
36 lines (27 loc) · 971 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
34
35
36
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.tools.tavily import TavilyTools
from agno.storage.sqlite import SqliteStorage
from agno.playground import Playground, serve_playground_app
from transcription_reader import get_creator_transcriptions, list_available_creators
from dotenv import load_dotenv
load_dotenv()
copywriter = Agent(
model=OpenAIChat(id="gpt-4.1-mini"),
name="copywriter",
add_history_to_messages=True,
num_history_runs=10,
storage=SqliteStorage(table_name="agent_sessions",
db_file="tmp/storage.db"),
tools=[
TavilyTools(),
list_available_creators,
get_creator_transcriptions
],
show_tool_calls=True,
instructions=open("prompts/copywriter.md").read()
)
playground = Playground(agents=[copywriter]).get_app()
if __name__ == "__main__":
serve_playground_app(playground,
port=8000)