Hello there,
My script in python is not running my app:
$ uv run 14_own_tools.py
Traceback (most recent call last):
File “C:\Users\filho\OneDrive\Área de Trabalho\Meus Documentos\curso agno\14_own_tools.py”, line 3, in
from agno.agent import Agent
ModuleNotFoundError: No module named ‘agno.agent’
Here my script:
from agno.models.groq import Groq
import os
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.playground import Playground, serve_playground_app
from agno.storage.sqlite import SqliteStorage
from dotenv import load_dotenv
Carrega variáveis de ambiente
load_dotenv()
Cria o diretório storage se não existir
if not os.path.exists(‘storage’):
os.makedirs(‘storage’)
Caminho para o arquivo SQLite dentro do diretório storage
db_path = os.path.join(‘storage’, ‘agent_db.sqlite’)
def celsius_to_fh(temperatura_celsius: float):
“”"
Converte uma temperatura em graus Celsius para Fahrenheit
Args:
temperatura_celcius (float): Temperatura em graus Celsius
Returns:
float: Temperatura convertida em graus Fahrenheit
"""
return (temperatura_celsius * 9/5) + 32
Inicializa o SQLiteStorage com o caminho especificado
db = SQLiteStorage(db_path)
db.set(“agent_memory”, “Informação relevante”)
print(db.get(“agent_memory”))
agent = Agent(
name=“Agente do Tempo”,
model=OpenAIChat(id=“o4-mini”),
tools=[
TavilyTools(),
celsius_to_fh,
],
storage=db,
add_history_to_messages=True,
num_history_runs=3,
debug_mode=True
)
app = Playground(agents=[
agent
]).get_app()
if name == “main”:
serve_playground_app(“14_own_tools:app”, reload=True)
agent.print_response(“Use sua ferramentas para pesquisar a temperatura de hoje em Curitiba”)
I Dont now if there are versions from agno (1.7.4) and python (3.13.4) that are not compatible.
Anyone to help me how to fix this?