Skip to content

xAI

xAI (Grok) served over an OpenAI-compatible chat-completions endpoint, selected with LLM_PROVIDER=xai, used to extract facts from conversations.

Enable it

bash
LLM_PROVIDER=xai
OPENAI_API_KEY=<xai-api-key>
OPENAI_BASE_URL=https://api.x.ai/v1
OPENAI_LLM_MODEL=grok-3

Configuration

VariableDefaultDescription
LLM_PROVIDERopenaiSet to xai.
OPENAI_API_KEY(none)xAI API key, sent as a bearer token.
OPENAI_BASE_URLhttps://api.openai.com/v1Point at xAI's endpoint: https://api.x.ai/v1.
OPENAI_LLM_MODELgpt-4.1-nanoAn xAI model, e.g. grok-3.

Notes

  • OpenAI-compatible: the provider reuses the OpenAI request handling and only differs by base URL, key, and model.
  • You must override OPENAI_BASE_URL to xAI's endpoint; its default points at OpenAI.

The memory layer for AI agents.