Inspiration
Learning about patent law in my Tech Entrepreneurship course at UH - discovered that patent drafting costs $8K-$15K per application, creating barriers for small businesses while big companies can afford armies of patent attorneys to protect their innovations.
What it does
CraftPatent uses Google ADK's LoopAgent to create an iterative patent improvement system:
- Drafts complete USPTO-compliant patent applications from invention disclosures
- Rates quality across 5 dimensions (novelty, clarity, claims, applicability, grantability)
- Iteratively improves drafts up to 5 cycles until high quality is achieved
Result: Automated patent creation with scores like 8.2/10 for novelty, 7.8/10 for claims construction.
How I built it
- Google ADK LoopAgent architecture for iterative refinement
- Session state management to persist drafts and ratings between iterations
- Gemini 2.5 Flash for patent generation and analysis
- Multi-agent coordination: Draft Patent Agent + Rate Patent Agent + Coordinator
Challenges I ran into
- ADK iteration failures - agents couldn't access previous results between loops (solved with proper output key mapping:
current_draft,current_rating) - Async implementation complexity - custom BaseAgent classes caused coroutine errors (simplified to standard ADK agents)
- Over-engineered architecture - started with nested sub-agent folders, consolidated to clean single-file structure
Accomplishments
- Working iterative improvement system - actually refines patents through multiple cycles
- Comprehensive quality scoring across 5 patent law dimensions
- 9 test cases ranging from high-quality inventions to obvious prior art
- Production-ready architecture using Google's official ADK patterns
- Solved complex state persistence in multi-agent workflows
What I learned
- LoopAgent pattern is powerful for iterative workflows
- Session state with output keys automatically persists data between iterations
- Simple architectures outperform complex nested hierarchies
- Patent quality is measurable and improvable through AI feedback loops
What's next
- Score-based termination when quality threshold (7.0+) is reached
- Prior art integration for automated patent search
- PDF generation for USPTO-ready submissions
- Web interface for broader accessibility
Built With
- gemini
- google-adk
- google-cloud
- google-cloud-run
- python
- windsurf


Log in or sign up for Devpost to join the conversation.