AI-Powered Commodity Trading Platform
A B2B commodity trading platform with the AI layer that supports complex physical commodity transactions.
70% faster deal-blocker investigation
Average time required to identify why a deal could not progress decreased from 10 minutes to 3 minutes using the Claude-powered Megabrain assistant.
60% fewer manual compliance checks
Automated document cross-checking and KYC/KYB workflows reduced the average number of manual verification steps from 10 to 4 per case.
65% of trader questions resolved through Megabrain
The Claude-powered assistant handles 65% of deal, document, and compliance questions without requiring users to manually search across platform data.
About the project
Commod is a B2B platform for physical commodity trading across metals, oil and gas, and agriculture. Yellow built the platform from scratch and developed Megabrain, an AI assistant powered by Claude Sonnet that helps users understand live deal status, identify settlement blockers, analyze contracts and documents, answer compliance questions, and prepare messages and exports, while keeping all settlement-critical decisions within Commod’s deterministic CFC Protocol.
The client had
A concept for a commodity trading platform
Strict settlement/compliance requirements
Complex contracts, documents, and payment workflows
Large volumes of trade and compliance documents
We were responsible for
Building the platform from scratch
Developing the AI assistant and routing system
Building AI document-processing workflows
Implementing KYC/KYB, fraud detection, and AI observability
Team
Project Manager
3 AI Engineers
2 Backend Engineers
2 Frontend Engineers
Key Features
Megabrain AI assistant
Megabrain gives every user an AI assistant with access to the current platform state. Instead of discovering a problem only after an operation fails, users can ask what is preventing a transaction from progressing and receive a contextual explanation.
Deal and contract intelligence
The assistant can answer questions about deals, contracts, transaction conditions, accounts, documents, and compliance requirements using information available inside Commod.
AI document processing
A fleet of 13+ asynchronous Python workers processes document-heavy workflows such as OCR and vision parsing, contract-clause extraction, cross-document verification, inspection comparisons, and document analysis.
How Claude Sonnet is used
Anthropic Claude Sonnet serves as the primary reasoning model behind Commod's AI assistant, while deterministic platform logic remains responsible for settlement. Every user request first enters an intent router, which selects exactly one of three execution paths.
Direct response
Claude answers directly when a request can be handled from the available conversational and domain context without querying another system.
Synchronous tool call
The assistant retrieves live platform data through in-process tools, then Claude interprets it and returns the response to the user.
Asynchronous agent
Long-running tasks run through 13+ Python workers via Redpanda for OCR, document analysis, verification, sentiment, and fraud detection, with results returned through chat.
Tech stack
AI & LLM
Anthropic Claude Sonnet, LangChain, LangGraph, LangSmith, Langfuse, LightRAG
Backend
TypeScript, NestJS, Fastify, Python
Data & infrastructure
PostgreSQL, Redis, Milvus, Elasticsearch, Temporal.io, Kafka/Redpanda
Frontend
React, Vite, Next.js, TipTap, Yjs, Socket.IO
Infrastructure
Docker, Kubernetes, DigitalOcean
Identity & compliance
Trulioo, Didit, ComplyAdvantage
Document security
Resistant AI
Electronic signatures
SignWell
Development challenges and solutions
Making AI trustworthy inside a regulated settlement flow
Challenge: Commodity settlement involves legal and financial risk, so prompt-level restrictions were not enough.
Solution: We enforced safety at the architecture level. All current AI tools are read-only, preventing the model from changing deals, signing documents, confirming settlement, or moving funds. Future write actions will require explicit permissions and human approval.
Preventing partially completed multi-step actions
Challenge: Complex workflows can appear successful at the API level while leaving the business process incomplete. For example, a document upload may return a successful response while simultaneously opening a review case that continues to block settlement.
Solution: We verify the final platform state after each action, test write flows in a shadow workspace, and replay action chains in CI to catch failures before production.
Keeping AI accurate for expert commodity traders
Challenge: Traders expect precise terminology and reliable information, while human review times are often unpredictable.
Solution: We grounded the assistant with LightRAG and Commod’s internal documentation. It avoids invented ETAs and instead shows the exact blocker, queue, or responsible party.
Processing complex documents without blocking the user experience
Challenge: Contracts, inspections, and compliance documents require heavy OCR, extraction, and verification. Running these workflows synchronously would make the assistant slow and unreliable.
Solution: We moved these tasks to 13+ asynchronous AI workers, keeping the chat experience fast while long-running workflows process in the background.
Results
Yellow built the foundation of Commod’s AI-enabled commodity trading platform, combining deterministic settlement with AI-powered trade, document, compliance, and risk workflows. Claude Sonnet helps traders understand deal status, investigate blockers, and work with complex documentation while keeping settlement-critical decisions outside the model’s control.
monthly cost.
