An agent that audits your code and tells you where to start measuring to improve your product
tldr; ai agent that analyzes your codebase, detects features, and generates product metrics you should track — with implementation guides. built with next.js, cloudflare workers, langgraph, and e2b sandboxes.
Built during The Agent Hackathon organized by Skyward. and CommunityOS learnings documented at the end of this readme
Kapin integrates with github, allowing you to create projects (think of a project as a software product) using one or multiple repositories.
the workflow:
- connect your github account
- create a project with your repositories
- analyze your codebase to identify main features
- generate a list of metrics you should start measuring
- implement metrics using the provided instructions
your code → feature detection → actionable metrics
each metric includes implementation instructions.
this repository contains 3 main directories:
-
web-worker/nextjs application (open nextjs) ready to deploy as a cloudflare worker -
agents-worker/cloudflare worker using langgraph and langchain for agent orchestration -
sandbox-worker/cloudflare worker for managing sandboxes (note: currently broken due to migration to e2b sandboxes)
- sandbox: e2b sandboxes for cloning repositories and exploring code using commands like
grep,cat,ls, etc. - workflow: langgraph workflow with three agents: a "topic" finder and two metric generators
- agents: built with langchain, using two tools:
- execute commands in the sandbox
- read complete file contents
- llms: started with anthropic claude haiku 4.5, switched to groq (gpt-oss-120b) for faster workflow execution
- initially wanted to use langchain python stack, but it's still in beta for cloudflare workers
- pivoted to langchain js
- initially planned to use cloudflare sandboxes, but didn't have the required plan access
- pivoted to e2b sandboxes
- open prs with the changes needed to implement the metrics (database migrations, data layer)
- add database read access to display the metrics in the app
tldr; skip complex integrations, focus on core, don't learn new tech, ship fast, read evaluation rubrics, go with a team you know, network actively, and ask mentors for help.
my 1st hackathon
- don't waste time on complex integrations — i spent too much time building github oauth integration to clone user repos. instead, I could have just used public repos from github to test the core functionality faster
-
learning new technologies? i chose to learn cloudflare workers, which meant dealing with:
- opennextjs on cloudflare workers (postgres tcp driver has connection reuse bugs — had to switch to neon's http driver)
- python workers (still in beta)
- langchain js (different from python version)
this cost me significant time troubleshooting. i could have deployed with familiar technologies (vercel, railway, etc.) and avoided these blockers. choose learning or shipping fast — it's hard to do both in a hackathon
-
building to win? i chose to build a project i'd wanted to create for months, which didn't align with criteria. read the evaluation rubrics beforehand and align your project with them. in this hackathon, social impact was a key criterion that i didn't address. you can build what you love or build to win (or both) - just know which one you're choosing
-
going solo? i went alone (one-man show), which limited my knowledge and troubleshooting capacity. when you hit a blocker, there's no one to brainstorm with or take over while you rest
-
going with a team? teams can achieve more, but work with people you already know and trust. joining strangers can create discord rather than synergy, especially under time pressure
- hackathons aren't just about building cool stuff — they're also about meeting cool people. i didn't realize this until late at night when an organizer approached me and said "go meet people!" i'm introverted and often not interested in socializing, but i regret not talking more with the people. if you're like me, set a reminder to take
networkingnetfriending breaks — future you will thank you
- most hackathons have mentors — they're there to help you with technical issues, product strategy, and proof of concept feedback. don't be shy, talk to them and ask questions. even if there aren't official mentors, ask any organizer — nobody will say no. i should have asked for help more often instead of getting stuck troubleshooting alone