Bring Your Own LLM (BYOLLM)
Averment’s meaning layer understands what actions are trying to do. By default, it uses Averment’s built-in AI system. With BYOLLM, you can switch it to use your own AI model instead.
How it works
You can optionally provide an LLM setup when creating the SDK. It is sent with each request and used only for that request’s meaning analysis. Your credentials are never stored, logged, or persisted.
If your LLM request fails for any reason, like a timeout, error, or invalid response, the system still keeps working using reliable built-in checks. It never stops or breaks execution.
Supported providers
| Provider | Value |
|---|---|
| OpenAI | "openai" |
| Anthropic (Claude) | "anthropic" |
| Google (Gemini) | "gemini" |
Each provider has a built-in default endpoint and handles the correct request format and authentication headers automatically.
Setup
js
The
llm config is applied to every decide() call made through this client instance.Configuration
ts
Examples
OpenAI
js
Anthropic (Claude)
js
Gemini
js
Custom endpoint (any OpenAI-compatible server)
js
Security
- Your
apiKeyis transmitted to your LLM endpoint and nowhere else - It is never written to the database, included in logs, or exposed in any response
- It exists only for the duration of the synchronous evaluation
- Two requests that differ only in their
llmconfig are treated as identical for idempotency purposes
When to use BYOLLM
- You want to control which LLM is used for semantic interpretation
- You have compliance requirements around data leaving your infrastructure
- You want to use a specific model version or fine-tuned model
- You are running a self-hosted LLM
If you don't configure
llm, Averment uses its own backend and no changes needed to your existing integration.Next steps
Now that you understand BYOLLM, explore the full range of usage patterns Averment supports.
Usage
Learn basic usage, safe execution strategies, and full handler control all the ways to integrate Averment into your system.