Frameworks & Tools

SovereignEG is OpenAI-compatible. Every popular framework and agent tool that talks to OpenAI can talk to SovereignEG. In every guide below you change the same three values and nothing else:

SettingValue
Base URLhttps://backend.sovereigneg.com/v1
API keyYour sk-... key from the dashboard → API Keys
Chat model (used in all examples)SovereignEG/Qwen3.8-27B-FP8
Embedding model (for RAG)embeddinggemma-300m

Full model list, with your key:

curl -H "Authorization: Bearer sk-..." https://backend.sovereigneg.com/v1/models

Set your key once

Every guide reads the key from the SOVEREIGNEG_API_KEY environment variable, so you never paste it into a file.

# Linux / macOS
export SOVEREIGNEG_API_KEY="sk-..."
# Windows PowerShell
$env:SOVEREIGNEG_API_KEY = "sk-..."

Never put a real key into a file that goes into git.

Part 1 — Python frameworks

#GuideWhat you buildInstall
1LangChainOne chat call, then a prompt chainpip install langchain-openai
2LangGraphA graph with a chatbot node, then a tool-using agentpip install langgraph langchain-openai
3CrewAIOne agent, then a two-agent crewpip install crewai
4LlamaIndexRAG: ask questions about your own PDFspip install llama-index llama-index-llms-openai-like llama-index-embeddings-openai-like llama-index-readers-file

Part 2 — Ready-made agent tools (no code)

#GuideWhat it is
5Open WebUIChatGPT-style web chat that talks to SovereignEG
6OpenCodeTerminal coding agent (like Claude Code) on SovereignEG models
7Hermes AgentNous Research's personal agent (CLI + Telegram/Discord) on SovereignEG models

Common problems (all frameworks)

ErrorCauseFix
401 UnauthorizedWrong or missing keyCheck SOVEREIGNEG_API_KEY, test with the curl above
400 model_not_foundModel name typoCopy the exact id from /v1/models (names are case-sensitive)
Unknown model ... valid OpenAI model nameFramework has a hard-coded OpenAI model listUse the "OpenAI-compatible" class (OpenAILike, ChatOpenAI with base_url, openai/ prefix in CrewAI) — each guide shows the right one
ModuleNotFoundError: No module named 'llama_index.core'Your script is named llama_index.pyRename your file; it hides the real package
429 Too Many RequestsPlan rate limitSlow down, or raise the plan in the dashboard. See Rate Limits

Next steps