auth_headers() -> dict[str, str] is a valid session. A paywalled API
returns its tokens; a public API returns an empty dict. This is the design that keeps
the engine API-agnostic — adding an API is data (the spec) plus, at most, this one
adapter.
Sessions you get out of the box
Session
A two-token authenticated session (JWT + API token). Returned by the access
handshake.
NoAuthSession
For public, no-auth APIs —
auth_headers() returns an empty dict.stub_session
A non-live session for recorded demos: auth headers are present but not real.
How auth gating works
When a session returns an empty auth-header dict, Gecko treats it as “this session can’t satisfy auth-gated operations” and hides those operations from the agent — it could only mis-call them. A session with auth surfaces everything, unchanged. If an auth-gated tool is forced anyway,prepare() raises a typed error
rather than firing a request that can’t succeed.
The two-token handshake (worked example)
The live reference integration (the TxODDS World Cup API) uses a flow the agent never has to learn. Gecko encodes it so the agent only ever describes intent:The on-chain step
Thesubscribe transaction itself is a wallet-signing, network-specific step that
lives outside the access layer (in scripts/). The access layer takes the resulting
txSig plus a signer and finishes the session.
What Gecko never does with credentials
- It never exposes auth headers in the agent-facing tool definitions.
- It never logs tokens or keys — secrets are redacted before any error is raised.
- It never stores secrets; they are read from the session/environment at call time.