Skip to content
~nguyen-huu-trung
← Back to projects

Conexa · B2B networking & CRM platform

AI Connector — an in-product agentic assistant

An agentic AI assistant inside a CRM app: 13 tools to search and act on the user’s own data, on both web and mobile.

Role
Lead developer — design and implementation
Period
2025 – 2026
Stack
TypeScriptGoNext.jsPostgreSQLClaude APIOpenAI APIWebSocket

note: Private client work — described at architecture level only, no source or customer data.

  • 13

    tools in the registry

  • 2

    platforms: web and mobile

  • 2

    AI providers backing each other up

  • 0

    separate AI permissions — it uses the app’s own

The problem

The platform already held a rich relational dataset — contacts, connection requests, events, interaction history — but users had to walk through several screens to get an answer out of it.

The brief was to open a conversational surface over that data, on web and mobile, without creating a second security surface and without letting LLM spend run loose.

The approach

  1. 01

    Tools gated by the app’s own permissions

    Every tool calls back into the same permission and visibility layer the UI uses, instead of a separate ACL for the agent. The consequence: agent access can never exceed what the user sees in the interface, and there is no second rule set to audit when permissions change.

  2. 02

    Cards instead of paragraphs

    The AI returns structured data that is shown as cards (contacts, events, invitations) instead of a long paragraph. Web and mobile read the same format, so the display logic is not written twice.

  3. 03

    A fallback when an AI provider fails

    If OpenAI fails or is overloaded, requests switch to Claude (Anthropic) so the feature keeps working. It only switches when the fault is on the provider’s side, so our own bugs are not hidden.

  4. 04

    Keeping AI cost under control

    Each prompt uses some of the user’s credits (refunded on failure), and each user has a monthly limit. The rule lives in PostgreSQL, so web, mobile and the backend all apply it the same way.

Architecture

Clients

Next.js web

streaming

Flutter mobile

WebSocket

Agent loop

TypeScript loop

route handlers

Go loop

realtime service

Tools & permissions

13 tools

read + write

App permission layer

shared with the UI

Model providers

OpenAI

Anthropic

Data & budget

PostgreSQL

credits, limits, usage log

Web and mobile call the same AI loop; every tool goes through the app’s existing permission layer.

Outcome

  • The assistant runs in production on both web and mobile, covering contact search, follow-up detection, network-wide search, event recommendation and write actions such as connection request, approve and decline.
  • An upstream outage degrades the feature to another model instead of taking it offline.
  • AI cost became predictable per user.