Inspiration

As AI agents become more capable, they also become more expensive. Developers spend countless hours tuning prompts, reducing token usage, and debugging inefficient agent workflows with little visibility into where tokens are actually being wasted.

We wanted to build the equivalent of Chrome DevTools for AI agents—a platform that doesn't just show token usage, but actively diagnoses problems, explains why they're happening, optimizes them with Paritok, and helps developers apply those improvements with minimal effort.

That's how AgentLens AI was born.


What it does

AgentLens AI is an AI observability and optimization platform for Agentic AI systems.

Developers simply provide a GitHub repository URL, and AgentLens:

  • Detects AI frameworks (LangGraph, OpenAI Agents SDK, etc.)
  • Analyzes prompts and agent workflows
  • Finds token inefficiencies and optimization opportunities
  • Uses Paritok to compress expensive prompts
  • Benchmarks before vs. after token usage
  • Generates an AI Doctor report with actionable recommendations
  • Creates a GitHub Pull Request with approved prompt optimizations

Instead of manually searching through hundreds of prompt files, developers receive a clear diagnosis, measurable savings, and a streamlined path to applying improvements.


How we built it

Frontend:

  • Next.js 15
  • TypeScript
  • Tailwind CSS
  • shadcn/ui
  • Framer Motion
  • Recharts

Backend:

  • FastAPI
  • GitPython
  • Tree-sitter
  • NetworkX
  • Pydantic
  • HTTPX

Core workflow:

  1. Clone a repository
  2. Detect supported AI frameworks
  3. Analyze prompts and agent architecture
  4. Measure prompt token usage
  5. Optimize prompts using Paritok
  6. Compare before vs. after benchmarks
  7. Generate an AI Doctor report
  8. Create a GitHub Pull Request with approved optimizations

Paritok is the core optimization engine throughout the workflow, providing measurable token savings that are reflected in the benchmark and optimization reports.


Challenges we ran into

Building AgentLens involved several technical challenges:

  • Detecting different AI frameworks across repositories with varying project structures.
  • Building repository analysis that works across multiple coding styles.
  • Designing a workflow that safely applies prompt optimizations without modifying unrelated code.
  • Integrating GitHub OAuth and automating Pull Request creation.
  • Creating an intuitive interface that communicates complex optimization insights in seconds.
  • Deploying a monorepo with separate frontend and backend services while configuring authentication, environment variables, and production settings.

Accomplishments that we're proud of

  • Built a complete AI observability platform from scratch.
  • Successfully integrated Paritok as the optimization engine.
  • Created an AI Doctor that provides actionable optimization recommendations.
  • Implemented before-vs-after benchmarking for measurable token savings.
  • Added GitHub Pull Request generation for applying accepted optimizations.
  • Designed a polished developer experience inspired by tools like Vercel, GitHub, and Linear.

What we learned

This project reinforced that optimization isn't just about reducing tokens—it's about making AI systems easier to understand and improve.

We also learned how important observability is for AI agents. Developers need visibility into prompts, workflows, and token usage before meaningful optimization is possible.

Finally, we gained valuable experience integrating repository analysis, GitHub automation, and Paritok into a cohesive developer workflow.


What's next for AgentLens

Our roadmap includes:

  • Support for additional AI frameworks
  • Multi-repository organization dashboards
  • Historical optimization tracking
  • CI/CD integration for automated optimization checks
  • Team collaboration features
  • More advanced architecture visualization
  • Automatic optimization suggestions during pull requests
  • Expanded optimization capabilities beyond prompts to broader AI workflow performance

Our vision is to make AgentLens the standard observability and optimization platform for AI-powered applications.

Built With

Share this project:

Updates

Submission history