AILog — AI Log Triage for AOSP & Android Automotive
Stop drowning in 50,000 log lines. Let AILog find what matters.
AILog reads your AOSP build errors, adb logcat, and full bugreports — and tells you
what actually broke and how to fix it. It's built for AOSP and Android Automotive
(AAOS) platform developers debugging VHAL, CarService, HALs, and native crashes in a
terminal.
- 🔒 Local-first — runs on Ollama by default, so your logs never leave your machine
- 🚗 Automotive-aware — ships a knowledge pack of VHAL, SELinux, tombstone & CarService facts
- 🪶 Zero dependencies — pure Python standard library, installs anywhere
- ⚡ Works offline — instant rule-based triage even with no AI model at all
pip install ailog-cli
Note: the PyPI package is
ailog-cli, but the command you run isailog. (The nameailogon PyPI belongs to an unrelated project — don't install that one.)
See it in action
Turn a 100 MB bugreport into a ranked list of real problems — instantly, with no model needed:
Try it yourself on the bundled sample — no device required:
git clone https://github.com/zoddiacc/ailog-cli.git
ailog bugreport ailog-cli/docs/demo/bugreport-car-demo.zip --no-ai
Add a model and it explains each crash in depth. Point it at a live device
(ailog cat --explain) or your AOSP build (ailog build) for the same treatment.
Get started in 60 seconds
1. Install — the package is ailog-cli, the command is ailog:
pip install ailog-cli
2. Try it with zero setup — the knowledge pack works with no AI at all:
ailog bugreport your-bugreport.zip --no-ai
3. Turn on AI — pick one:
Option A · Local & private (recommended, free)
# Install Ollama once: https://ollama.com
ollama pull qwen2.5-coder:3b # ~2 GB, one-time download
That's it — AILog uses Ollama by default. Nothing leaves your machine.
Option B · Cloud (OpenAI / Anthropic / Groq / …)
ailog config --provider openai --api-key sk-...
# or
ailog config --provider anthropic --api-key sk-ant-...
# or any OpenAI-compatible endpoint:
ailog config --provider openai --base-url https://api.groq.com/openai/v1 --api-key ...
Secrets in your logs are redacted before anything is sent. See Privacy.
4. Use it
ailog analyze build.log # analyze a saved log
ailog cat --explain # live logcat, explained inline
ailog build # wrap an AOSP build
ailog bugreport report.zip # triage a bugreport
Run ailog --help or ailog <command> --help for everything.
Why AILog is different
Most people run a small local model (the default is qwen2.5-coder:3b) that knows
almost nothing about VHAL, CarService, SELinux, or tombstones. A generic "pipe the log
to an LLM" tool gives weak or wrong answers for automotive internals as a result.
AILog keeps the domain intelligence in curated data it ships, not the model's weights. A built-in knowledge pack maps log signatures to verified facts — so even a tiny local model gives genuinely good answers, and the common cases are explained instantly with no AI at all.
What you can do
| Command | What it does | Needs |
|---|---|---|
ailog analyze <file> |
Analyze a saved build/logcat file | a file |
ailog bugreport <file> |
Triage an adb bugreport (.zip/.txt) |
a file |
ailog cat |
AI-filtered live adb logcat |
adb + device |
ailog build |
Wrap an AOSP m/make build |
AOSP tree (Linux/macOS) |
ailog config |
Configure provider, model, keys | — |
# Analyze
ailog analyze logcat.txt --focus CarService # focus the AI on a component
ailog analyze build.log --output report.md # save a markdown report
# Bugreport triage
ailog bugreport report.zip --no-ai # instant, offline, no model
ailog bugreport report.zip --focus com.oem.app # only issues touching a package
# Live logcat
ailog cat --explain # explain each error inline
ailog cat --focus VHAL --noise-level high # focus + aggressive filtering
ailog cat -p com.example.app --explain # filter to one app
# AOSP build (run from a lunch'd shell)
ailog build
ailog build -- -j16 framework
# Machine-readable output for CI
ailog --json bugreport report.zip --no-ai | jq '.issue_counts'
All flags (per command)
Global (place before the subcommand, e.g. ailog --json analyze x.log)
| Flag | Description |
|---|---|
--json |
Machine-readable JSON output (analyze, bugreport) |
--redact / --no-redact |
Force secret redaction on/off (on by default for cloud) |
--dry-run |
Show the AI call without sending it |
--show-tokens |
Print estimated token counts |
--no-color |
Disable colored output |
ailog analyze <file> — --type build\|logcat\|auto, --full (no filtering), --output <path>, --focus <keyword>
ailog bugreport <file> — --no-ai (offline triage), --focus <keyword>, --output <path>
ailog cat — -s/--device <serial>, -p/--package <pkg>, --noise-level low\|medium\|high, --focus <tag>, --explain, --no-source, --batch-interval <sec>
ailog build — --no-filter, --summary-only, --module <name>
Configuration
AILog works out of the box with Ollama — you only need config to switch providers or
tune behavior.
ailog config --show # see current settings
ailog config --provider anthropic # switch provider
ailog config --model qwen2.5-coder:7b # pick a model
ailog config --list-models # list installed Ollama models
ailog config --set noise_level=high # set any option (below)
ailog config --reset # back to defaults
Config lives at ~/.config/ailog/config.json (created with 0600 permissions). API
keys can also come from OPENAI_API_KEY / ANTHROPIC_API_KEY env vars, which take
precedence.
All config keys
| Key | Default | Description |
|---|---|---|
provider |
ollama |
ollama, openai, or anthropic |
ollama_model |
qwen2.5-coder:3b |
Local model (try :7b for better results) |
ollama_url |
http://localhost:11434 |
Ollama server URL |
openai_model |
gpt-4o-mini |
OpenAI model |
openai_url |
https://api.openai.com/v1 |
OpenAI-compatible base URL |
anthropic_model |
claude-sonnet-5 |
Anthropic model |
noise_level |
medium |
Filter aggressiveness: low/medium/high |
batch_interval |
5 |
Seconds between AI batches (live cat) |
max_ai_calls |
5 |
Max AI calls per session |
timeout |
30 |
AI request timeout (seconds) |
system_prompt |
"" |
Override the AI system prompt |
Set any of these with ailog config --set key=value.
Privacy
With local Ollama (the default) nothing leaves your machine — ideal for OEM and
Tier-1 environments. When you use a cloud provider, secrets (API keys, tokens,
passwords, JWTs, …) are redacted from log content and source files by default
before anything is sent. Pass --no-redact only if you understand the implications.
Requirements
- Python 3.9+ (standard library only — no pip dependencies)
- adb for
ailog cat— from Android SDK Platform Tools - Ollama for local AI (ollama.com), or an API key for cloud AI
| Platform | analyze · bugreport |
cat |
build |
|---|---|---|---|
| Linux / macOS | ✅ | ✅ | ✅ |
| Windows | ✅ | ✅ | ❌ (AOSP builds are Linux/macOS only) |
analyze and bugreport need only a file — no device or adb.
Install from source
git clone https://github.com/zoddiacc/ailog-cli.git && cd ailog-cli
bash install.sh # installs to ~/.local/bin
# or run directly without installing:
python3 run.py --help
If ~/.local/bin isn't on your PATH:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
How it works
Input (log file, adb logcat, bugreport, or build output)
│
Stage 1 · Rule-based noise filter → drops ~70% of lines (instant, free)
│
Stage 2 · Knowledge-pack lookup → instant hint (no AI) + facts for the AI
│
Stage 3 · AI analysis (if needed) → explains the rest, grounded in Stage 2
│
Terminal output (color-coded lines, boxed analysis, stats)
The knowledge pack
The heart of AILog. It maps log signatures to verified AOSP/Automotive facts (what a
VHAL property means and which Car.PERMISSION_* it needs, how to read an avc: denied
line, what a SIGABRT tombstone implies), used two ways:
- Instant hints, no AI — a matching line gets an always-correct one-liner
immediately. This is why
ailog bugreport --no-aiis genuinely useful offline. - Grounded AI answers — the matching facts are injected into the prompt as authoritative context, so a small local model summarizes known-good knowledge instead of guessing.
It currently covers 50+ error signatures and 120+ VHAL properties (powertrain,
energy/EV, HVAC, body, lights, wipers, ADAS, power/user HAL, watchdog, cluster,
diagnostics). It's pure data,
so it grows without code changes — and tools/gen_vhal_knowledge.py can generate VHAL
entries straight from a VehicleProperty.aidl in an AOSP tree.
Contributing
Contributions are welcome — especially new knowledge-pack entries (VHAL properties, SELinux/CarService/build signatures), which are pure data and a great first PR. See CONTRIBUTING.md for setup, and SECURITY.md to report vulnerabilities privately.
python3 -m unittest discover -s tests -v # run the test suite
ruff check src/ tests/ tools/ # lint
Tests run in CI across Python 3.9–3.14 with ruff linting.
Further reading
- ARCHITECTURE.md — design and internals
- TESTING.md — testing against a real Android device
- CONTRIBUTING.md · CHANGELOG.md · UNINSTALL.md
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ailog_cli-2.2.1.tar.gz.
File metadata
- Download URL: ailog_cli-2.2.1.tar.gz
- Upload date:
- Size: 91.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
397e739f905377c70bec9de2b648f0929038f49d7b49c8d28d0a95c488e7939e
|
|
| MD5 |
f16a53fec2dd61b2d704d27d0e949fcd
|
|
| BLAKE2b-256 |
24fb8a580b633784ad0e9ec21724e60cc15f800f914b75d9103a9fbfc65d0b11
|
Provenance
The following attestation bundles were made for ailog_cli-2.2.1.tar.gz:
Publisher:
release.yml on zoddiacc/ailog-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ailog_cli-2.2.1.tar.gz -
Subject digest:
397e739f905377c70bec9de2b648f0929038f49d7b49c8d28d0a95c488e7939e - Sigstore transparency entry: 2164590217
- Sigstore integration time:
-
Permalink:
zoddiacc/ailog-cli@e06e04834d71be86dcf4fea70b6b522136141538 -
Branch / Tag:
refs/tags/v2.2.1 - Owner: https://github.com/zoddiacc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e06e04834d71be86dcf4fea70b6b522136141538 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ailog_cli-2.2.1-py3-none-any.whl.
File metadata
- Download URL: ailog_cli-2.2.1-py3-none-any.whl
- Upload date:
- Size: 74.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44c2d0fed1ac637d3f78e8b8befda17c0712fef42b572ad850edb2b06f1bfcdc
|
|
| MD5 |
05627000af18982ef09acbc55d6897fc
|
|
| BLAKE2b-256 |
07e91f48b01a6c01f2036d00125fe0ad0fe5b412ee4569fe1cc2a7074fdb9765
|
Provenance
The following attestation bundles were made for ailog_cli-2.2.1-py3-none-any.whl:
Publisher:
release.yml on zoddiacc/ailog-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ailog_cli-2.2.1-py3-none-any.whl -
Subject digest:
44c2d0fed1ac637d3f78e8b8befda17c0712fef42b572ad850edb2b06f1bfcdc - Sigstore transparency entry: 2164590225
- Sigstore integration time:
-
Permalink:
zoddiacc/ailog-cli@e06e04834d71be86dcf4fea70b6b522136141538 -
Branch / Tag:
refs/tags/v2.2.1 - Owner: https://github.com/zoddiacc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e06e04834d71be86dcf4fea70b6b522136141538 -
Trigger Event:
push
-
Statement type: