Inspiration
I built Zalyx Ledger, a bookkeeping platform that helps small businesses in Nigeria record transactions, orders, and customers. That data was always meant for more than producing receipts.
Many merchants struggle to access financing because they lack formal credit histories. Yet their Ledger activity contains useful signals: revenue trends, collection rates, operating consistency, and customer behaviour. The data exists, but evaluating it manually is slow and inconsistent.
Zalyx Agent Society turns those bookkeeping signals into structured, explainable underwriting recommendations.
What it does
Zalyx Agent Society is a multi-agent AI underwriting system for emerging-market merchants. It accepts a Zalyx Ledger snapshot containing orders, revenue, receivables, and behavioural signals, then produces an auditable financing recommendation in under 60 seconds.
Five specialist agents operate through a staged pipeline:
- Data Quality Agent checks completeness, consistency, and suspicious activity such as backdated orders, batch-entry patterns, and high edit or deletion rates.
- Business Analysis Agent evaluates revenue trajectory, stability, transaction frequency, and overall business health.
- Risk Assessment Agent challenges the business analysis, identifies structured risk factors, and produces a 0–100 risk score.
- Financing Structure Agent creates Murabaha-aligned cost-plus financing terms based on risk and repayment capacity.
- Human Review Agent synthesizes the evidence, debate, and financing structure into a final recommendation: Approved, Rejected, or Requires Clarification.
Data Quality and Business Analysis begin in parallel. Risk Assessment then challenges their findings. When the Business and Risk agents disagree, an additional rebuttal and verdict round is triggered. Financing Structure and Human Review follow sequentially.
A single-agent baseline also runs alongside the pipeline, allowing credit officers to compare a conventional AI response with the structured multi-agent result.
Every completed decision is persisted in Amazon DynamoDB and can be reopened through a permanent, deep-linkable report URL.
How it was built
The backend is a TypeScript and Express service deployed to AWS Elastic Beanstalk using Docker.
All five agents run through the Amazon Bedrock Converse API using Amazon Nova Pro. Each agent submits typed JSON through Bedrock tool use rather than returning unstructured prose. A custom MCP server provides additional tools for CBN compliance checks, industry benchmarks, and sector default rates.
Results stream to the frontend using Server-Sent Events, allowing analysts to observe each stage as it completes.
Amazon DynamoDB stores merchant snapshots and underwriting decisions. Decisions use merchantId as the partition key and requestId as the sort key. This supports direct report retrieval through a composite-key lookup and merchant-specific decision-history queries.
A decision-index global secondary index supports cross-merchant queries by decision outcome. History views request only summary attributes using ProjectionExpression, keeping API responses lightweight without transferring complete report documents.
The React, TypeScript, and Vite frontend is deployed on Vercel. Routes such as /merchants/:merchantId/decisions/:requestId make every decision bookmarkable and shareable.
The deterministic Murabaha engine calculates a cost price, disclosed profit, fixed sale price, repayment tenor, and affordability ratio. The structure follows cost-plus financing principles with no interest or compounding.
Challenges we ran into
Orchestrating agents that disagree
A strong revenue trend does not automatically eliminate concentration, receivables, or operational risks. We designed a conditional debate round where the Business Analysis Agent must defend its position and the Risk Assessment Agent can concede, compromise, or maintain its challenge.
Deploying efficiently to Elastic Beanstalk
Compiling TypeScript and Vite during the Elastic Beanstalk Docker build caused deployment times exceeding 30 minutes. We moved compilation to the local build process and created a production image containing pre-built artifacts. This reduced deployment time to under three minutes.
Balancing explainability and speed
A score alone is not enough for a credit officer. We needed structured results that remained understandable to non-technical reviewers. Typed Bedrock tool outputs allowed us to produce consistent risk factors, financing terms, conditions, and merchant-facing explanations while retaining sub-60-second execution.
Accomplishments that we're proud of
- Built a working path from exported Ledger-shaped merchant snapshots to structured financing recommendations.
- Created a staged five-agent pipeline with conditional debate rather than relying on one generic AI response.
- Added a single-agent baseline that makes the multi-agent system's contribution measurable.
- Achieved sub-60-second underwriting with live progress streaming.
- Built a deterministic Murabaha-aligned financing engine with disclosed cost, profit, and sale-price calculations.
- Created a DynamoDB-backed audit history with direct report lookup, summary queries, and permanent URLs.
- Deployed a complete cloud architecture using Vercel, AWS Elastic Beanstalk, Amazon Bedrock, and Amazon DynamoDB.
What we learned
Agentic systems need clearly separated responsibilities. Agents given vague instructions tend to hedge or duplicate one another.
Each Zalyx agent therefore has a specific role, a defined output schema, and explicit evidence requirements. This structure gives the downstream Human Review Agent consistent inputs and makes disagreements visible instead of hiding them inside one model response.
We also learned that multi-agent systems should not create extra calls without purpose. The debate round only runs when the Business and Risk agents genuinely disagree, while clearly high-risk applications can skip financing calculations entirely.
What's next for Zalyx Agent Society
- Live Ledger integration: Synchronize current merchant activity instead of submitting exported snapshots manually.
- Appeal workflow: Allow merchants to provide additional evidence and request reconsideration.
- Portfolio analytics: Aggregate decision and risk signals across merchants for credit officers.
- Policy configuration: Allow underwriting teams to configure risk thresholds and affordability rules.
- Multi-market expansion: Adapt benchmarks and financing structures for additional African markets.
Built With
- beanstalk
- bedrock
- docker
- dynamodb
- elastic
- express.js
- node.js
- react
- typescript
- vite
Log in or sign up for Devpost to join the conversation.