Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ababilpay.xyz/llms.txt

Use this file to discover all available pages before exploring further.

AbabilPay includes an AI agent layer built around Claude, LangChain-style orchestration, Supabase data, Circle actions, and pgvector memory. Agents react to product events, write audit logs, and communicate through email or push notifications.

Architecture

The Orchestrator Agent receives events from Supabase Edge Functions and routes work to specialized agents. Each agent can use scoped tools for Supabase reads and writes, Circle API actions, Resend email, and push notifications.

Agent roster

AgentResponsibilityExample actions
OrchestratorEvent routing and task coordinationReceives webhook events, chooses sub-agent, handles retries, logs decisions.
Auto-Convert AgentSwap executor for non-USDC depositsFetches quotes, enforces slippage, executes swap, notifies user.
Invoice Follow-Up AgentInvoice reminder and collection workflowSends due-date reminders, marks overdue invoices, drafts personalized follow-ups.
Fraud Detection AgentReal-time anomaly and risk detectionFlags unusual amounts, detects new destination wallets, can hold suspicious transfers.
Insights and Forecast AgentMerchant analytics and cash-flow forecastingWeekly revenue emails, 30-day forecasts, customer trend detection.
Bridge Route AgentCross-chain route selectionFetches gas data, estimates route cost, selects cheapest route that satisfies timing.

Agent memory

Agents store reusable context as vector embeddings in the agent_memory table. This enables semantic search over transaction patterns, merchant history, and prior decisions without sending long histories to the model every time.
insert into agent_memory (user_id, content, embedding)
values (
  'user-uuid',
  'User typically sends $200-500 USDC to 3 recurring wallets on Fridays',
  openai_embedding('user payment pattern...')
);

select content
from agent_memory
where user_id = 'user-uuid'
order by embedding <-> query_embedding
limit 5;

Auditability

Every agent action should be written to agent_logs with the agent type, action, input context, result, optional risk score, and timestamp. This keeps automated payment operations inspectable for support, compliance review, and product debugging.