Skip to main content
build_config_list() returns the [{model, base_url, api_key, api_type}] shape AutoGen expects, using the same env/keyfile resolution the CLI already performs.
The user starts an agent; PraisonAI resolves keys and models into an AutoGen-ready config_list first.

Quick Start

1

Standalone import

Set OPENAI_API_KEY in your environment, then:
2

Agent-centric usage with AutoGen

Use build_config_list() inside a PraisonAI agent flow that bridges to an AutoGen adapter:

How It Works


Return Shape


Parameters


The legacy import from praisonai.llm.config import build_config_list still works — it resolves to the same function object via a sys.modules shim. You do not need to migrate existing code. The unit test test_c5_backward_compat.py::test_module_identity asserts praisonai.llm.config is praisonai_code.llm.config.

Best Practices

Resolution is done at call time — set OPENAI_API_KEY (or the provider-appropriate env var like ANTHROPIC_API_KEY) before calling build_config_list().
If you build many AutoGen agents in a hot loop, cache the result — the endpoint resolver reads disk (~/.praison/config) on every call:
For non-AutoGen consumers, prefer resolve_llm_endpoint() directly and avoid the api_type field — it returns a typed LLMEndpoint dataclass with model, base_url, and api_key fields:

LLM Endpoint Config

Endpoint precedence rules and provider routing

Model Catalogue

Choose the model that goes into the config_list

Standalone LLM Modules

All four LLM modules available in praisonai-code

PraisonAI Code CLI

The standalone runtime these modules power