Source-grounded answers for Android code questions.
Lightrion AOSP RAG gives Claude Code, Cursor, and any MCP client direct access to Android Open Source Project source code through semantic search. Stop letting your coding agent guess what an Android API does — let it read the actual implementation.
Four MCP tools, one canonical source of Android truth.
When you ask your AI coding agent “how does Android handle audio focus in cars,” it usually reaches into training data and approximates. With Lightrion, it searches the actual source, retrieves the relevant chunks, and grounds its answer in real code paths.
-
search_code
Semantic search across the AOSP tree, ranked by relevance. Find every implementation of a concept, even when wording differs from the source — “audio focus,” “property service,” “USB host mode.”
-
get_chunk
Retrieve the full content and metadata of a specific code chunk by ID. Useful when search returns a top result and you want the whole function, not just the snippet.
-
get_file
Read any source file by its repository path, optionally bounded by line range. Lets the agent inspect imports, neighbouring methods, or read a class top to bottom.
-
list_versions
Discover which AOSP releases are indexed and queryable. The agent uses this to decide which version to target for follow-up searches, without you hardcoding anything.
Four releases, side by side.
Every tool accepts an optional version argument
("16", "15", "14", or "13").
When omitted, queries default to AOSP 16,
the most recent release. The chunk_id space is per-version, so a chunk found via
search_code(version="15") must be fetched with
get_chunk(version="15").
-
AOSP 16 · default
Release tag:
android-16.0.0_r4732,264 indexed chunks across Java, Kotlin, C/C++, Rust, AIDL, Blueprint, SELinux policy, and init scripts.
-
AOSP 15
Release tag:
android-15.0.0_r36697,377 indexed chunks. Useful when you maintain code on the previous LTS branch or compare API behavior across releases.
-
AOSP 14
Release tag:
android-14.0.0_r75683,878 indexed chunks. Useful when supporting devices on older LTS branches or comparing API behavior across multiple AOSP releases.
-
AOSP 13
Release tag:
android-13.0.0_r84597,492 indexed chunks. Useful for long-lived Android 13 deployments — especially automotive platforms shipping on older AAOS baselines — and for tracing regressions back across releases.
All major AOSP releases from 13 to 16 are indexed and queryable. See the docs for the full usage pattern.
Three steps from sign-up to source-grounded answers.
-
Request a key
Fill out the short form below. You’ll receive a confirmation email from
dan@lightrion.comwithin a minute. Click the link, and your API key arrives in a follow-up message right after. -
Register the MCP server with your tool
For Claude Code:
claude mcp add --transport http aosp-rag \ https://aosp-rag.lightrion.com/mcp/ \ --header "Authorization: Bearer lr_prod_..."Cursor, Cline, Zed, and any other MCP-compatible client follow the same pattern: a Streamable-HTTP endpoint plus a bearer-token header. See the docs for tool-specific instructions.
-
Ask your agent about Android
Then just talk to your coding agent as usual:
> Using aosp-rag, find the implementation of audio focus > for car media playback in AOSP 16, and show me the top > result with surrounding context from the actual file.The agent calls
search_code, picks the most relevant chunk, then callsget_filefor the surrounding lines. You get an answer rooted in code you can verify.
Built for engineers shipping on top of AOSP.
Automotive HMI teams, OEM platform engineers, security researchers, and anyone
who has ever scrolled through cs.android.com at 11 p.m. looking for
one function. If your AI coding tool has been wrong about an Android API
one too many times, this is for you.
Get a free key.
A free tier will always exist for individual developers, researchers, and small projects. The AOSP source we index is open source, and access to it shouldn’t be gated for the people building on top of it. Higher quotas and team plans will come later for organizations that need them.
Rate-limited per key (60 requests/minute, 1,000/hour). By signing up you agree to the terms and privacy policy.