import langwatch
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.tools.duckduckgo import DuckDuckGoTools
from openinference.instrumentation.agno import AgnoInstrumentor
# Initialize LangWatch and instrument Agno
langwatch.setup(instrumentors=[AgnoInstrumentor()])
# Create and configure your Agno agent
agent = Agent(
name="Stock Price Agent",
model=OpenAIChat(id="gpt-5-mini"),
tools=[DuckDuckGoTools()],
instructions="You are an internet search agent. Find and provide accurate information on any topic.",
debug_mode=True,
)
agent.print_response("What are the latest developments in artificial intelligence?")
Create a virtual environment
Terminal
and create a python virtual environment.python3 -m venv .venv
source .venv/bin/activate
Set your API key
- Sign up for an account at https://app.langwatch.ai/.
- Set your LangWatch API key as an environment variables:
```bash
export LANGWATCH_API_KEY=<your-key>
</Step>
<Step title="Install libraries">
```bash
pip install -U agno openai ddgs langwatch openinference-instrumentation-agno
Run Agent
python cookbook/integrations/observability/langwatch_op.py