Skip to content

FogMeta/auto-billing-agent

Repository files navigation

Auto-Billing-Agent

Auto-Billing-Agent is an AI-powered invoice automation tool that allows users to interact via natural language to upload, parse, analyze, and process invoices — including payment execution and full data traceability. Powered by LLMs (e.g., LLaMA 3 70B) and integrated with Storacha for secure data storage, this agent automates the entire billing lifecycle.

The project is built on Coinbase's AgentKit, which leverages Langchain's powerful function calling capabilities, enabling flexible and intelligent task orchestration. It is further integrated with Storacha's decentralized storage, making data handling secure, scalable, and traceable.

It supports:

  • Natural language-driven invoice parsing and payment
  • Storing original inputs, parsed data, chain of thought, and txhash metadata
  • Configurable logging: users can decide whether to store all intermediate steps
  • Storacha integration for data upload, download, and decentralized storage
  • Telegram bot interface for convenient communication and usage

🚀 Features

  • ✅ AI-driven semantic understanding of invoice content
  • ✅ Supports structured data extraction and crypto payments
  • ✅ Optionally stores processing steps (chain of thought) for traceability
  • ✅ Fully integrated with Storacha for secure, decentralized data storage
  • ✅ Telegram Bot interface for real-time interaction and status checking

🧩 Installation Steps

1. Configure .env

Create a .env file in the project root with the following content:

CDP_API_KEY_NAME="test"
CDP_API_KEY_PRIVATE_KEY="<CDP_API_KEY_PRIVATE_KEY>"
PRIVATE_KEY="YOUR_PRIVATE_KEY"
LLM_API_KEY="YOUR_LLM_API_KEY"
LLM_MODEL="meta-llama/Llama-3.3-70B-Instruct"
LLM_BASE_URL="https://inference.nebulablock.com/v1"

TELEGRAM_BOT_TOKEN="<YOUR_TELEGRAM_BOT_TOKEN>"

AUTO_SAVE_THINK=1

STORACHA_SPACE_DID="<YOUR_STORACHA_SPACE_DID>"
STORACHA_AUTH_SECRET="YOUR_STORACHA_AUTH_SECRET"
STORACHA_AUTH_TOKEN="<YOUR_STORACHA_AUTH_TOKEN>"

2. Set up build environment

# Create a virtual environment  
python3 -m venv myenv
source myenv/bin/activate

# Install dependencies  
pip install -r requirements.txt

3. Start the Telegram bot

#!/bin/bash
python telegram_bot.py >> telegram.log 2>&1 &

📦 Storacha Configuration

To use Storacha for data storage, follow these steps:

  1. Create account, space, and keys:
    Reference the official guide:
    👉 https://docs.storacha.network/how-to/http-bridge/

  2. Alternatively, use the web console:
    👉 Storacha Console:https://console.storacha.network/

  3. Paste the generated values into your .env file under:

    • STORACHA_SPACE_DID
    • STORACHA_AUTH_SECRET
    • STORACHA_AUTH_TOKEN

💬 Telegram Bot Interaction

Users can easily interact with the billing agent via Telegram. Just upload an invoice, ask questions, or trigger a payment. The agent will handle:

  • Parsing
  • Data storage
  • Payment status updates

📌 Demo illustration auto-billing invoice-process-1 invoice-process-2

invoice-result-1 invoice-result-2

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors