Discover and explore top open-source AI tools and projects—updated daily.
Lap-PlatformAgent API specification compiler for enhanced LLM accuracy
Top 84.6% on SourcePulse
Summary
Lap-Platform/LAP addresses the critical issue of LLM agents hallucinating API calls due to incomplete or overly verbose specifications. It provides a compiler that transforms standard API definitions (OpenAPI, GraphQL, etc.) into a highly compressed, "agent-native" format. This significantly boosts agent accuracy in API interaction, reduces token consumption for cost savings, and accelerates inference times, making LLM-powered API integration more reliable and efficient.
How It Works
LAP employs a multi-stage compilation process that semantically compresses API specifications. It strips structural YAML overhead, replaces nested structures with a flat @directive grammar, compresses type declarations (e.g., type: string, format: uuid to str(uuid)), eliminates redundancy, and optionally removes descriptions in "lean mode" for further token reduction. This purpose-built compiler preserves all API details while achieving substantial size reductions, enabling agents to process and utilize API contracts more effectively.
Quick Start & Requirements
npx @lap-platform/lapsh init for Claude Code, Cursor, or Codex.npm install -g @lap-platform/lapsh or pip install lapsh.Highlighted Details
lap.sh.enum(succeeded|pending|failed)) to prevent agent hallucinations.Maintenance & Community
The project includes issue trackers for bug reports and feature requests. Continuous integration is configured for Python 3.11/3.12 and Node 18/20. No explicit community channels like Discord or Slack are listed.
Licensing & Compatibility
The project is licensed under the Apache 2.0 license, which permits commercial use and integration into closed-source projects.
Limitations & Caveats
Codex agent hooks are currently experimental. While descriptions are stripped in "lean mode" to reduce token count, this relies on LLMs inferring meaning from well-named parameters, which might be a consideration for highly complex or poorly documented APIs.
1 month ago
Inactive
xingyaoww