OpenCode is an open-source AI coding agent. It runs as a CLI, calls LLMs over HTTPS, and shells out to local tools. Authsome plugs in via the same two patterns we use everywhere: wrap the agent underDocumentation Index
Fetch the complete documentation index at: https://authsome.agentr.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
authsome run --, or call the library from inside.
Recommended pattern: wrap the agent
OPENAI_API_KEY=authsome-proxy-managed) but never the real key. Outbound HTTPS to matched provider hosts is authenticated by the proxy.
Embedding the library
If you’re orchestrating OpenCode from a larger Python program and need explicit per-call control, drop below the proxy:Multi-account
--force. See Multiple connections per provider.
Troubleshooting
| Symptom | Fix |
|---|---|
OPENAI_API_KEY rejected as invalid | OpenCode is running outside authsome run. Wrap it. |
TLS errors against api.openai.com | Trust the mitmproxy CA. See Proxy networking. |
What’s next
Run agents with the proxy
Full proxy walkthrough.
Generic Python agent
The library pattern for any Python script.