View 1: Context engineering (the memory substrate)

Gecko as a memory substrate: semantic, procedural, episodic, and working memory, under someone else's agent, not replacing it.
docs/assets/architecture-context.html.
Download it and open it locally; it needs no server and no network.View 2: The full pipeline (sources → knowledge → action)

Untrusted sources pass an anti-poison gate into comprehension, become provenance-tagged graphs, project as MCP tools, and reach action only through simulate → receipt → binding.
Sources: all untrusted
llms.txt, Anchor IDLs, raw program source (Steel and native
too), and a 4,500-project on-chain catalog. Everything ingested is treated as
hostile input.Anti-poison gate
Comprehension
Operation / Param; PDA seed recovery from IDL and source
(source rescues what the IDL structurally drops); auto-comprehend on pick, which
emits a generated config plus a measured overlay of what could not be derived
from any public surface.Knowledge: provenance on every edge
EXTRACTED > DECLARED > INFERRED > CLAIMED → VERIFIED /
REFUTED. Program graph: EXTRACTED / RECOVERED / FLAGGED. Cross-API
correlations join on declared value domains first.Projection
Action: verify, never sign
plan_* returns the full account set plus state-read args and landing preludes → an
external builder builds → Gecko simulates the exact bytes → a Receipt with a
binding over those bytes → an external signer (wallet / TEE / human) signs →
verify_signed_transaction proves the signed bytes are the checked ones →
submit_transaction relays them, and refuses anything that does not verify.Learn
docs/assets/architecture.html.
Download it and open it locally; it needs no server and no network.View 3: The on-chain action path (the proven loop)

Intent → derive the full account set → state reads → external build → unsigned prelude assembly → simulate → Receipt + binding → external signer → verify → submit.
- Intent: “buy this token”, “swap SOL for USDC on this pool”.
- Derive the full account set, including accounts the IDL hides
(
bonding_curve_v2) and seeds recovered from source (base_factor). - State reads (control plane) for sane arguments, e.g. curve reserves →
max_sol_cost. - External build: the plan goes to the builder; the builder returns the instruction.
- Unsigned prelude assembly, for simulation only: idempotent ATA creation, wSOL wrap/unwrap, compute budget. On the money paths, a fresh blockhash is patched in at the offset the layout dictates, so the simulated bytes are the bytes handed back.
- Simulate:
simulateTransactionwithsigVerify:false, on a fork or against a public mainnet RPC. - Receipt + binding: status, categorical revert class, compute units, and a hash
over the exact message bytes at
exactstrength. → The Receipt - External signer signs. Then
verify_signed_transactionchecks the signed bytes against the binding, andsubmit_transactionrelays them only if that check passes.
submit_transaction, lives outside it and
is structurally unable to relay bytes without a binding.
docs/assets/architecture-onchain.html.
Download it and open it locally; it needs no server and no network.Invariants
Control plane, never data plane
The engine is API-agnostic
Session.auth_headers(). Adding an API doesn’t touch ingest/catalog/tools/caller.One code path, two modes
recorded and live differ only at the transport edge. The free offline
simulation comes first; live smoke is the final check.Auth is invisible to the agent
Never sign, never hold a key
submit_transaction relays only signed bytes that verify against a Gecko binding.Never fabricate
FLAGGED, not invented. Below the retrieval floor the answer is
an honest no-start.Module map
The comprehension logic is the product and lives in the package; the MCP server, the client, and the scripts are thin transport.The one seam that matters
Adding a new API should not require touching ingest, catalog, tools, or the caller. The only API-specific code is, at most, an auth adapter, an object that implements:{}); a paywalled API supplies
a session that returns its tokens. See Access & auth.
Security posture
- Ingested spec, doc, IDL, and source content is treated as untrusted input.
- URLs are validated before fetching (no SSRF: private/loopback/link-local ranges and
non-http schemes blocked). A caller-supplied
rpc_urlgoes through the same guard. - Secrets resolve from the OS keychain at call time and are never logged or persisted; errors redact tokens before they’re raised.
- Seven fail-closed security layers: spec sanitizer · per-tool quarantine · image Skill Guard · SSRF netguard · out-of-band auth anchoring · the signing gate that checks signed bytes against the receipt’s binding · the AST-enforced no-sign boundary on the landing layer.
architecture.llms.txt
in the engine repo: the same three views plus the honest works / not-built split. See
also Status.