Skip to content

Commit 14ac72b

Browse files
committed
Merge branch 'main' of https://github.com/agno-agi/agno into release-1.5.5
2 parents 5e538de + d6b9aeb commit 14ac72b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1309
-172
lines changed

cookbook/agent_concepts/memory/playground.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,20 @@
4444
)
4545

4646

47-
app = Playground(agents=[agent]).get_app()
47+
playground = Playground(
48+
agents=[
49+
agent,
50+
],
51+
app_id="memory-playground-app",
52+
name="Memory Playground",
53+
)
54+
app = playground.get_app()
4855

4956
if __name__ == "__main__":
50-
serve_playground_app("playground:app")
57+
# Start the playground server
58+
playground.serve(
59+
app="playground:app",
60+
host="localhost",
61+
port=7777,
62+
reload=True,
63+
)

cookbook/agent_concepts/rag/agentic_rag_agent_ui.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,20 @@
4646
markdown=True,
4747
)
4848

49-
app = Playground(agents=[rag_agent]).get_app()
49+
playground = Playground(
50+
agents=[
51+
rag_agent,
52+
],
53+
app_id="agentic-rag-agent-ui-app",
54+
name="Agentic RAG Agent UI",
55+
)
56+
app = playground.get_app()
5057

5158
if __name__ == "__main__":
52-
# Load the knowledge base: Comment after first run as the knowledge base is already loaded
5359
knowledge_base.load(upsert=True)
54-
serve_playground_app("agentic_rag_agent_ui:app", reload=True)
60+
playground.serve(
61+
app="agentic_rag_agent_ui:app",
62+
host="localhost",
63+
port=7777,
64+
reload=True,
65+
)

cookbook/agents_from_scratch/playground.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,18 @@
2323

2424
if __name__ == "__main__":
2525
# Run the playground app
26-
serve_playground_app("playground:app", reload=True)
26+
playground = Playground(
27+
agents=[
28+
simple_agent,
29+
agent_with_tools,
30+
agent_with_knowledge,
31+
agent_with_storage,
32+
agno_assist,
33+
],
34+
app_id="agents-from-scratch-playground-app",
35+
name="Agents from Scratch Playground",
36+
)
37+
app = playground.get_app()
38+
39+
if __name__ == "__main__":
40+
playground.serve(app="playground:app", reload=True)

cookbook/apps/fastapi/basic.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,14 @@
1212
markdown=True,
1313
)
1414

15-
app = FastAPIApp(
15+
fastapi_app = FastAPIApp(
1616
agent=basic_agent,
17-
).get_app()
17+
name="Basic Agent",
18+
app_id="basic_agent",
19+
description="A basic agent that can answer questions and help with tasks.",
20+
)
21+
22+
app = fastapi_app.get_app()
1823

1924
if __name__ == "__main__":
20-
serve_fastapi_app("basic:app", port=8001, reload=True)
25+
fastapi_app.serve(app="basic:app", port=8001, reload=True)

cookbook/apps/fastapi/study_friend.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,14 @@
8484
markdown=True,
8585
)
8686

87-
app = FastAPIApp(
87+
fastapi_app = FastAPIApp(
8888
agent=StudyBuddy,
89-
).get_app()
89+
name="StudyBuddy",
90+
app_id="study_buddy",
91+
description="A study buddy that helps users achieve their educational goals through personalized guidance, interactive learning, and comprehensive resource curation.",
92+
)
93+
94+
app = fastapi_app.get_app()
9095

9196
if __name__ == "__main__":
92-
serve_fastapi_app("study_friend:app", port=8001, reload=True)
97+
fastapi_app.serve(app="study_friend:app", port=8001, reload=True)

cookbook/apps/playground/agno_assist.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
from agno.embedder.openai import OpenAIEmbedder
3333
from agno.knowledge.url import UrlKnowledge
3434
from agno.models.openai import OpenAIChat
35-
from agno.playground import Playground, serve_playground_app
35+
from agno.playground import Playground
3636
from agno.storage.sqlite import SqliteStorage
3737
from agno.tools.dalle import DalleTools
3838
from agno.tools.eleven_labs import ElevenLabsTools
@@ -180,10 +180,15 @@
180180
)
181181

182182
# Create and configure the playground app
183-
app = Playground(agents=[agno_support, agno_support_voice]).get_app()
183+
playground = Playground(
184+
agents=[agno_support, agno_support_voice],
185+
app_id="agno-assist-playground-app",
186+
name="Agno Assist Playground",
187+
)
188+
app = playground.get_app()
184189

185190
if __name__ == "__main__":
186191
load_kb = False
187192
if load_kb:
188193
agent_knowledge.load(recreate=True)
189-
serve_playground_app("agno_assist:app", reload=True)
194+
playground.serve(app="agno_assist:app", reload=True)

cookbook/apps/playground/audio_conversation_agent.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@
1919
),
2020
)
2121

22-
app = Playground(agents=[audio_and_text_agent]).get_app()
22+
playground = Playground(
23+
agents=[audio_and_text_agent],
24+
name="Audio Conversation Agent",
25+
description="A playground for audio conversation agent",
26+
app_id="audio-conversation-agent",
27+
)
28+
app = playground.get_app()
2329

2430
if __name__ == "__main__":
25-
serve_playground_app("audio_conversation_agent:app", reload=True)
31+
playground.serve(app="audio_conversation_agent:app", reload=True)

cookbook/apps/playground/azure_openai_agents.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,13 @@
149149
markdown=True,
150150
)
151151

152-
app = Playground(
153-
agents=[web_agent, finance_agent, youtube_agent, research_agent, image_agent]
154-
).get_app()
152+
playground = Playground(
153+
agents=[web_agent, finance_agent, youtube_agent, research_agent, image_agent],
154+
name="Azure OpenAI Agents",
155+
description="A playground for Azure OpenAI agents",
156+
app_id="azure-openai-agents",
157+
)
158+
app = playground.get_app()
155159

156160
if __name__ == "__main__":
157-
serve_playground_app("azure_openai_agents:app", reload=True)
161+
playground.serve(app="azure_openai_agents:app", reload=True)

cookbook/apps/playground/basic.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,15 @@
3636
markdown=True,
3737
)
3838

39-
app = Playground(
39+
playground = Playground(
4040
agents=[
4141
basic_agent,
42-
]
43-
).get_app()
42+
],
43+
name="Basic Agent",
44+
description="A playground for basic agent",
45+
app_id="basic-agent",
46+
)
47+
app = playground.get_app()
4448

4549
if __name__ == "__main__":
46-
serve_playground_app("basic:app", reload=True)
50+
playground.serve(app="basic:app", reload=True)

cookbook/apps/playground/blog_to_podcast.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from agno.agent import Agent
22
from agno.models.openai import OpenAIChat
3-
from agno.playground import Playground, serve_playground_app
3+
from agno.playground import Playground
44
from agno.storage.sqlite import SqliteStorage
55
from agno.tools.eleven_labs import ElevenLabsTools
66
from agno.tools.firecrawl import FirecrawlTools
@@ -42,11 +42,13 @@
4242
),
4343
)
4444

45-
app = Playground(
46-
agents=[
47-
blog_to_podcast_agent,
48-
]
49-
).get_app(use_async=False)
45+
playground = Playground(
46+
agents=[blog_to_podcast_agent],
47+
app_id="blog-to-podcast-playground-app",
48+
name="Blog to Podcast Playground",
49+
description="A playground for blog to podcast",
50+
)
51+
app = playground.get_app()
5052

5153
if __name__ == "__main__":
52-
serve_playground_app("blog_to_podcast:app", reload=True)
54+
playground.serve(app="blog_to_podcast:app", reload=True)

0 commit comments

Comments
 (0)