Inspiration

AI coding agents are becoming powerful enough to edit files, run commands, and make architectural changes on their own. That speed is useful, but it creates a new problem: humans often only see the final result, not the risk of each action while it is happening.

We built Agent Lens to make agent autonomy easier to supervise without slowing developers down.

What it does

Agent Lens is a judgment layer for AI coding agents. It intercepts proposed Codex tool calls, evaluates their semantic risk, and decides whether they should auto-execute, require human approval, or be blocked.

For risky actions, Agent Lens shows a clear review card with the action summary, risk level, confidence, trajectory prediction, policy match, dependency evidence, and approval controls.

It also records everything into an audit-friendly session ledger, so developers can replay what happened, inspect decisions, and understand how the agent’s work evolved over time.

How we built it

We built a Python backend around typed Pydantic schemas, FastAPI endpoints, deterministic policy evaluation, and OpenAI-powered intelligence calls. The risk layer checks reversibility, blast radius, shell mutation evidence, dependency references, and configured policies.

For the frontend, we built a Next.js ledger console with a decision queue, inspector, timeline, analytics, policy ledger, and flow map.

We also integrated with Codex through local guard and proxy workflows, so Codex can run in the terminal while Agent Lens supervises proposed actions.

Challenges we ran into

The hardest challenge was finding the right balance between control and usability. If every action requires approval, the tool becomes annoying. If too many actions are auto-approved, it stops being trustworthy.

We had to separate low-risk read-only inspection from meaningful file or shell changes, group noisy telemetry into human-friendly review episodes, and keep the ledger useful without overwhelming the user.

Another challenge was integrating with real Codex execution paths. Some hook-based approaches were useful for observing activity but were not reliable enough for strict blocking, so we built a stronger app-server/proxy path for approval control.

Accomplishments that we're proud of

We are proud that Agent Lens is not just a mockup. It has a working backend, local guard mode, Codex integration, policy engine, OpenAI intelligence layer, Slack approval surface, persistent audit ledger, and a professional frontend console.

We are especially proud of the intelligence layer. Agent Lens does not simply ask, “approve or deny?” It explains what the agent is trying to do, what could happen next, how confident the system is, and what evidence supports the decision.

What we learned

We learned that supervising AI agents is less about blocking individual commands and more about understanding trajectory.

A single file edit might be safe or risky depending on context, imports, policies, and the user’s original goal. We also learned that trust comes from clear evidence: developers need short explanations, visible rationale, and an audit trail they can inspect later.

What's next for Agent Lens

Next, we want to strengthen the native Codex integration, improve policy authoring, add richer team workflows, and expand the ledger into a long-term trust and governance layer for AI-assisted software development.

We also want to support more agent runtimes beyond Codex while keeping the same core idea: fast agents, human judgment where it matters, and a clear record of every important decision.

Demo Video: https://www.youtube.com/watch?v=3LnfF9pVAGU

Pitch Deck: https://docs.google.com/presentation/d/1Njobj2baA927qV48yIQmbTpe2Gsh-gnbhfJVA19AGYI/edit?usp=sharing

X Post: https://x.com/AaryanKandiah/status/2069430606476546152?s=20

Github: https://github.com/Aaryan126/Agent_Lens

Technical Architecture: https://github.com/Aaryan126/Agent_Lens/blob/main/Architecture.md

Built With

Share this project:

Updates