# Sales Knowledge Agent

A sales assistant for objection handling, follow-ups and conversation reviews, with permission-aware retrieval, structured plans, task recovery and model usage accounting.

- Author: Dianhai Wang
- Source: https://cv.dancelight.cn/en/projects/sales-agent/
- Updated: 2026-11-17

2026.05 - 2026.09 · WeChat Mini Program and admin console · Sales training application

## My contribution

I worked on retrieval, agent orchestration and delivery. SQL applies access rules before full-text and vector results are fused with RRF. Longer plans can resume from persisted stage results using a PostgreSQL queue.

## Context

Sales questions need knowledge, context and practical next steps. This project provides quick answers and four-part sales plans, supported by a WeChat Mini Program and a Vue admin console.

## Technologies

Python, FastAPI, LangGraph, pgvector, Vue 3

## Workflow

User question → Access-aware retrieval / RRF → Agent orchestration → Plan and references

## Implementation

### Check access before retrieval

Combined PostgreSQL full-text search and pgvector retrieval using RRF. Filtered knowledge entitlements and publication status in SQL so unauthorized content stays out of model context.

### Keep generation within defined limits

Restricted available tools, retrieval calls and execution steps by stage. Delivered answers through structured fields and server-resolved references, with clarification and refusal when appropriate.

### Resume unfinished work

Used a PostgreSQL task queue and persisted plan sections for staged recovery. Saved request policy snapshots and rechecked access rights when resuming.

### Account for usage and credits

Persisted model usage by call ID, handling fallback-model pricing, cancellation and duplicate accounting. Implemented credit reservation, settlement and refunds.

## Delivery and scope

The project has a recorded pass of 753 backend non-live regression tests dated 2026-10-07. This is engineering regression evidence, not a measure of model answer accuracy or a production SLA.

## Other projects

- [Oracle Data Assistant](https://cv.dancelight.cn/en/projects/oracle-data-agent/)
- [B2B Sales Lead Workflow Toolkit](https://cv.dancelight.cn/en/projects/sales-lead-workflows/)
