Agent setup examples
Create a chat agent key and configure OpenAI-compatible agents, Hermes, the OpenAI SDK, or cURL.
Updated
Use a llmbase_chat_... key with the agent API base URL when an external agent
should consume your Pro Chat/Agent subscription budget.
Create a chat agent key
- Open Dashboard -> Agent Access.
- In Chat agent keys, create a new key.
- Copy the key immediately. It is only shown once.
Revoking a key disables it immediately. If a bounded-lifetime key is shown as expired, create a replacement instead of continuing to use the old token.
Configure an OpenAI-compatible agent
Use these settings in any agent that supports a custom OpenAI-compatible API:
| Setting | Value |
|---|---|
| Base URL | https://llmbase.ai/api/v1/agents |
| API key | Your llmbase_chat_... chat agent key |
| Models endpoint | GET /models |
| Chat endpoint | POST /chat/completions |
Example Hermes configuration
Hermes should be configured as a named custom provider. A bare custom
provider with only OPENAI_API_KEY may not send the key to non-OpenAI hosts.
Load the current agent model list first, then choose a returned model with the
tool, context, and cost profile your agent loop needs.
model:
provider: llmbase
model: <model-id-from-agent-models>
base_url: https://llmbase.ai/api/v1/agents
api_key: llmbase_chat_...
api_mode: chat_completions
custom_providers:
- name: llmbase
base_url: https://llmbase.ai/api/v1/agents
api_key: llmbase_chat_...
api_mode: chat_completions
model: <model-id-from-agent-models>
Hermes uses reasoning_effort: medium by default. LLMBase accepts that default
for reasoning-capable models. When a model publishes high but no native
medium tier, the request uses high automatically; no Hermes override is
required. Explicit unsupported values still return a validation error.
Example with the OpenAI SDK
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://llmbase.ai/api/v1/agents",
apiKey: process.env.LLMBASE_CHAT_AGENT_KEY,
});
const models = await client.models.list();
const model = models.data[0]?.id;
const response = await client.chat.completions.create({
model,
messages: [
{ role: "user", content: "Draft a short product update." },
],
});
console.log(response.choices[0]?.message?.content);
Example cURL request
curl https://llmbase.ai/api/v1/agents/chat/completions \
-H "Authorization: Bearer $LLMBASE_CHAT_AGENT_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "<model-id-from-agent-models>",
"messages": [
{ "role": "user", "content": "Summarize this repo issue." }
]
}'