I Built a Brex Connector for Cognee: Bringing Business Expense Data Into AI Memory 🚀
Description and use
Built a Brex connector for Cognee to ingest expenses, memos, and budgets into an AI memory system, handling authentication, pagination, incremental sync, and safe deletion.
Problem
How can we make business expense information available to an AI knowledge system in a useful, structured, and maintainable way?
Outcome
The Brex connector successfully streams expenses, memos, and budgets into Cognee, enabling AI queries over structured and contextual data while handling pagination, incremental sync, and safe deletion reconciliation.
Workflow
- Identify open issue #4797 for Brex connector requirements
- Understand Brex API and Cognee architecture
- Implement authentication, pagination, error handling, data transformation, incremental sync, and safe deletion reconciliation
- Write unit tests for authentication, pagination, sync state, and deletion guardrails
- Create usage example with cognee_community_connector_brex
- Submit pull request #389
- Document setup and usage
- Run end‑to‑end DLT pipeline with DuckDB
Evidence
The connector supports three data resources: Expenses, Memos, Budgets
The connector uses Bearer token authentication to access the Brex Platform API.
The implementation includes handling for authentication errors, permission errors, and rate limits.
The connector uses Brex's posted_at_start filter and stores synchronization state through DLT's resource-state mechanism to track the latest processed timestamp.
The implementation therefore includes a guardrail: if reconciliation encounters API or network errors, deletion-marker generation is aborted rather than proceeding with potentially incomplete information.
- Record date: 2026-10-19T14:41:25.434Z