-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathagno-agent.py
More file actions
37 lines (32 loc) · 1 KB
/
Copy pathagno-agent.py
File metadata and controls
37 lines (32 loc) · 1 KB
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
37
import os
from phoenix.otel import register
from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.models.google import Gemini
from agno.os import AgentOS
from agno.tools.mcp import MCPTools
# 1. Setup Arize Phoenix Tracing (gRPC)
os.environ["OTEL_EXPORTER_OTLP_ENDPOINT"] = "http://localhost:4317"
tracer_provider = register(
project_name="agno-mcp-agent",
auto_instrument=True,
)
# 2. Setup Agno Agent
agno_assist = Agent(
name="Agno Assist",
model=Gemini(id="gemini-2.5-flash"),
db=SqliteDb(db_file="agno.db"),
tools=[MCPTools(url="https://docs.agno.com/mcp")],
add_datetime_to_context=True,
add_history_to_context=True,
num_history_runs=3,
markdown=True,
)
# 3. Setup AgentOS Backend UI
agent_os = AgentOS(agents=[agno_assist])
app = agent_os.get_app()
if __name__ == "__main__":
import uvicorn
print("Starting Agno OS Backend UI on port 8000...")
# Keeping the original port for this baseline script
uvicorn.run(app, host="0.0.0.0", port=8000)