Authentication
Set yourLANGDB_API_KEY environment variable. Get your key from here.
Example
UseLangDB with your Agent:
Params
LangDB also supports the params of OpenAI.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
LANGDB_API_KEY environment variable. Get your key from here.
export LANGDB_API_KEY=***
export LANGDB_PROJECT_ID=***
setx LANGDB_API_KEY ***
setx LANGDB_PROJECT_ID ***
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.")
| Parameter | Type | Default | Description |
|---|---|---|---|
id | str | "gpt-4o-mini" | The id of the model to use through LangDB |
name | str | "LangDB" | The name of the model |
provider | str | "LangDB" | The provider of the model |
api_key | Optional[str] | None | The API key for LangDB (defaults to LANGDB_API_KEY env var) |
base_url | str | "https://api.langdb.ai/v1" | The base URL for the LangDB API |
LangDB also supports the params of OpenAI.Was this page helpful?