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:
| Setting | Value |
|---|---|
| Base URL | https://backend.sovereigneg.com/v1 |
| API key | Your 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/modelsSet 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
| # | Guide | What you build | Install |
|---|---|---|---|
| 1 | LangChain | One chat call, then a prompt chain | pip install langchain-openai |
| 2 | LangGraph | A graph with a chatbot node, then a tool-using agent | pip install langgraph langchain-openai |
| 3 | CrewAI | One agent, then a two-agent crew | pip install crewai |
| 4 | LlamaIndex | RAG: ask questions about your own PDFs | pip 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)
| # | Guide | What it is |
|---|---|---|
| 5 | Open WebUI | ChatGPT-style web chat that talks to SovereignEG |
| 6 | OpenCode | Terminal coding agent (like Claude Code) on SovereignEG models |
| 7 | Hermes Agent | Nous Research's personal agent (CLI + Telegram/Discord) on SovereignEG models |
Common problems (all frameworks)
| Error | Cause | Fix |
|---|---|---|
401 Unauthorized | Wrong or missing key | Check SOVEREIGNEG_API_KEY, test with the curl above |
400 model_not_found | Model name typo | Copy the exact id from /v1/models (names are case-sensitive) |
Unknown model ... valid OpenAI model name | Framework has a hard-coded OpenAI model list | Use 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.py | Rename your file; it hides the real package |
429 Too Many Requests | Plan rate limit | Slow down, or raise the plan in the dashboard. See Rate Limits |
Next steps
- LangChain — start with the 5-minute guide
- Python SDK — the plain OpenAI SDK, no framework
- Model Library — every live model id with EGP pricing