You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GBrain should support host-provided credential sources for providers without making any one host a hard dependency. The active path should build on the current recipe/auth architecture and #698 rather than the stale resolver PR: core provider recipes stay provider-neutral; host adapters translate OpenClaw/Codex/Hermes/etc. auth state into an explicit credential source without leaking tokens into tool payloads, logs, or generated context.
Users often already authenticated inside their agent host. Requiring every GBrain install to also collect and store provider API keys creates friction, duplicate billing/config work, and a worse default for managed user fleets.
The product goal is not "hide API keys with another API-key wrapper." The goal is a clean boundary:
host owns login/session/profile state
GBrain core owns provider calls, capability detection, and readiness checks
adapter/resolver passes only minimum credential-source metadata
secrets never appear in model-visible payloads, CLI output, route responses, or logs
Concrete Examples
OpenClaw can expose an OAuth-backed model runtime to a GBrain adapter without requiring the user to paste OPENAI_API_KEY into GBrain.
Codex Desktop can launch local gbrain serve while the host plugin contributes credential-source metadata through a narrow adapter contract.
Claude Code or Hermes can implement the same contract later without core GBrain importing host-specific SDKs.
CI and headless servers can keep using plain env vars, with process env remaining the highest-precedence escape hatch.
Current State
The old provider-auth resolver PR was closed as stale because upstream now has the v0.32 recipe/auth architecture.
Start from the current recipe/auth files on master. Build the smallest seam that lets a host adapter resolve credentials before the provider recipe creates its client. Keep host code outside core. Use fake credentials in tests and assert redaction at every public boundary.
TL;DR
GBrain should support host-provided credential sources for providers without making any one host a hard dependency. The active path should build on the current recipe/auth architecture and #698 rather than the stale resolver PR: core provider recipes stay provider-neutral; host adapters translate OpenClaw/Codex/Hermes/etc. auth state into an explicit credential source without leaking tokens into tool payloads, logs, or generated context.
Why This Matters
Users often already authenticated inside their agent host. Requiring every GBrain install to also collect and store provider API keys creates friction, duplicate billing/config work, and a worse default for managed user fleets.
The product goal is not "hide API keys with another API-key wrapper." The goal is a clean boundary:
Concrete Examples
OPENAI_API_KEYinto GBrain.gbrain servewhile the host plugin contributes credential-source metadata through a narrow adapter contract.Current State
Recipe.resolveAuthis the right upstream seam to plug into; new work should not bypass it.Acceptance Criteria
Recipe.resolveAuth/ existing provider recipes instead of creating a parallel auth path.gbrain providers explain,list, ortest.Non-Goals
Agent Implementation Notes
Start from the current recipe/auth files on
master. Build the smallest seam that lets a host adapter resolve credentials before the provider recipe creates its client. Keep host code outside core. Use fake credentials in tests and assert redaction at every public boundary.