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 → signing gate.
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 execute
plan_* returns the full account set plus state-read args and landing preludes → an
external builder builds → Gecko simulates → a Receipt → a fail-closed signing
gate → an external signer (wallet / TEE / human).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 on a $0 fork → Receipt → only a passing receipt reaches the signer.
- 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.
- Simulate —
simulateTransactionwithsigVerify:falseon a $0 mainnet fork. - Receipt — status, categorical revert class, compute units. → The Receipt
- Signing gate — fail-closed. Only a passing verdict reaches an external signer.
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 broadcast
sendTransaction. AST-enforced at the boundary.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).
- 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 · verdict signing gate · the AST-enforced never-sign boundary.
architecture.llms.txt
in the engine repo — the same three views plus the honest works / not-built split. See
also Status.