Built for IT audit sign-off before a single SKU syncs.
Wholesale distributors trust AJEN with multi-godown stock positions, supplier pricing, and GST tax classifications. Every connector boundary, AI permission tier, and tenant database policy is enforced deterministically in code and verified across 123 automated security tests.
Outbound-Only TallyPrime Data Flow
TallyPrime + Windows Service Connector
- •Reads TallyPrime XML locally over loopback
127.0.0.1:9000only. - •Stores pairing token encrypted with
AES-256-GCM&scrypt-machine-v1key derivation. - •Initiates strictly outbound
TLS 1.3HTTPS requests to AJEN API.
Authenticated Control & FAIL_CLOSED Gate
- •Derives
organizationIdstrictly from verified Supabase JWT / SHA-256 connector bearer hash (never request body). - •Runs RBAC permissions (
PermissionsGuard) and Zod schema validation on every endpoint & agent tool call. - •Enforces
FAIL_CLOSEDstaleness & control-total reconciliation checks before reorder execution.
Row-Level Isolation & Immutable Audit
- •Every customer-owned table enforces
organization_id = current_tenant_id()RLS policies. - •Least-privilege policies split read access from manager approvals and audit log writes.
- •Append-only
audit_logscapture every agent tool call, policy gate block, and human signature.
AI Action Boundaries (Levels L0–L3)
| Boundary Tier | Operational Scope | Allowed Operations | Mandatory Technical Control |
|---|---|---|---|
| L0 · Read & Math | Deterministic Stock & GST Engine | Godown stock position, 14d/30d/90d demand velocity, MOQ/pack-size rounding, CGST+SGST/IGST splits, and aging buckets. | Pure server-side TypeScript arithmetic. LLMs never execute arithmetic or arbitrary SQL queries. |
| L1 · Scrubbed Drafts | Untrusted Input Isolation & Drafting | Parses PDF/WhatsApp POs, supplier invoices, and CSV sheets into strictly unapproved DRAFT records. | PromptSanitizerService wraps ERP text inside <untrusted_erp_data> tags; CWE-1236 strips leading = + - @ formula triggers. |
| L2 · Approval Lock | Human-in-the-Loop Financial Gate | Purchase orders, Sales Order approvals, Supplier Debit Notes, and Inter-Godown Transfer orders. | Approvals bind to a cryptographic SHA-256 version_hash of prices, quantities, and tax lines (HTTP 409 on drift). |
| L3 · Gated Sync | Idempotent TallyPrime Write-Back & Kill-Switch | Enqueues approved vouchers for Tally XML import (REMOTEID idempotency) and approved dispatch drafts. | Strictly requires APPROVED state plus active tenant workflow switch; instantly halted by the Approved Workflow: PAUSED control. |
Subprocessor & Hosting Matrix
| Layer | Service / Provider | Primary Region | Processing Purpose | Security & Data Guarantees |
|---|---|---|---|---|
| Database & Auth | Supabase (PostgreSQL + Auth) | ap-south-1 (Mumbai, India) | Multi-tenant ERP ledger storage, JWT issuance, and PostgreSQL RLS enforcement. | TLS in transit, AES-256 at rest, strict current_tenant_id() RLS policies on all tenant tables. |
| AI Inference Gateway | Server-Side LLM Provider API | Configured API Endpoint | Natural-language order parsing, data-analysis briefs, and collection message drafting. | Zero model training on customer data, tool-allowlist enforcement, monthly token & USD cost hard caps. |
| Background Queue | Redis & BullMQ | Private App Network / VPC | Asynchronous sync jobs, recommendation sweeps, and write-back polling state. | Authenticated password/TLS connection; stores job IDs and pointers rather than raw credentials. |
| Application Runtime | Next.js Web + NestJS API Containers | ap-south-1 / Customer VPC | SSR customer workbench, RBAC guards, Zod validation, and Tally connector API. | Non-root Node 20 containers, rate limiting, structured security exception filtering (zero SQL error leaks). |
How to Revoke Access Immediately
Tenant Administrators retain unilateral control to cut off ERP sync, halt agent execution, or initiate full organization offboarding in seconds.
Revoke Tally Connector Token
Navigate to /settings/integrations to mark the active connector REVOKED (invalidates bearer token immediately), or stop the local service via ajen-connector uninstall-service.
Pause All Automated Workflows
Open /settings/agent or the header status badge and toggle Approved Workflow: PAUSED. Blocks all agent runs, AI drafts, and queued Tally XML dispatches instantaneously with an audit reason logged.
Export Data & Purge AI History
Visit /settings/security to trigger a self-service JSON Data Portability Export, purge conversational AI memories, or execute full tenant offboarding and connector revocation.