# NEAR OutLayer > Verifiable compute and custody for AI agents, on NEAR. An agent gets a TEE-held wallet that signs for NEAR, EVM and Solana without a key ever leaving the enclave, spends it under a policy its owner sets, and calls priced connectors — named operations that run inside that same enclave. The compute layer is also callable directly: you publish a WASI program to GitHub, OutLayer compiles it, runs it inside an Intel TDX enclave, and returns the result signed by the enclave — from a NEAR smart contract or over HTTPS. Agents also get encrypted secrets and persistent storage. Two integration modes. **On-chain:** a NEAR contract calls `request_execution` and receives the result in a callback. **Web2:** a backend calls `POST https://api.outlayer.ai/call/{project_owner}/{project_name}` over HTTPS. **API base URL is `https://api.outlayer.ai`** — the `api.` subdomain. `https://app.outlayer.ai` is the dashboard and docs site and serves no API. Testnet API base is `https://testnet-api.outlayer.ai`. HTTPS authentication is either a payment key (`X-Payment-Key: {owner}:{nonce}:{secret}`) or a trial worker key (`Authorization: Bearer wk_...`). There is no `X-API-Key` header. Mainnet contract: `outlayer.near`. Testnet contract: `outlayer.testnet`. NEAR RPC: `https://rpc.mainnet.fastnear.com` / `https://rpc.testnet.fastnear.com`. Full text of every document below is available in one fetch at https://app.outlayer.ai/llms-full.txt. ## Start here - [Getting Started](https://app.outlayer.ai/docs/getting-started): What OutLayer is, the two integration modes (NEAR contract callback vs. HTTPS API), and a first working agent - [Examples](https://app.outlayer.ai/docs/examples): Runnable example agents: verifiable randomness, price and weather oracles, AI inference, NEAR Intents swaps, private DAO voting, 2FA, Telegram bot, on-chain email ## Guides - [NEAR Contract Integration](https://app.outlayer.ai/docs/near-integration): Calling `request_execution` from a NEAR contract: arguments, callback shape, gas and payment, FastFS workflow, attestation of the returned result - [Web2 Integration](https://app.outlayer.ai/docs/web2-integration): Using OutLayer from an ordinary backend over HTTPS: quick start, monetization, environment variables, attestation, project capabilities - [WASI Guide](https://app.outlayer.ai/docs/wasi): Writing the agent itself: WASI Preview 1 vs. Preview 2, supported languages, host functions, resource limits, local testing, common pitfalls - [Developer Guide](https://app.outlayer.ai/docs/dev-guide): End-to-end path: write WASI code, push to GitHub, test on testnet, integrate from a contract ## Features - [Agent Custody](https://app.outlayer.ai/docs/agent-custody): TEE-held wallets for agents: agent IDs, multi-chain signing, policy engine, multisig approval, confidential NEAR Intents, NEP-413 message signing, sub-agents - [MPC Vaults](https://app.outlayer.ai/docs/vaults): Per-customer sovereign vaults: creation, vault-scoped secrets and wallets, recovery procedures, end-user verification, threat model - [Payment Checks](https://app.outlayer.ai/docs/payment-checks): Gasless agent-to-agent payments: transfer mechanism, key derivation, check lifecycle, security model - [Secrets](https://app.outlayer.ai/docs/secrets): Encrypted secrets decrypted only inside the enclave: binding types, access control, storage costs, confidential key derivation (CKD), DAO-governed keystore - [Projects](https://app.outlayer.ai/docs/projects): Project IDs, how a WASM binary is bound to a project, project environment variables, version management, storage security model - [Storage](https://app.outlayer.ai/docs/storage): Persistent key-value storage for agents: methods reference, atomic operations, per-user isolation, public storage and its external HTTP read API - [VRF](https://app.outlayer.ai/docs/vrf): Verifiable randomness: SDK usage, on-chain proof verification, security properties, user-side verification - [SDK](https://app.outlayer.ai/docs/sdk): The Rust `outlayer` crate: environment module, storage module, minimal project template, API reference - [HTTPS API](https://app.outlayer.ai/docs/https-api): Request and response format for `POST /call/{project_owner}/{project_name}`: base URLs per network, headers, body, environment variables, error codes - [Payment Keys](https://app.outlayer.ai/docs/payment-keys): Creating payment keys, key format, restrictions, balance management, rate limits, security practices - [Personal Account Binding](https://app.outlayer.ai/docs/account-binding): Letting an agent act as a named account its owner already has: the one transaction the holder signs (the wallet contract installed by hash as a global contract, NEP-591, and which wallets can sign that), which wallets are refused, how an agent asks to run under the bound name on both the HTTPS and on-chain doors, and how the owner ends it - [Agent Connect (leased accounts)](https://app.outlayer.ai/docs/agent-connect): The House of Stake lease mode: an account a partner provisions and lends to an agent under an on-chain spend grant, how that grant is a second ceiling above the owner policy, the narrower request shape a lease accepts, and the refusal classes a lease can answer with - [Binding API reference](https://app.outlayer.ai/docs/binding-api): The calls a bound-account integration makes: which of the two account identities each endpoint is about (everything under /binding/ is the asset account, everything else is the wallet own account), the arguments of every binding endpoint and how they differ between the leased and personal modes, running a job under the bound name on both doors, the single per-wallet velocity purse both doors share, the agent_connect_denied refusal classes with which are terminal, and which HTTP failures are worth retrying (Retry-After, not the status code, is the signal) - [Building a Connector](https://app.outlayer.ai/docs/connectors): The author side of a connector: the curated namespace and connector_id manifest that make one, the required top-level operation and its fail-closed pricing, the network allowlist declared in the wasm and enforced by the worker, the two different secrets (the author own credential versus one left for the calling agent), and the four mechanisms that can refuse a call - [Connectors & Subscriptions](https://app.outlayer.ai/docs/subscriptions): What a connector is and how its operations are priced on chain, the per-operation author share, subscriptions as a flat allowance for a payment key, and the trial — ten connector calls in the first week of a wallet, with no call quota for a caller who pays - [Earnings](https://app.outlayer.ai/docs/earnings): How developers earn from blockchain and HTTPS calls, checking attached payment inside WASM, viewing and withdrawing balances - [Pricing](https://app.outlayer.ai/docs/pricing): Dynamic pricing model, cost calculation, resource limits, refund policy ## Trust and verification - [TEE Attestation](https://app.outlayer.ai/docs/tee-attestation): What a worker signature proves: worker registration, post-quantum keys, per-execution attestation, data freshness, verification process - [Trust and Verification](https://app.outlayer.ai/docs/trust-verification): Verifying the whole stack: five-measurement Intel TDX verification, Sigstore-signed release images, ephemeral keys and their on-chain trail, deterministic keystore secrets ## Machine-readable specs - [OpenAPI specification](https://api.outlayer.ai/openapi.json): Complete HTTPS API schema — endpoints, request and response types, error codes - [Agent Custody skill file](https://skills.outlayer.ai/agent-custody/SKILL.md): Canonical agent-framework skill for custody: registration, funding, transfers, swaps, cross-chain deposit and withdraw, NEP-413 signing, sub-agents, error handling - [Full documentation text](https://app.outlayer.ai/llms-full.txt): Every document listed here, inlined in a single file ## Optional - [Source repository](https://github.com/out-layer/outlayer): Contract, worker, keystore, dashboard, SDK and WASI examples - [Worker attestation portal](https://workers.outlayer.ai): Live Intel TDX attestation status of the production worker fleet - [Playground](https://app.outlayer.ai/playground): Run an agent from the browser without writing an integration - [Dashboard](https://app.outlayer.ai/workspace): Projects, secrets, payment keys, executions and earnings