Agent(llm="myprovider/model") call, in YAML, and in every praisonai CLI command — without editing core.
Quick Start
1
Use a provider you registered in Python
Register an adapter, then point an agent at it with a
provider/model string.2
Ship it as a pip-installable plugin
Publish the adapter under the The entry point can be:
praisonai.providers entry-point group so any pip install makes it first-class.- An adapter instance:
"my_pkg:ADAPTER_INSTANCE" - An adapter class:
"my_pkg.adapter:MyCloudAdapter"(instantiated on load) - A zero-arg factory callable:
"my_pkg.adapter:build_adapter"(called on load)
pip install your-plugin:How It Works
Discovery is lazy and idempotent: the first call tolist_provider_adapters() or get_provider_adapter() scans the praisonai.providers entry-point group once per process.
Same provider, three surfaces
The same provider works identically from Python, YAML, and the CLI.- Python
- YAML
- CLI
Choosing between the three plugin systems
PraisonAI has three separate provider-plugin systems — pick the one that matches what you are adding.Public API
Import everything frompraisonaiagents.llm.adapters.
The adapter object implements
LLMProviderAdapterProtocol (in praisonaiagents/llm/protocols.py) with hooks like supports_prompt_caching(), supports_streaming(), format_tool_result_message(...), and get_default_settings(). Subclassing DefaultAdapter gives sensible defaults for all of them.
Common Patterns
ReuseDefaultAdapter as a base when your provider is OpenAI-compatible — same request/response shape, only credentials differ.
MYCLOUD_API_KEY in the environment is enough for a first run, no auth login needed.
openai, anthropic, gemini, ollama, claude) — the loader skips those silently and your plugin will seem not to register.
Best Practices
Use a conventional lowercase name
Use a conventional lowercase name
Matching is case-insensitive and the registry stores names lowercase — register
mycloud, not MyCloud.Keep adapter construction cheap and failure-tolerant
Keep adapter construction cheap and failure-tolerant
The loader catches construction errors and skips, so a slow or raising adapter silently disappears from the picker — connect lazily on first request.
Document your default model
Document your default model
Users expect a default model row in
auth list; if yours differs from the built-ins, mention it in your package’s README.Prefer entry-point registration for reusable providers
Prefer entry-point registration for reusable providers
Shipping via the
praisonai.providers entry point gives users picker, auth, and YAML support without any Python glue — favour it over runtime add_provider_adapter.Related
Custom Provider Registry
The different
praisonai.llm_providers system (Python-only, structured completion).Model Provider Plugins
The different
praisonaiagents.model_providers system (bare-name → provider id matchers).Auth
How a discovered provider’s
<PROVIDER>_API_KEY is stored and surfaced.Setup
The picker that enumerates discovered providers.

