DEV Community

Anuj Panchbhai
Anuj Panchbhai

Posted on

I Built an AI Agent for My Friend That Can Plan, Budget & Pay for Real-World Tasks

Hacktoberfest Weekend Challenge: Build for a Friend Submission 🤝

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

What I Built

I built MidPilot, a privacy-first AI agent for fellow builders that can turn a goal into an executable mission. You can tell it something like “Build me a website” or “Book me a restaurant table,” and MidPilot plans the task, identifies the resources it needs, estimates the budget, and asks for approval before spending.

Under the hood, Qwen runs locally through Ollama, keeping sensitive context on the user's machine. For payments and financial control, MidPilot uses blockchain technology through Midnight Network, combining programmable spending policies with privacy-preserving zero-knowledge proofs.

The goal is to give AI agents the ability to interact with real-world services and money without giving them unrestricted access to a user's wallet.

Demo

Live:-https://youtu.be/5jc_G18KL3A
All the Installing instructions are present in my Github repo.

Code

https://github.com/ANPAN27/MidPilot

How I Built It

I built MidPilot around Qwen2.5 3B, an open-weight model running locally through Ollama. The model is the reasoning layer of the agent: it understands natural-language goals, plans missions, identifies required resources, estimates budgets, and decides which tools to use.

The entire AI interaction can run locally, so sensitive mission and financial context does not need to be sent to a closed AI API. Because Qwen is open-weight and runs through Ollama, the model can also be swapped or customized as MidPilot evolves.

The agent is built with Node.js and TypeScript and uses tool calling to interact with MidPilot's local policy engine and MCP-based Midnight wallet. The policy engine checks spending limits, merchant restrictions, time restrictions, and emergency freezes before transactions are allowed.

For the blockchain layer, MidPilot uses Midnight Network for real on-chain transfers, while the project also includes a Compact smart contract designed for privacy-preserving policy validation. The current hackathon implementation keeps policy enforcement local as the active payment gate, with the on-chain ZK enforcement designed as the next layer.

This open architecture is important because MidPilot is meant to give builders control over both the AI model and their financial data, rather than depending entirely on a closed AI provider.

Why Does Open Innovation Matter?

Open innovation matters because MidPilot is an AI agent that deals with budgets, payments, and potentially sensitive financial information. I wanted the user to have control over where their data and AI reasoning happen.

Using Qwen2.5 3B locally through Ollama means MidPilot can reason on the user's own machine instead of sending every mission and financial instruction to a closed AI provider. It also gives me the freedom to swap models, experiment with different open-weight models, and customize the agent as the project evolves.

This was especially important for building a financial agent. With a closed API, I would be dependent on one provider's model, pricing, policies, and data-handling decisions. With an open approach, I can inspect, modify, and replace the AI layer while keeping the rest of MidPilot under my control.

For me, open innovation isn't just about making the project cheaper—it gives MidPilot privacy, transparency, flexibility, and ownership, which are especially important when an AI is making decisions around real money.

Top comments (2)

Collapse
 
mikeofsport profile image
Mike Henry •

Know that you've built something really serious when you can trust it with transactions.!

Collapse
 
anpan_27 profile image
Anuj Panchbhai •

Exactly..❤️‍🔥