Inspiration

Small and medium-sized businesses often receive customer and wholesale inquiries through WhatsApp, email, and other messaging platforms. Employees must manually read each request, identify products and quantities, check stock levels, calculate prices, review customer history, and prepare a response.

This process is repetitive, time-consuming, and vulnerable to mistakes such as incorrect product matching, outdated prices, stock-checking errors, and inconsistent replies.

Most existing AI solutions depend on costly cloud-based models and monthly subscriptions. These costs can increase because of inflation and changing foreign currency exchange rates. Businesses may also be concerned about sending private customer, pricing, and inventory data to external cloud services.

These problems inspired us to develop Angadi: Trade Agent, a locally deployable AI sales and inventory assistant designed for small and medium-sized businesses.

What it does

Angadi: Trade Agent receives a customer or B2B sales inquiry and processes it through an agentic workflow.

The system can:

  • Understand mixed-language customer requests, including Sinhala-English and Tamil-English messages.
  • Extract product names, quantities, customer requirements, and delivery-related details.
  • Match customer descriptions with products available in the business catalogue.
  • Check current inventory levels.
  • Retrieve product prices from local pricing records.
  • Review customer purchase history when available.
  • Check supplier information when stock is insufficient.
  • Generate a complete quotation or response draft.
  • Highlight low-stock products and recommend restocking.
  • Request clarification when the customer message is unclear.
  • Send the prepared response only after employee or manager approval.

The main agentic workflow is:

Understand → Plan → Use Tools → Validate → Approve → Execute

The system follows a human-in-the-loop approach. This means the AI can prepare recommendations and responses, but important actions remain under human control.

How we built it

We designed Angadi as a modular local AI system that can run on an ordinary business computer.

The prototype uses a simple web interface where employees can enter or review customer inquiries. The inquiry is passed to a local language model, which identifies the intent, requested products, quantities, and other important information.

The AI agent then creates a plan and calls the necessary local tools, including:

  • A product catalogue.
  • A SQLite inventory database.
  • CSV-based pricing records.
  • A customer history database.
  • Supplier information services.
  • Local business rules.
  • Approval and validation modules.

A locally runnable language model, such as Qwen3-8B, is used for natural language understanding, information extraction, reasoning, and response generation. Running the model locally reduces dependence on paid cloud AI services and helps protect sensitive business data.

The system was designed using multiple processing states, including:

  • RECEIVED
  • EXTRACTING
  • MATCHING_PRODUCT
  • CHECKING_INVENTORY
  • CHECKING_PRICE
  • CHECKING_CUSTOMER_HISTORY
  • CHECKING_SUPPLIER
  • GENERATING_DRAFT
  • VALIDATING
  • WAITING_FOR_EMPLOYEE_APPROVAL
  • WAITING_FOR_MANAGER_APPROVAL
  • EXECUTING_APPROVED_ACTION
  • COMPLETED

Exception states such as NEEDS_CLARIFICATION, LOW_CONFIDENCE, DATA_CONFLICT, and TOOL_UNAVAILABLE allow the system to stop safely when it cannot produce a reliable result.

Challenges we ran into

One major challenge was handling customer messages written in mixed languages. Customers may combine Sinhala, Tamil, and English within the same sentence while also using abbreviations, spelling variations, informal product names, and incomplete descriptions.

Another challenge was matching customer-requested product names with the correct items in the catalogue. A customer may use a brand name, nickname, shortened description, or alternative spelling instead of the official product name.

Inventory and pricing information may also change after a response is generated. To reduce this risk, the system must revalidate stock and pricing before an approved action is executed.

Running an AI model locally creates hardware limitations. Smaller businesses may not have powerful GPUs or high-memory computers. Therefore, we had to consider model size, quantization, response speed, memory usage, and the possibility of running heavier processing during idle computer usage.

Designing the approval workflow was also challenging. The system needed to automate repetitive tasks while ensuring that employees and managers retained control over quotations, discounts, stock commitments, and outgoing messages.

We also had to make sure that the agent did not continue when information was uncertain. This required confidence checks, validation rules, exception states, and manual review options.

Accomplishments that we're proud of

We are proud that Angadi combines sales automation, inventory checking, pricing, customer history, supplier support, and approval management within one agentic workflow.

The project was designed specifically for small and medium-sized businesses rather than assuming access to expensive cloud infrastructure.

We introduced two levels of human approval:

  1. Employee approval for normal customer responses.
  2. Manager approval for sensitive actions such as special pricing, discounts, or major stock commitments.

We are also proud of the system's privacy-focused local deployment. Customer conversations, product prices, stock information, and business records can remain inside the business environment.

Another important accomplishment is the system's ability to handle multilingual and mixed-language customer inquiries, which is especially valuable for businesses operating in Sri Lanka.

The project also reduces dependence on monthly cloud AI subscriptions. Since the model can run locally, businesses are less affected by foreign currency fluctuations, international payment restrictions, and increasing cloud AI costs.

What we learned

We learned that building an AI agent involves more than connecting a language model to a user interface. A reliable agent must understand the request, create a plan, use external tools, validate the results, request approval, and safely execute the final action.

We learned the importance of structured outputs. The language model must return clearly defined fields such as product name, quantity, confidence score, customer intent, and missing information instead of producing only free-form text.

We also learned that language models should not be treated as the source of truth for business data. Prices, inventory values, customer records, and supplier information must be retrieved from reliable databases and tools.

Another major lesson was the importance of human-in-the-loop control. AI can reduce manual work, but humans should remain responsible for important financial and operational decisions.

We also gained experience in local LLM deployment, multilingual request processing, database integration, agent state management, validation, exception handling, and approval-based automation.

What's next for Angadi: Trade Agent

The next step is to connect the system directly with platforms such as WhatsApp Business and email so that customer requests can be received automatically.

We also plan to improve product matching using multilingual embeddings and business-specific product dictionaries. This will help the system understand alternative spellings, local-language product names, abbreviations, and informal customer descriptions.

Future versions can include:

  • Automatic quotation PDF generation.
  • Voice message transcription.
  • Real-time inventory synchronization.
  • Supplier price comparison.
  • Purchase order generation.
  • Low-stock prediction.
  • Demand forecasting.
  • Customer relationship management integration.
  • Sales analytics and dashboards.
  • Role-based employee and manager access.
  • Detailed audit logs.
  • Mobile and desktop applications.
  • Offline operation with background synchronization.
  • Support for multiple shops and warehouses.

Our long-term goal is to make Angadi a practical, affordable, and privacy-focused AI assistant that helps businesses respond faster, reduce mistakes, manage stock efficiently, and improve customer service without depending heavily on costly cloud AI platforms.

Built With

Share this project:

Updates

Submission history