Skip to main content
LangDB is an AI Gateway for seamless access to 350+ LLMs. Secure, govern, and optimize AI Traffic across LLMs using OpenAI-Compatible APIs. For detailed integration instructions, see the LangDB Agno documentation.

Authentication

Set your LANGDB_API_KEY environment variable. Get your key from here.
export LANGDB_API_KEY=***
export LANGDB_PROJECT_ID=***

Example

Use LangDB with your Agent:
from agno.agent import Agent
from agno.models.langdb import LangDB

agent = Agent(
    model=LangDB(id="gpt-5-mini"),
    markdown=True
)

# Print the response in the terminal
agent.print_response("Share a 2 sentence horror story.")

Params

ParameterTypeDefaultDescription
idstr"gpt-4o-mini"The id of the model to use through LangDB
namestr"LangDB"The name of the model
providerstr"LangDB"The provider of the model
api_keyOptional[str]NoneThe API key for LangDB (defaults to LANGDB_API_KEY env var)
base_urlstr"https://api.langdb.ai/v1"The base URL for the LangDB API
LangDB also supports the params of OpenAI.
I