Minor refactoring in agno code, script starts

This commit is contained in:
Michael Panchenko committed 2025-03-30 23:56:52 +02:00
1 parent 76f458b121
commit 605bca19b7
5 files changed
+231 -34

No files matched your search

+31 -8
View File
@@ -1,12 +1,35 @@
from agno.models.google import Gemini
from agno.agent import Agent
from agno.models.anthropic import Claude
from agno.playground import Playground, serve_playground_app
from dotenv import load_dotenv
from serena.agno import create_agno_agent
from serena.agent import SerenaAgent
from serena.agno import get_agno_functions
load_dotenv()
project_file_path = "../myproject.yml"
serena_agent = SerenaAgent(project_file_path)
tools = get_agno_functions(serena_agent)
model = Claude(id="claude-3-7-sonnet-20250219")
agno_agent = Agent(
name="Serena",
model=model,
description="A fully-featured coding assistant",
tools=tools, # type: ignore
show_tool_calls=True,
markdown=True,
system_message="", # Todo
read_tool_call_history=True,
telemetry=False,
)
## The app object should be in the module scope so that the server can access it for hot reloading
app = Playground(agents=[agno_agent]).get_app()
if __name__ == "__main__":
serena_agent = create_agno_agent(
project_file_path="myproject.yml",
model=Gemini(id="gemini-2.5-pro-exp-03-25"),
)
app = Playground(agents=[serena_agent]).get_app()
serve_playground_app(app, reload=False)
serve_playground_app("agno_agent:app", reload=True)