AgentNode picks a model backend via the ModelProvider enum in app/launchpad/core/nodes/agent.py. Switching providers is a one-line change in the node’s get_agent_config(); credentials come from environment variables loaded by python-dotenv at import time.
All providers are reached through pydantic-ai.
AgentConfig.instrument=True (the default) wires each call into Langfuse when enable_tracing=True on the workflow.Supported providers
OpenAI — ModelProvider.OPENAI
Uses OpenAIResponsesModel. Good default for new workflows.
| Env var | Purpose |
|---|---|
OPENAI_API_KEY | Standard OpenAI API key. |
Azure OpenAI — ModelProvider.AZURE_OPENAI
Routes through pydantic-ai’s AzureProvider with OpenAIResponsesModel.
| Env var | Purpose |
|---|---|
AZURE_OPENAI_ENDPOINT | Azure resource endpoint. |
AZURE_OPENAI_API_KEY | Resource API key. |
AZURE_OPENAI_API_VERSION | API version (defaults to 2025-04-01-preview). |
model_name to the Azure deployment name you want to call.
Anthropic — ModelProvider.ANTHROPIC
| Env var | Purpose |
|---|---|
ANTHROPIC_API_KEY | Anthropic API key. |
Google Gemini — ModelProvider.GOOGLE_GEMINI
Uses GoogleModel with the standard GoogleProvider (API-key auth).
| Env var | Purpose |
|---|---|
GOOGLE_API_KEY | Gemini API key. |
Google Vertex AI — ModelProvider.GOOGLE_VERTEX_AI
Uses a service account to authenticate against Vertex AI.
| Env var | Purpose |
|---|---|
GOOGLE_APPLICATION_CREDENTIALS | Absolute path to a service account JSON file. |
GOOGLE_VERTEX_AI_LOCATION | Region (defaults to europe-west1). |
AWS Bedrock — ModelProvider.BEDROCK
Creates a boto3 bedrock-runtime client and passes it to BedrockConverseModel.
| Env var | Purpose |
|---|---|
BEDROCK_AWS_ACCESS_KEY_ID | AWS access key. |
BEDROCK_AWS_SECRET_ACCESS_KEY | AWS secret. |
BEDROCK_AWS_REGION | AWS region hosting the model. |
Ollama — ModelProvider.OLLAMA
Uses OpenAIChatModel with the pydantic-ai OllamaProvider. Ideal for local development against an ollama serve instance.
| Env var | Purpose |
|---|---|
OLLAMA_BASE_URL | Full base URL, e.g. http://localhost:11434/v1. Required; the node raises KeyError otherwise. |
Other AgentConfig knobs
AgentConfig forwards common pydantic-ai fields so most tuning happens in one place:
instructions— static system prompt (can be augmented with@self.agent.instructionsfor per-run context).output_type— return a plainstror aBaseModelsubclass for structured output.deps_type— a Pydantic model containing dependencies exposed viaRunContextinside tools and instruction callbacks.tools,builtin_tools— pydantic-ai tool definitions.model_settings— aModelSettingsobject to override temperature, max tokens, etc.retries,output_retries— retry behavior on model errors and validation failures.instrument— defaults toTrue; set toFalseto opt a node out of Langfuse instrumentation even when the workflow has tracing enabled.