Per-Agent AI Provider and API Key Configuration

JoelMartínez

Gold Partner
Advanced Certified
Joined
Jul 24, 2024
Messages
17
Reaction score
12
Summary
Currently, the AI provider for AI Agents is configured globally and shared by every agent. I'd like to suggest making it a per-agent setting, displayed as an "AI Provider" tab inside each agent's configuration.

Current behavior
  • The AI provider and its API key are defined once, in a single global location.
  • All AI Agents share the same provider and the same API key.
Proposed behavior
Add an "AI Provider" tab to each AI Agent where the administrator can:
  1. Select the provider (OpenAI or xAI Grok).
  2. Select the model used by that agent.
  3. Enter a dedicated API key for that agent.
The existing global configuration could remain as a default, so agents without their own provider simply inherit it. This keeps the change backward compatible.

Why this matters
  1. Cost control. With one API key per agent, usage and billing can be tracked per agent in the provider's dashboard. Today, with a shared key, it is impossible to know how much each agent costs. This is especially important for MSPs and for companies that charge costs back to departments or clients.
  2. Spending limits. Providers allow budgets and rate limits per API key, so each agent's spending could be capped independently.
  3. Right model for each task. A simple reception agent can use a small, cheap model, while a complex support agent can use a more capable one. Mixing OpenAI and xAI Grok in the same PBX would also be possible.
  4. Security and isolation. If a key is compromised or reaches its quota, only one agent is affected, and keys can be rotated individually.

Example
  • Agent "Reception": a lightweight OpenAI model with API key A.
  • Agent "Technical Support": an xAI Grok model with API key B.

Each can be monitored and billed independently.

Thank you for considering this suggestion. I'd be glad to hear whether others find it useful too.

1790850649148.png
 
  • Like
Reactions: Samic
Upvote 1

Forum statistics

Threads
112,160
Messages
591,041
Members
165,196
Latest member
RoelantM