AI Agent Orchestration & Sales Automation

n8n-orchestrated WhatsApp SDR with Postgres and pgvector memory.

PsiAtiva n8n agent-orchestration workflow

Built PsiAtiva's own acquisition operations with n8n orchestration, a WhatsApp SDR, Postgres and pgvector memory, evidence-based lead qualification, and AI-assisted routing.

Role
Founder & Automation Engineer
Timeframe
Since May 2026
Stack
JavaScriptPython
Evidence
  • Live
  • Product stack

PsiAtiva in productionView workflow evidence

The intelligent inbound acquisition and sales qualification engine powering PsiAtiva. Orchestrated across production n8n workflows, it integrates web lead capture, an autonomous conversational WhatsApp SDR agent, PostgreSQL and pgvector semantic retrieval memory, and evidence-based diagnostic scoring.

First-party operational infrastructure for Juan Silva's own company (PsiAtiva). Juan architected the container stack, database schemas, prompt logic, and multi-step workflow pipelines. Categorized strictly as own-business capability evidence — proof of production AI agent engineering and backend workflow orchestration, not a delivered client contract.

Production n8n AI operations showcase demonstrating inbound webhook routing, lead enrichment, autonomous WhatsApp SDR, and pgvector RAG memory.
Fifty-five seconds, silent and looping — full production architecture: webhook ingestion, dual-LLM lead enrichment, conversational WhatsApp SDR, and pgvector semantic retrieval.

Architecture: The autonomous WhatsApp SDR agent

Modern sales automation requires far more than rigid decision trees. At the center of PsiAtiva's acquisition engine is 'Renata', an AI-powered Sales Development Representative (SDR) operating on the WhatsApp Business API. Orchestrated via n8n and powered by large language models, the agent handles asynchronous conversational qualification with potential clinic owners. Rather than forcing rigid multi-choice menus, it engages in natural clinical dialogue, isolates operational pains, and moves qualified prospects toward strategic diagnosis meetings.

Renata conversational WhatsApp SDR qualification flow operating over WhatsApp Business API via n8n.
Sixteen seconds, silent and looping — asynchronous conversational qualification: message receipt, prompt assembly with CFP compliance, humanized typing delay, and response dispatch.

Contextual memory: PostgreSQL and pgvector RAG

To prevent hallucinations and maintain institutional knowledge across multi-day conversations, the SDR agent does not rely solely on transient chat histories. I engineered a retrieval-augmented generation (RAG) subsystem backed by PostgreSQL and pgvector:

  • Semantic Knowledge Base — Vector embeddings of PsiAtiva's clinical methodologies, CFP ethical compliance regulations, positioning frameworks, and service tiers.
  • Session Persistence — Thread-level conversational state stored in structured relational tables, tracking stage progression and identified clinical challenges.
  • Real-Time Context Injection — User queries trigger cosine similarity searches against the vector store, dynamically grounding model responses in verified facts.
  • Lead Enrichment Pipeline — Ingests intake quiz responses, evaluates digital presence indicators, and synthesizes a structured lead dossier before the conversation opens.
pgvector semantic retrieval and contextual memory pipeline inside n8n.
Fifteen seconds, silent and looping — query vectorization, 1536-dimensional cosine distance similarity match (<=>), and grounded context injection into LLM prompts.
Autonomous agents fail when disconnected from persistent memory. By coupling conversational LLMs with pgvector retrieval and strict domain guardrails, the system operates as a reliable consultative bridge between web capture and human closing.
n8n
core workflow orchestration engine
pgvector
semantic RAG retrieval & session memory
WhatsApp
conversational SDR interface (Z-API)
Multi-Model
reasoning and classification pipelines

Production container infrastructure

The automation architecture is self-hosted via Docker Compose. The environment isolates the n8n execution service from the dedicated PostgreSQL vector database, maintaining persistent bind-mounted storage to guarantee resilience across host restarts. Environment variables, API keys, and database credentials follow strict principle-of-least-privilege boundaries, ensuring that external webhooks cannot execute arbitrary administrative routines.

What this is not

  • Not a client case study or customer automation delivery. This is internal operating infrastructure built for my own venture.
  • Not an off-the-shelf chatbot tool or no-code widget. The system connects custom vector databases, multi-step LLM chains, and REST APIs.
  • Not unverified performance claims. No response speed, lead volume, or conversion metrics are quoted under strict transparency rules.
  • Not exposed private data. Workflow IDs, internal credentials, and contact identities are strictly isolated within internal environments.

The design engineer as systems builder

This project illustrates how modern design engineering extends beyond visual components and layout styling. True user experience encompasses the entire journey — from the initial click on a landing page button to the prompt engineering, latency management, and conversational empathy delivered by an automated system. Building this operational backend demonstrates my ability to engineer full-stack systems where interface and autonomous logic function as a single product.

Evidence

Operates live in production handling PsiAtiva's inbound lead intake and qualification. Connects website diagnostic webhooks to real-time WhatsApp conversational qualification backed by long-term vector memory. Under portfolio transparency standards, zero volume, response speed, or revenue claims are made.