All 17 agent tools work identically regardless of which AI provider you choose. The TEE server adapts the tool declarations to each provider’s function-calling format automatically.
Configure the AI provider
Pass anai object when constructing the Wraith client. Every agent created from that client will use your specified provider:
Supported providers
| Provider | ai.provider value | API key format |
|---|---|---|
| Google Gemini | "gemini" | Gemini API key |
| OpenAI | "openai" | sk-... |
| Anthropic Claude | "claude" | Anthropic API key (sk-ant-...) |
OpenAI
Anthropic Claude
Your own Gemini key
Provide your own Gemini key to bypass the platform’s shared quota and control which model version is used:How the provider key is used
The SDK passes your AI configuration to the TEE server via HTTP headers on every request:| Header | Value |
|---|---|
Authorization | Bearer wraith_... — your Wraith platform API key |
X-AI-Provider | openai, claude, or gemini |
X-AI-Key | Your AI provider API key |
Receives your chat message
Your message arrives at the TEE alongside the
X-AI-Provider and X-AI-Key headers.Prepares the request
The server assembles the agent’s full identity, chain configuration, and tool declarations in the format your provider expects.
Calls your AI provider
The conversation is forwarded to your specified provider using your key. The platform’s default Gemini model is bypassed entirely.
Executes tool calls
When the AI returns tool calls (e.g.,
send_payment, privacy_check), the TEE executes them on-chain and feeds the results back to the model.Tool compatibility
All agent tools work the same way regardless of provider:toolCalls field on the response always reflects what the model invoked, independent of provider:
Default vs. bring your own model
| Aspect | Default (Gemini) | Bring your own |
|---|---|---|
| Cost | Included in Wraith API usage | Billed directly by your AI provider |
| Model version | Wraith’s chosen Gemini model | Your choice |
| Quota | Shared platform quota | Your provider quota |
| Configuration | None required | Pass ai to WraithConfig |
| Tool compatibility | Full | Full |
What’s next
Single-chain guide
Full agent lifecycle walkthrough with working code examples.
Multichain setup
Run one agent across multiple chains simultaneously.
Privacy best practices
Avoid common privacy pitfalls when using stealth payments.
SDK reference
Full WraithConfig and AgentConfig API documentation.

