The fastest and most reliable way to do a web task is often not a browser at all — it's the site's official API. Tsaagan's API layer lets your agent prefer that path, with keys stored securely and even set up for you by the browser layers.
Keys live in your OS-native secret store — macOS Keychain, Linux libsecret, or Windows DPAPI — OS-encrypted, unreadable without your login, never in the repo, never in env, never a plaintext file. A small index file records which services have keys (names only, never the secret).
tsaagan vault set service=openai secret="sk-…" # stored in Keychain
tsaagan vault set service=github account=work secret="ghp_…"
tsaagan vault list # { openai:[default], github:[work] } — names only
tsaagan vault get service=openai # prints the secret (your explicit request)
tsaagan vault delete service=openaitsaagan api providers # known services
tsaagan api detect=https://api.openai.com/v1/models # is there a known API for this host?
tsaagan api service=openai path=/models # GET with the stored key + provider defaults
tsaagan api service=github path=/user
tsaagan api service=stripe path=/customers method=GET
tsaagan api url=https://any.api/endpoint service=openai method=POST body='{"x":1}'The provider registry (lib/providers.json) knows each service's base URL + auth
header format (Bearer / x-api-key / extra headers). Add your own by editing it.
The browser layer bootstraps the API layer. When Tsaagan lands on a site that offers an API, the agent can:
tsaagan api detect=<current url>→ find the key-creation URL.- Drive the browser to that page (you're already logged in), create a key, and read it off the page.
tsaagan vault set service=<x> secret=<the key>→ stored in Keychain.- Tell you: "this site has an API — I set it up; future tasks will use it directly."
From then on, that task runs through the API (Layer 1) instead of the UI.
- Secrets: OS-native vault only (Keychain / libsecret / DPAPI). The
apicaller reads a key at call-time and never logs it.vault getprints a secret only because you explicitly asked. - No third party sees your keys; calls go straight from your machine to the provider.
- Cross-platform, OS-native encryption: macOS Keychain (
security), Linux libsecret (secret-tool;apt install libsecret-tools), Windows DPAPI (per-user encrypted file via PowerShell). Samevaultcommands everywhere.
No browser, no UI to drive, no scraping — just your own credentials calling an official API you're entitled to use. Faster and more robust. Prefer it whenever it exists.