{"id":48343063,"url":"https://github.com/Lap-Platform/LAP","last_synced_at":"2026-04-20T19:01:28.309Z","repository":{"id":341598337,"uuid":"1152847160","full_name":"Lap-Platform/LAP","owner":"Lap-Platform","description":"Your agents are guessing at APIs. Give them the actual Agent-Native spec. 1500+ API's Ready To-Use skills,  Compile any API spec into a lean, agent-native format. 10× smaller. OpenAPI, GraphQL, AsyncAPI, Protobuf, Postman.","archived":false,"fork":false,"pushed_at":"2026-03-26T19:29:48.000Z","size":7569,"stargazers_count":216,"open_issues_count":0,"forks_count":14,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-04-01T22:17:39.215Z","etag":null,"topics":["agent-experience","ai","ai-agents","api","api-compression","api-spec","asyncapi","claude","cli","developer-tools","graphql","llm","mcp","open-source","openapi","postman","protobuf","python","sdk","token-optimization"],"latest_commit_sha":null,"homepage":"https://lap.sh/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lap-Platform.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"Lap-Platform"}},"created_at":"2026-02-08T14:29:28.000Z","updated_at":"2026-04-01T05:25:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Lap-Platform/LAP","commit_stats":null,"previous_names":["lap-platform/lap"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/Lap-Platform/LAP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lap-Platform%2FLAP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lap-Platform%2FLAP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lap-Platform%2FLAP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lap-Platform%2FLAP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lap-Platform","download_url":"https://codeload.github.com/Lap-Platform/LAP/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lap-Platform%2FLAP/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32061251,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-experience","ai","ai-agents","api","api-compression","api-spec","asyncapi","claude","cli","developer-tools","graphql","llm","mcp","open-source","openapi","postman","protobuf","python","sdk","token-optimization"],"created_at":"2026-04-05T06:00:22.336Z","updated_at":"2026-04-20T19:01:28.274Z","avatar_url":"https://github.com/Lap-Platform.png","language":"Python","readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"assets/readme-logo-dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"assets/light/readme-logo-light.png\"\u003e\n  \u003cimg alt=\"LAP — Lean API Platform\" src=\"assets/readme-logo-dark.png\"\u003e\n\u003c/picture\u003e\n\n# Lean API Platform\n\n**Agent-Native API specs. Verified, compressed, ready to install.**\n\n\u003ca href=\"https://pypi.org/project/lapsh/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/lapsh?style=for-the-badge\u0026color=blue\" alt=\"PyPI\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/Lap-Platform/lap/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/Lap-Platform/lap/ci.yml?branch=main\u0026style=for-the-badge\u0026label=tests\" alt=\"Tests\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/package/@lap-platform/lapsh\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@lap-platform/lapsh?style=for-the-badge\u0026color=blue\" alt=\"npm\"\u003e\u003c/a\u003e\n\u003cbr\u003e\n\u003ca href=\"https://github.com/Lap-Platform/lap/tree/main/skills/lap\"\u003e\u003cimg src=\"https://img.shields.io/badge/Claude%20Code-skill-orange?style=for-the-badge\" alt=\"Claude Code Skill\"\u003e\u003c/a\u003e\n\u003ca href=\"https://clawhub.ai/mickmicksh/lap\"\u003e\u003cimg src=\"https://img.shields.io/badge/OpenClaw-skill-orange?style=for-the-badge\" alt=\"OpenClaw Skill\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/Lap-Platform/lap/tree/main/skills/cursor\"\u003e\u003cimg src=\"https://img.shields.io/badge/Cursor-Rules-black?style=for-the-badge\" alt=\"Cursor Rules\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/Lap-Platform/lap/tree/main/skills/codex\"\u003e\u003cimg src=\"https://img.shields.io/badge/Codex-skill-green?style=for-the-badge\" alt=\"Codex Skill\"\u003e\u003c/a\u003e\n\u003cbr\u003e\n\u003ca href=\"https://github.com/Lap-Platform/lap/pulls\"\u003e\u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge\" alt=\"PRs Welcome\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/Lap-Platform/lap\"\u003e\u003cimg src=\"https://img.shields.io/badge/%E2%AD%90_Star-this_repo-yellow?style=for-the-badge\" alt=\"Star this repo\"\u003e\u003c/a\u003e\n\u003cbr\u003e\n\u003ca href=\"https://lap.sh\"\u003e\u003cimg src=\"https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fregistry.lap.sh%2Fv1%2Fstats.json\u0026query=%24.total_apis\u0026label=Registry\u0026suffix=%20APIs\u0026color=blueviolet\u0026style=for-the-badge\" alt=\"APIs in Registry\"\u003e\u003c/a\u003e\n\n[Website](https://lap.sh) · [Registry](https://lap.sh) · [Benchmarks](https://github.com/Lap-Platform/Lap-benchmark-docs) · [Docs](docs/)\n\n[Request a Spec](https://github.com/Lap-Platform/lap/issues/new?template=spec-request.yml) · [Report a Bug](https://github.com/Lap-Platform/lap/issues/new?template=bug-report.yml) · [Request a Feature](https://github.com/Lap-Platform/lap/issues/new?template=feature-request.yml)\n\n\u003c/div\u003e\n\n---\n\nWithout API documentation, LLM agents hallucinate endpoints, invent parameters, and guess auth flows -- scoring just **0.399 accuracy** in blind tests.\n\nLAP fixes this. One command gives your agent a verified, agent-native API spec -- jumping accuracy to **0.860**. And because LAP specs are up to 10x smaller than raw OpenAPI, you also save 35% on cost and run 29% faster.\n\n**Not minification** -- a purpose-built compiler with its own grammar.\n\n### Proven in 500 blind runs across 50 APIs\n\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"assets/benchmark_savings.png\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"assets/light/benchmark_savings.png\"\u003e\n    \u003cimg alt=\"88% fewer tokens, 35% lower cost, same accuracy\" src=\"assets/benchmark_savings.png\" width=\"700\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\nLAP Lean scored **0.851** (vs 0.825 raw) while using **35% less cost** and **29% less time** -- same accuracy, far fewer tokens.\n\n\u003e [Full benchmark report (500 runs, 50 specs, 5 formats)](https://lap-platform.github.io/Lap-benchmark-docs/results/LAP_Benchmark_v2_Full_Report.html) · [Benchmark methodology and data](https://github.com/Lap-Platform/Lap-benchmark-docs)\n\n## Quick Start\n\n```bash\n# Set up LAP in your IDE\nnpx @lap-platform/lapsh init                    # Claude Code\nnpx @lap-platform/lapsh init --target cursor    # Cursor\nnpx @lap-platform/lapsh init --target codex     # Codex\n\n# Search the registry for an API\nnpx @lap-platform/lapsh search payment\n\n# Download a spec\nnpx @lap-platform/lapsh get stripe -o stripe.lap\n\n\n# Install an API skill\nnpx @lap-platform/lapsh skill-install stripe\n\n# Or compile your own spec\nnpx @lap-platform/lapsh compile api.yaml --lean\n```\n\n### Use as an Agent Skill\n\nInstall the LAP skill so your agent can search, compile, and manage APIs automatically:\n\n**Claude Code:**\n```bash\nnpx @lap-platform/lapsh init\n```\n\n**Cursor:**\n```bash\nnpx @lap-platform/lapsh init --target cursor\n```\n\n**Codex (CLI \u0026 VS Code extension):**\n```bash\nnpx @lap-platform/lapsh init --target codex\n```\n\nCodex agents use curl for registry operations (search, get, check) instead of npx -- instant in the sandbox. Skills install to `~/.codex/skills/`. Auto-update hooks are pre-configured for when Codex enables its hooks engine (`codex_hooks` feature flag is currently experimental).\n\n**OpenClaw:** install from [ClawHub](https://clawhub.ai/mickmicksh/lap) or copy manually:\n```bash\ncp -r skills/lap ~/.openclaw/skills/lap\n```\n\nOnce installed, agents auto-trigger the skill when working with APIs -- or invoke it directly with `/lap`. You can also install individual API skills for specific integrations:\n\n```bash\nnpx @lap-platform/lapsh skill-install stripe\n# Agent now knows the full Stripe API\n```\n\n\u003e **Want to get listed?** [Register as a verified publisher](https://registry.lap.sh) and share your specs and skills with the registry.\n\n```bash\n# Install globally (npm or pip)\nnpm install -g @lap-platform/lapsh\npip install lapsh\n```\n\n## What You Get\n\n- 📦 **Registry** — browse and install 1500+ pre-compiled specs at [lap.sh](https://registry.lap.sh)\n-  🗜️ **5.2× median compression** on OpenAPI, up to 39.6× on large specs — **35% cheaper, 29% faster** ([benchmarks](BENCHMARKS.md))\n- 📐 **Typed contracts** — `enum(a|b|c)`, `str(uuid)`, `int=10` prevent agent hallucination\n- 🔌 **6 input formats** — OpenAPI, GraphQL, AsyncAPI, Protobuf, Postman, Smithy\n- 🎯 **Zero information loss** — every endpoint, param, and type constraint preserved\n- 🔁 **Round-trip** — convert back to OpenAPI with `lapsh convert`\n- 🤖 **Skill generation** — `lapsh skill` creates agent-ready skills from any spec\n- 🔗 **Integrations** — LangChain, Context Hub, Python/TypeScript SDKs\n\n## How It Works\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/pipeline.png\" alt=\"How LAP works — 5 compression stages\" width=\"800\"\u003e\n\u003c/p\u003e\n\nFive compression stages, each targeting a different source of token waste:\n\n| Stage | What it does | Savings |\n|-------|-------------|--------:|\n| **Structural removal** | Strip YAML scaffolding — `paths:`, `requestBody:`, `schema:` wrappers vanish | ~30% |\n| **Directive grammar** | `@directives` replace nested structures with flat, single-line declarations | ~25% |\n| **Type compression** | `type: string, format: uuid` → `str(uuid)` | ~10% |\n| **Redundancy elimination** | Shared fields extracted once via `@common_fields` and `@type` | ~20% |\n| **Lean mode** | Strip descriptions — LLMs infer meaning from well-named parameters | ~15% |\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/demo.gif\" alt=\"LAP CLI demo\" width=\"700\"\u003e\n\u003c/p\u003e\n\n## Benchmarks\n\n**1,500+ specs · 5,228 endpoints · 4.37M → 423K tokens**\n\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"assets/format_comparison.png\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"assets/light/format_comparison.png\"\u003e\n    \u003cimg alt=\"Compression by API format\" src=\"assets/format_comparison.png\" width=\"600\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\n| Format | Specs | Median | Best |\n|--------|------:|-------:|-----:|\n| **OpenAPI** | 30 | **5.2×** | 39.6× |\n| **Postman** | 36 | **4.1×** | 24.9× |\n| **Protobuf** | 35 | **1.5×** | 60.1× |\n| **AsyncAPI** | 31 | **1.4×** | 39.1× |\n| **GraphQL** | 30 | **1.3×** | 40.9× |\n\nVerbose formats compress most — they carry the most structural overhead. Already-concise formats like GraphQL still benefit from type deduplication.\n\n## The Ecosystem\n\nLAP is more than a compiler:\n\n| Component | What | Command |\n|-----------|------|---------|\n| **Init** | Set up LAP in your IDE | `lapsh init --target claude` |\n| **Search** | Find APIs in the registry | `lapsh search payment` |\n| **Get** | Download a spec by name | `lapsh get stripe` |\n| **Skill Install** | Install an API skill | `lapsh skill-install stripe --target claude` |\n| **Skill Uninstall** | Remove an installed skill | `lapsh skill-uninstall stripe` |\n| **Uninstall** | Fully remove LAP from your IDE | `lapsh uninstall --target claude` |\n| **Check** | Check installed skills for updates | `lapsh check [--target claude\\|cursor\\|codex]` |\n| **Diff** | Compare installed skill vs registry | `lapsh diff stripe` |\n| **Pin / Unpin** | Skip or resume update checks | `lapsh pin stripe` |\n| **Compiler** | Any spec → `.lap` | `lapsh compile api.yaml` |\n| **Skill Generator** | Create agent-ready skills from any spec | `lapsh skill api.yaml --install` |\n| **API Differ** | Detect breaking API changes | `lapsh diff old.lap new.lap` |\n| **Round-trip** | Convert LAP back to OpenAPI | `lapsh convert api.lap -f openapi` |\n| **Publish** | Share specs to the registry | `lapsh publish api.yaml --provider acme` |\n\n\u003e **Claude Code, Cursor \u0026 Codex:** The `lap` skill is included -- run `lapsh init` and your agent can search, install, and manage API skills directly. Claude Code and Cursor support auto-update checks via SessionStart hooks. Codex hooks are pre-configured and will activate when the `codex_hooks` feature becomes stable.\n\n## Supported Formats\n\n```bash\nlapsh compile  api.yaml           # OpenAPI 3.x / Swagger\nlapsh compile  schema.graphql     # GraphQL SDL\nlapsh compile  events.yaml        # AsyncAPI\nlapsh compile  service.proto      # Protobuf / gRPC\nlapsh compile  collection.json    # Postman v2.1\nlapsh compile  model.smithy       # AWS Smithy\n```\n\nFormat is auto-detected. Override with `-f openapi|graphql|asyncapi|protobuf|postman|smithy`.\n\n## Top Compressions\n\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"assets/compression_bar_chart.png\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"assets/light/compression_bar_chart.png\"\u003e\n    \u003cimg alt=\"Top 15 OpenAPI APIs by compression ratio\" src=\"assets/compression_bar_chart.png\" width=\"650\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\n## Integrations\n\n```python\n# LangChain\nfrom lap.middleware import LAPDocLoader\ndocs = LAPDocLoader(\"stripe.lap\").load()\n```\n\nLangChain, Context Hub, and Python/TypeScript SDKs. See [integration docs](docs/guide-integrate.md).\n\n## FAQ\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eWhy do agents hallucinate API calls?\u003c/b\u003e\u003c/summary\u003e\n\nBecause they have no way to find the spec, and even if they could, it's a million tokens of YAML written for humans. Agents without specs score 0.399 accuracy -- wrong 60% of the time. They hallucinate endpoint paths, send invalid types, and miss auth. Give them a LAP spec and accuracy jumps to 0.860. The spec doesn't make the agent smarter. It makes guessing unnecessary.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eHow is this different from OpenAPI?\u003c/b\u003e\u003c/summary\u003e\n\nLAP doesn't replace OpenAPI — it compiles FROM it. Like TypeScript → JavaScript: you keep your OpenAPI specs, your existing tooling, everything. LAP adds a compilation step for the LLM runtime.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eHow is this different from MCP?\u003c/b\u003e\u003c/summary\u003e\n\nMCP defines how agents discover and invoke tools (the plumbing). LAP compresses the documentation those tools expose (the payload). They're complementary — LAP can compress MCP tool schemas.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eWhy not just minify the JSON?\u003c/b\u003e\u003c/summary\u003e\n\nMinification removes whitespace — that's ~10% savings. LAP performs semantic compression: flattening nested structures, deduplicating schemas, compressing type declarations, and stripping structural overhead. That's 5-40× savings. Different class of tool.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eWhat about prompt caching?\u003c/b\u003e\u003c/summary\u003e\n\nUse both. Compress with LAP first, then cache the compressed version. LAP reduces the first-call cost and frees context window space. Caching reduces repeated-call cost. They stack.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eWill LLMs understand this format?\u003c/b\u003e\u003c/summary\u003e\n\nYes. LAP uses conventions LLMs already know — `@directive` syntax, `{name: type}` notation, HTTP methods and paths. In blind tests, agents produce identical correct output from LAP and raw OpenAPI. The typed contracts actually reduce hallucination.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eWhat if token costs keep dropping?\u003c/b\u003e\u003c/summary\u003e\n\nCost is the least important argument. The core value is typed contracts: `enum(succeeded|pending|failed)` prevents hallucinated values regardless of token price. Plus: formal grammar (parseable by code, not just LLMs), schema diffing, and faster inference from fewer input tokens.\n\u003c/details\u003e\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md). CI runs on every push and PR -- Python 3.11/3.12 and Node 18/20.\n\n**Python** (18 test files, 1,083 tests):\n\n| Suite | What it covers |\n|-------|----------------|\n| **Compilers** | OpenAPI, GraphQL, AsyncAPI, Protobuf, Postman, Smithy |\n| **Round-trip** | Compile → parse → re-emit across 190+ specs |\n| **Skill \u0026 Tool** | Skill compiler, tool format, MCP manifest, skill updates |\n| **Agent** | Agent implementation verification (enum, nested, array handling) |\n| **Differ** | Breaking change detection, compatibility checking |\n| **CLI** | Auth, search, version, integration (subprocess) |\n| **Quality** | Regression tests for compiler bug fixes |\n\n**TypeScript SDK** (14 test files -- full compiler parity):\n\n| Suite | What it covers |\n|-------|----------------|\n| **Compilers** | OpenAPI, GraphQL, AsyncAPI, Protobuf, Postman, Smithy, AWS SDK |\n| **Parser \u0026 Serializer** | LAP text round-trip in TypeScript |\n| **Skills** | Skill compilation, LLM integration |\n| **CLI \u0026 Auth** | CLI commands, credential management |\n| **Search** | Registry search helpers |\n\n```bash\ngit clone https://github.com/Lap-Platform/lap.git\ncd lap\n\n# Python tests\npip install -e \".[dev]\"\npytest\n\n# TypeScript SDK tests\ncd sdks/typescript\nnpm ci \u0026\u0026 npm test\n```\n\n## License\n\n[Apache 2.0](LICENSE) — See [NOTICE](NOTICE) for attribution.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**[lap.sh](https://lap.sh)** · Built by the LAP team\n\n\u003c/div\u003e\n","funding_links":["https://github.com/sponsors/Lap-Platform"],"categories":["Code Generation \u0026 Automation"],"sub_categories":["Other IDEs"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLap-Platform%2FLAP","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLap-Platform%2FLAP","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLap-Platform%2FLAP/lists"}