Skip to main content
All use casesUse Case

Power your sales assistant with LLMs and your own CRM data.

Build an AI sales assistant that retrieves context from your CRM, prospect data, or call transcripts, and generates personalized responses — all with per-rep usage tracking.

FastAPIOpenAIpgvectorPostgreSQLCeleryStripe

The usual pain points

  • Grounding LLM responses in real CRM and prospect data
  • Tracking which sales reps use the AI and how much
  • Keeping AI responses consistent with your brand voice
  • Integrating with existing CRM systems via webhooks

How the kit solves them

  • RAG pipeline to index and query CRM data and call transcripts
  • Per-API-key tracking for per-rep usage dashboards
  • System prompt configuration for brand voice and guardrails
  • Webhook endpoints for CRM sync and real-time data updates

Example implementation

main.py
@router.post("/v1/sales/draft-email")
@require_api_key(tier=["sales-rep", "sales-manager"])
async def draft_outreach_email(
    body: EmailDraftRequest,
    key: APIKey = Depends(get_api_key),
):
    # Retrieve prospect context from RAG index
    context = await rag.query(
        question=f"Context for {body.prospect_name} at {body.company}",
        collection="crm-data",
        top_k=3,
    )
    email = await llm.chat(
        messages=build_email_prompt(body, context),
        system=SALES_BRAND_VOICE_PROMPT,
    )
    await meter.record(key.id, email.tokens)
    return EmailDraftResponse(subject=email.subject, body=email.body)

Ready to build your ai sales assistant backend?

FastAPI AI Kit ships with everything shown above, pre-configured and production-ready. Clone the repo and start building in minutes.

Ready to ship your AI backend this weekend?

Join developers who skipped weeks of boilerplate and went straight to building.

Read the docs
No subscriptions · One-time payment · Lifetime updates