Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs-v1.agno.com/llms.txt

Use this file to discover all available pages before exploring further.

This example demonstrates tool usage with LangDB AI Gateway. For detailed integration instructions, see the LangDB Agno documentation.

Code

cookbook/models/langdb/research_agent.py
from agno.agent import Agent
from agno.models.langdb import LangDB
from agno.tools.duckduckgo import DuckDuckGoTools

agent = Agent(
    model=LangDB(id="gpt-4o-mini"),
    tools=[
        DuckDuckGoTools(
            search=True, news=True
        )
    ],
    show_tool_calls=True,
    description="You are a research analyst that investigates topics and helps users find comprehensive information.",
    instructions=["Use tables to display data where possible."],
    markdown=True,
)

agent.print_response("What are the latest developments in AI technology?", stream=True)

Usage

1

Create a virtual environment

Open the Terminal and create a python virtual environment.
python3 -m venv .venv
source .venv/bin/activate
2

Set your API key

export LANGDB_API_KEY=xxx
export LANGDB_PROJECT_ID=xxx
3

Install libraries

pip install -U ddgs agno
4

Run Agent

python cookbook/models/langdb/finance_agent.py