Bkper Agent
Extract and categorize transactions instantly with AI. Upload invoices, receipts, or bank statements and the agent automatically extracts amounts, dates, descriptions, and intelligently finds the right accounts in your book.
Features
- Smart Learning: Learns from existing transactions in your book to match your bookkeeping patterns
- Import: Upload files to an book → creates new transactions
- Attach: Attach files to existing transactions → updates them with extracted data
- Context-Aware: Uses account properties to guide parsing for specific document types
Advanced Configuration
The Agent should be working out of the box for most cases, but you can customize its behavior.
Book Properties
agent_prompt_book_id: ID of a remote book to fetch contexts from (for centralized configuration)
Account/Group Properties
agent_prompt: Instructions for extracting data from documents when parsingagent_prompt_id: ID to match context from remote book - defaults to account/group name
Example Setup
- Create the "Bank Itau" account that represents your checking account.
- Add
agent_promptproperty to the account with the value:
Extract Transactions in Date Sequence table from the document.
- Do not include headers
- quantity and price are optional properties and should be added to properties only include if the column Quantity and Price filled, leave it null otherwise.
- Upload bank statements with this account selected → transactions are created automatically
Development & Deployment
Local Development
For local development, you can bypass Cloudflare AI Gateway by setting the bypassAIGateway environment variable:
# .env file
bypassAIGateway=true
GEMINI_API_KEY=your_gemini_api_key
This connects directly to the Gemini API without caching or analytics.
Production Deployment
⚠️ Important: When deploying to production, ensure the following environment variables are configured as Cloudflare Worker secrets:
GEMINI_API_KEY- Your Google Gemini API keyCF_ACCOUNT_ID- Your Cloudflare account IDCF_AI_GATEWAY_TOKEN- Cloudflare AI Gateway token- Do NOT set
bypassAIGateway(or set it to"false")
Production deployments should use Cloudflare AI Gateway for:
- Request caching (cost reduction)
- Rate limiting and usage control
- Analytics and monitoring
- Centralized logging
Configure secrets using:
wrangler secret put GEMINI_API_KEY
wrangler secret put CF_ACCOUNT_ID
wrangler secret put CF_AI_GATEWAY_TOKEN
See Cloudflare AI Gateway docs for setup instructions.