I Built a Brex Connector for Cognee: Bringing Business Expense Data Into AI Memory π
ΠΠΏΠΈΡΠ°Π½ΠΈΠ΅ ΠΈ ΠΏΡΠΈΠΌΠ΅Π½Π΅Π½ΠΈΠ΅
Π Π°Π·ΡΠ°Π±ΠΎΡΠ°Π½ ΠΊΠΎΠ½Π½Π΅ΠΊΡΠΎΡ Brex Π΄Π»Ρ Cognee, ΠΏΠΎΠ·Π²ΠΎΠ»ΡΡΡΠΈΠΉ ΠΈΠΌΠΏΠΎΡΡΠΈΡΠΎΠ²Π°ΡΡ ΡΠ°ΡΡ ΠΎΠ΄Ρ, Π·Π°ΠΌΠ΅ΡΠΊΠΈ ΠΈ Π±ΡΠ΄ΠΆΠ΅ΡΡ Π² ΡΠΈΡΡΠ΅ΠΌΡ AIβΠΏΠ°ΠΌΡΡΠΈ, ΠΎΠ±Π΅ΡΠΏΠ΅ΡΠΈΠ²Π°Ρ Π°ΡΡΠ΅Π½ΡΠΈΡΠΈΠΊΠ°ΡΠΈΡ, ΠΏΠ°Π³ΠΈΠ½Π°ΡΠΈΡ, ΡΠΈΠ½Ρ ΡΠΎΠ½ΠΈΠ·Π°ΡΠΈΡ ΠΈ Π±Π΅Π·ΠΎΠΏΠ°ΡΠ½ΠΎΠ΅ ΡΠ΄Π°Π»Π΅Π½ΠΈΠ΅.
ΠΠ°Π΄Π°ΡΠ°
How can we make business expense information available to an AI knowledge system in a useful, structured, and maintainable way?
Π Π΅Π·ΡΠ»ΡΡΠ°Ρ
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.
Π Π°Π±ΠΎΡΠΈΠΉ ΠΏΡΠΎΡΠ΅ΡΡ
- 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
ΠΠΎΠΊΠ°Π·Π°ΡΠ΅Π»ΡΡΡΠ²Π°
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.
- ΠΠ°ΡΠ° Π·Π°ΠΏΠΈΡΠΈ: 2026-10-19T14:41:25.434Z