# SXP (Scoped Execution Protocol) > SXP (Scoped Execution Protocol) provides guarded tool execution in Python and TypeScript, with adapters for MCP, A2A JSON-RPC, AG-UI events, and OpenAPI. ## Key Facts for AI & Coding Agents - **Core Packages:** `sxp` (`scoped-execution-protocol`, Python 3.10+, 25 root exports, 0 dependencies, plus `sxp.policy`) and `@sxp/core` / `@sxp/core/policy` (TypeScript/ESM, 0 dependencies). - **Primary Primitives:** 1. `HandleStore` (`REF#` SHA-256 addressing that binds data, policy, taint, and expiry, receiver-extracted `L0` summaries, lazy `L1` views, chunked `L2` raw reads, synced LRU eviction, `ephemeral` RAM-only mode, `purge()`). 2. Guarded Call Boundary (`call` / `acall` / `handle_envelope`, 7-field `CoreEnvelope`, CAS `PreviewLease`, `idempotency_key`, `HardRail`, `CredentialVault`, `ReplayGuard`, `$sig` HMAC-SHA256 wire auth, `ResultProjection`, `project_handoff`). 3. 3-Mode Prefix-Cache-Safe Cognitive Projection (`standard`, `compact`, `flat` for 1B-8B System 1 models + zero-copy `spawn_system2_escalation()`). - **CLI & Policy Tools:** `sxp host-config`, `sxp serve-mcp`, `sxp test `, and `sxp explain `. - **Measurements:** The runnable benchmark reports synthetic upfront and deferred discovery sizes, compares rails elision at equal compression settings, and times in-process Python calls. - **Install (Python):** `python -m pip install "https://github.com/matthewmajo/sxp/releases/download/v1.0.0/scoped_execution_protocol-1.0.0-py3-none-any.whl"` (`import sxp`, `sxp` CLI). - **Build & Test (TypeScript):** `cd typescript && npm ci && npm test` ## Normative Specification & Schemas - [SXP v1.0 Specification](https://github.com/matthewmajo/sxp/blob/main/spec/SPEC.md): Normative wire, security, privacy, audit-chain, and bridge rules. - [Core Envelope JSON Schema](https://github.com/matthewmajo/sxp/blob/main/spec/schema/envelope.schema.json): JSON Schema 2020-12 for the 7-field Core Envelope. - [Result Projection JSON Schema](https://github.com/matthewmajo/sxp/blob/main/spec/schema/result-projection.schema.json): JSON Schema 2020-12 for declarative read-result allowlists (`ResultProjection`). - [Cross-Language Conformance Vectors](https://github.com/matthewmajo/sxp/blob/main/conformance/vectors.json): Canonical hashing, wire HMAC (`wire_hmac`), policy-bound reference addressing (`ref_policy_addressing`), capability attenuation, budget reserve, L0 anti-spoofing, privacy clearance, span grounding, HardRail anti-evasion, and MCP annotation mapping vectors. - [Conformance Guide](https://github.com/matthewmajo/sxp/blob/main/conformance/README.md): How Python and Node.js runtimes certify against `vectors.json` and `result-projection.json`. ## SDK & Bridge Entrypoints - [Python Core Package](https://github.com/matthewmajo/sxp/tree/main/python/sxp): `AgentKernel`, `AppConnector`, `HandleStore`, `HardRail`, `Capability`, `CredentialVault`, `DataPolicy`, `Clearance`, `Reducer`, `ResultProjection`, `SXPHttpServer`, `HttpTransport`, `ReplayGuard`. - [Python Adapters](https://github.com/matthewmajo/sxp/tree/main/python/sxp/bridges): `connect_mcp_config`, `handle_inbound_mcp_jsonrpc`, `serve_mcp_stdio`, `ToolHostAdapter`, `A2ABridge`, `wrap_a2a_peer`, `AGUIBridge`, `wrap_openapi_spec`, `wrap_http_endpoint`, `export_tools_{openai,anthropic,gemini}`. - [TypeScript Core & Bridges](https://github.com/matthewmajo/sxp/tree/main/typescript/src): `@sxp/core`, `@sxp/core/policy`, and `@sxp/core/bridges` full ESM reference SDK. - [Runnable Examples](https://github.com/matthewmajo/sxp/tree/main/examples): Quickstart, 10-server `.mcp.json` bridge, privacy + A2A + AG-UI, and System 1 benchmarks. ## Agent & Governance Docs - [Coding Agent Guide (AGENTS.md)](https://github.com/matthewmajo/sxp/blob/main/AGENTS.md): Build/test commands, invariants, and integration snippets for coding agents. - [Security Policy](https://github.com/matthewmajo/sxp/blob/main/SECURITY.md): Threat model summary and private advisory reporting. - [Contributing Guide](https://github.com/matthewmajo/sxp/blob/main/CONTRIBUTING.md): SXP Hourglass Rule and PR checklist.