π‘ Inspiration
Did you know that Indonesian freelancers lose an average of 3-5 hours per week just managing invoices and chasing payments? In a year, that is 120+ lost working days.
Furthermore, Indonesian professionals deeply struggle with the "Pekewuh" cultureβthe feeling of awkwardness or guilt when asking a client for money, even after the work is perfectly done. This results in late payments, broken cash flows, and emotional stress. We believe that getting paid shouldn't require manual spreadsheets, complex dashboards, or awkward follow-up texts. It should be as simple as chatting with your own CFO.
π€ What it does
PayGent is a Proactive AI CFO designed for Indonesian freelancers. By simply typing a natural language command like "Tolong tagihkan PT Kreasi Digital 2.5 juta untuk jasa pembuatan website", PayGent autonomously:
- Understands the billing intent.
- Extracts the client's name, item/service, and nominal amount.
- Calls the Doku Jokul API securely in real-time.
- Generates a beautifully formatted UI Invoice Card containing a ready-to-pay Doku link.
Autonomous, but Safe: PayGent features strict edge-case handling. If a user provides incomplete data (e.g., forgetting the price), PayGent will NOT hallucinate or blindly call the API. It will pause the execution loop and politely ask the user for the missing information before proceeding.
βοΈ How we built it
We utilized a Hybrid Agent Architecture to ensure both a stellar user experience and powerful reasoning capabilities within a 12-hour hackathon window:
- The Brain (Reasoning Layer): We utilized OpenClaw's autonomous ecosystem principles, powered by Python (FastAPI + LangChain) and Groq LLaMA-3 70B, structured as a specialized AI Skill capable of dynamic tool calling.
- The Hands (Payment Gateway): We integrated the Doku Jokul Sandbox API. The agent uses a custom-built TypeScript/Python plugin with strict HMAC signature generation to authenticate and request dynamic payment links.
- The Face (Frontend): A highly polished, mobile-responsive Next.js app with Tailwind CSS. We implemented a rich UI chat interface that transforms standard text links into interactive Invoice Cards.
β οΈ Challenges we ran into
Integrating the Doku Jokul API required precise HMAC signature hashing (SHA256) combined with timestamps and specific header formats. Ensuring our autonomous agent could reliably generate these signatures dynamically without failing the authentication was our biggest technical hurdle. Additionally, bridging the autonomous loop of the agent with a modern Next.js frontend in real-time required careful state management.
π Accomplishments that we're proud of
We successfully built a true Autonomous Tool-Calling Agent that interacts with a real-world financial API (Doku). It isn't just a static chat interface; it actively reasons, validates missing variables, and executes secure HTTP requests.
π What's next for PayGent (The Masterplan)
Generating the payment link is just phase one. To achieve our vision of a fully autonomous AI CFO, our next immediate roadmap is the Doku Webhook Listener.
Instead of freelancers checking their dashboards, PayGent will listen to Doku's server callbacks. The moment a client pays via QRIS or Virtual Account, PayGent will autonomously mark the invoice as "PAID" in the database and automatically send a "Thank You" receipt via WhatsApp to the client. This creates a 100% closed-loop financial automation system.
Built With
- doku-api
- fastapi
- llama-3
- longchain
- next.js
- openclaw
- python
- qroq
- tailwind-css
- typecsript
Log in or sign up for Devpost to join the conversation.