AI agents waste tokens when they must read entire files to locate a single function, class, or constant. ASTral indexes a repository once and allows agents to retrieve exact symbols on demand, eliminating unnecessary context loading.
Repository: Medium Python codebase (300+ files)
Task: Locate and read the authenticate() implementation
| Approach | Tokens Consumed | Process |
|---|---|---|
| Raw file loading | ~7,500 tokens | Open multiple files and scan manually |
| ASTral MCP | ~1,449 tokens | search_symbols > get_symbol |
Savings: ~80.7%
| Task | Raw Approach | With ASTral | Savings |
|---|---|---|---|
| Explore repo structure | ~200,000 tokens | ~2k tokens | ~99% |
| Find a specific function | ~40,000 tokens | ~200 tokens | ~99.5% |
| Read one implementation | ~40,000 tokens | ~500 tokens | ~98.7% |
| Understand module API | ~15,000 tokens | ~800 tokens | ~94.7% |
| Queries | Raw Tokens | Indexed Tokens | Savings |
|---|---|---|---|
| 10 | 400,000 | ~5k | 98.7% |
| 100 | 4,000,000 | ~50k | 98.7% |
| 1,000 | 40,000,000 | ~500k | 98.7% |
ASTral shifts the workflow from:
"Read everything to find something" to "Find something, then read only that."
Every tool response includes real-time savings data in the _meta field:
"_meta": {
"tokens_saved": 2450,
"total_tokens_saved": 184320,
"cost_avoided": { "claude_opus": 0.0368, "gpt5_latest": 0.0245 },
"total_cost_avoided": { "claude_opus": 2.76, "gpt5_latest": 1.84 }
}tokens_saved: Tokens saved by the current call (raw file bytes vs response bytes / 4)total_tokens_saved: Cumulative total across all calls, persisted to~/.code-index/_savings.jsoncost_avoided: Per-model cost savings (Claude Opus at $15/1M tokens, GPT-5 at $10/1M tokens)
No extra API calls or file reads — computed using fast file size checks only.