Docs / External API integration brainstorm
External API integration brainstorm
Status: Implemented via _ExternalApis + ApiHttpClient (2026-07-19)
Ops docs: ExternalApis.md · VBulletin.md · GithubRestAPI.md
Pattern: libcurl + token/env + speech + Lua + SkillLibrary seed + EthicsGood/LegalShield on mutations
0. What you already integrate (do not reinvent)
| Area |
Existing |
| LLM cloud |
Grok/ChatGPT/Gemini/Claude/Mistral settings · _LLM_API · DomainLLMBridge · NetLLM · llama.cpp |
| Speech |
Google Speech · local TF/TFLite · Android audio stream |
| CMS / community |
WordPress · MyBB · OsTicket · Moltbook |
| Agent remote |
OpenClaw · AgentRuntime · RSI |
| Dev |
GithubRestAPI (+ SkillLibrary) |
| Media local |
MediaCompute · music/video MySQL libraries · FTP |
| Ops |
Email (SMTP) · IRC · WebServer · ROS · WeatherHazards |
| Desktop |
Microsoft Office suite bridges · Calendar |
| Compute |
Remote CUDA · TensorRT · NPU · Cutlass |
| Safety |
EthicsGood · LegalShield · EthicsActionClassifier |
| Knowledge |
Semantic multi-*2vec · corpus · bible/law slices · MySQL AI |
Implication: prefer APIs that feed RAG, agents, discovery, gaming coach, or legal education — not another generic chat wrapper.
1. Design rules (all candidates)
- Read-only first — list/get before POST/PATCH; mutations dry-run + human confirm.
- Keys on desktop only — never Pixel companion; mask in
status.
- EthicsGood pre-call / LegalShield post-plan for anything that can post, buy, or actuate.
- SkillLibrary seed —
X skills install like github skills install.
- Fallback — offline stub + local MySQL when cloud down.
- One façade module per vendor (
_XyzApi) + typed xyz … + Lua xyz_*.
2. High-leverage candidates (by product surface)
A. Knowledge / RAG substrate (pairs with Phase B semantic)
| API |
Why it fits |
First commands |
Risk |
| Wikipedia / MediaWiki Action API |
Free grounding for SimpleText, discovery drafts, school modes |
wiki get <title> · wiki search |
Low (public) |
| Wikidata SPARQL |
Structured entities → thought graphs |
wikidata entity Q42 |
Low |
| arXiv API |
Science/math papers → MathNN curriculum + discovery |
arxiv search neural pde |
Low |
| Semantic Scholar / OpenAlex |
Citation graphs for research agents |
scholar paper <id> |
Low–med (rate limits) |
| PubMed / Europe PMC |
Biology/medicine education only + LegalShield framing |
pubmed search … |
Med (disclaimer) |
| Open Library / Google Books (key) |
Literature coach + bible/book corpus |
books isbn … |
Low |
| Crossref |
DOI metadata for discovery posts |
crossref doi 10.… |
Low |
Stack hook: ai rag inject → Grok/local synthesize → discovery record draft.
B. Law / civics (pairs with LegalShield, courtroom sims)
| API |
Why |
First surface |
Risk |
| CourtListener / RECAP |
Real dockets & opinions for education |
law case search … |
Med — never “legal advice” |
| Congress.gov API |
Bills, votes → ThreeBranches / policy agents |
congress bill … |
Low |
| govinfo / GPO |
CFR, FR, statutes text |
govinfo package … |
Low |
| OpenStates |
State legislature |
openstates bill … |
Low |
| SCOTUS Oyez (unofficial/data) |
Oral argument metadata |
research agent only |
Low |
Rule: always RAG + LegalShield disclaimer; no step-by-step crime; educational framing only.
C. Dev / project ops (extends GithubRestAPI)
| API |
Why |
First surface |
Risk |
| GitLab REST |
Same skill shape as GitHub for self-hosted |
gitlab projects |
Token scope |
| Azure DevOps REST |
Enterprise work items |
azdo wiql … |
Token |
| Linear GraphQL |
Issue triage for RSI agents |
linear issues |
Token |
| Jira Cloud REST |
Same |
jira search jql … |
Token |
| CircleCI / GitHub Actions API |
CI babysit (like pr-babysit skill) |
ci runs <repo> |
Token |
| Sentry / Better Stack |
Desktop Support agent: explain last error |
sentry issues |
Token + PII |
| npm / crates.io / PyPI JSON |
Dependency intel for code agents |
pkg info lodash |
Low |
D. Communication & collab
| API |
Why |
First surface |
Risk |
| Discord Bot API |
Agent presence / game coach callouts (private server) |
discord send #chan … |
High if public; allowlist channels |
| Slack Web API |
Desktop Support / Application Support handoff |
slack post #ops … |
Same |
| Telegram Bot API |
Lightweight mobile notify without putting keys on Pixel |
telegram notify … |
Med |
| Twilio (SMS) |
Critical alerts only |
twilio sms … |
Cost + abuse |
| Microsoft Graph |
Deepen Outlook/OneNote/Calendar (already have Office bridges) |
graph mail list |
OAuth complexity |
| Google Calendar / Gmail API |
If Google Speech already trusted |
gcal today |
OAuth |
Prefer notify-out over full inbox automation initially.
E. Maps / weather / location (extends WindowsLocation + WeatherHazards)
| API |
Why |
First surface |
Risk |
| Open-Meteo (no key) |
Structured forecast for hazards |
weather forecast lat lon |
Low |
| NWS API (US, no key) |
Alerts already fit WeatherHazards |
nws alerts <zone> |
Low |
| OpenStreetMap / Nominatim + OSRM |
Directions without Google billing |
geo geocode · geo route |
Rate limits / ToS |
| Mapbox / Google Maps |
If commercial routing needed |
paid |
Cost + ToS |
| AirNow / PurpleAir |
Air quality for outdoor modes |
aqi here |
Low |
| API |
Why |
First surface |
Risk |
| Plex / Jellyfin (local HTTP) |
Cross-drive library is already MySQL — sync metadata |
plex libraries |
Local network |
| MusicBrainz / AcoustID |
Dedup music by fingerprint not title only |
musicbrainz recording … |
Low |
| TMDb / OMDb |
Movie metadata for video_library |
tmdb search … |
Key |
| YouTube Data API |
Research clips / discovery embeds (no auto-upload) |
yt search … |
Quota |
| Spotify Web API |
Playlist analytics, not DRM crack |
spotify me |
OAuth |
G. Gaming RL / coach (extends GamingRL + GameModBridge)
| API |
Why |
First surface |
Risk |
| Steam Web API |
Owned games, playtime → curriculum |
steam games <steamid> |
Key |
| OpenXBL / Xbox REST |
Console companion path |
xbox profile |
Key + ToS |
| Riot Games API |
LoL path already in settings |
riot match … |
Key + ToS |
| Twitch Helix |
Stream metadata, not chat spam bots |
twitch stream <user> |
Token |
| RAWG / IGDB |
Game metadata for coach narratives |
igdb game … |
Key |
| Speedrun.com API |
Objective benchmarks for RL curricula |
src game … |
Low |
Ethics: dry-run default; no public multiplayer automation; Be Good reward shaping stays on.
H. Cloud AI beyond chat (extends Grok brainstorm)
| API |
Why |
First surface |
Risk |
| xAI full surface |
Completions + tools + Imagine + (optional) voice |
already brainstormed |
Cost |
| OpenAI / Anthropic |
Already partially wired — finish tool-calling parity |
orchestration backends |
Cost |
| Groq / Together / Fireworks |
Fast cheap fallback for agents |
llm provider groq |
Cost |
| Hugging Face Inference |
Local-ish model zoo |
hf infer … |
Cost |
| Deepgram / AssemblyAI |
Alt STT when Google Speech fails |
stt file … |
Cost / PII |
| ElevenLabs / Azure TTS |
Premium voice for coach |
tts speak … |
Cost |
I. Home / robotics / IoT (extends ROS)
| API |
Why |
First surface |
Risk |
| Home Assistant REST |
Lights/sensors as agent tools (allowlist) |
hass state light.x |
Safety-critical |
| MQTT broker |
Sensor bus into PerceptionBus |
mqtt sub topic |
Local |
| Philips Hue / local |
Narrow allowlist |
optional |
Low |
Hard allowlist + never unlock doors without dual confirm.
J. Finance / commerce (mostly avoid or read-only)
| API |
Stance |
| Stripe / Plaid / brokerage |
Out of scope unless read-only paper; LegalShield + no advice |
| CoinGecko (public) |
Optional price display only |
| eBay / Amazon PA-API |
Skip for now (ToS + abuse surface) |
| API |
Why |
| GitHub Device Flow / OAuth App |
Better than long-lived PAT paste |
| Microsoft identity (MSAL) |
Unlocks Graph cleanly |
| 1Password / Windows Credential Manager |
Secret storage instead of settings plaintext |
3. SkillLibrary packs (install bundles)
Mirror github skills install:
| Bundle |
Seeds plans like |
wiki skills install |
wiki search, wiki get, inject to RAG |
arxiv skills install |
search → discovery draft |
law-data skills install |
CourtListener search (education) |
weather skills install |
Open-Meteo + NWS alerts |
steam skills install |
owned library → gaming curriculum hint |
ci skills install |
GitHub Actions failed run → Desktop Support |
notify skills install |
telegram/discord allowlisted notify |
4. Priority tiers (if you implement later)
Tier 0 — free, high RAG value, low risk (~1–2 days each)
- Wikipedia / MediaWiki
- Open-Meteo + NWS (strengthen WeatherHazards)
- arXiv
- Open Library / MusicBrainz (MediaCompute quality)
Tier 1 — extends what you just built
- GitHub Actions / checks API (same token as GithubRestAPI)
- GitLab (copy façade)
- xAI Grok wire-up (G0) from Grok brainstorm
- Plex/Jellyfin local for media library sync
Tier 2 — agents & ops
- Discord or Telegram notify (allowlist)
- Sentry for Desktop Support
- Linear or Jira for RSI task sync
- CourtListener (education + LegalShield)
Tier 3 — heavier OAuth / ToS
- Microsoft Graph deep
- Steam / Riot (gaming metadata only)
- Home Assistant allowlisted tools
- Multimodal Imagine / STT vendors
5. Shared module sketch
class _VendorApi {
Init / GetStatus / LastError
Request(method, path, body) // curl + Bearer/key
TestConnection
InstallSkills() // SkillLibrary
HandleSpeechCommand
RegisterLuaGlobals
};
Shared helpers worth extracting once 3+ vendors exist:
HttpJsonClient (curl + headers + timeout + redact logs)
SecretStore (env → DPAPI/cred manager → settings)
ApiAuditLog → ai_features.ai_audit_log
RateLimiter per host
6. Explicit non-goals (for now)
- Auto-trading, auto-buying, auto-social-posting without human confirm
- Multiplayer game automation via vendor APIs
- Putting any cloud key on Android companion
- Scraping sites that forbid bots when a public API exists
7. “Do this first” shortlist
- Wikipedia + arXiv → RAG packs (max truth, min auth).
- GitHub Actions under existing
GithubRestAPI (one token, more skill value).
- Open-Meteo/NWS under WeatherHazards.
- Grok G0 completions path.
- Telegram notify for agent completion (narrow, high UX).
Living brainstorm — promote a row to an implementation checklist when you pick a vendor.