LeadFlowXLeadFlowX

AI-Powered B2B CRM

API: AI Agents

Configure and run AI agents for lead processing.

Agent Configuration

GET
/api/agents/config

List all agent configurations

Auth: Session

PUT
/api/agents/config

Enable/disable an agent

Auth: Session

ParameterTypeDescription
agentTypestringWEB_SCRAPER, INTENT_SCORER, or OUTREACH_DRAFTER(required)
enabledbooleanEnable or disable the agent
autoRunbooleanAuto-run when new leads arrive

Run Agent (Batch)

POST
/api/agents/run

Run an agent on up to 5 leads

Auth: Session

Request
{ "agentType": "WEB_SCRAPER" }
Response
{ "agent": "WEB_SCRAPER", "processed": 3, "results": [{ "leadId": "clx...", "name": "Jane", "status": "enriched" }] }

Single Lead Operations

POST
/api/agents/enrich

Enrich a single lead

Auth: Session

POST
/api/agents/score

Score a single lead

Auth: Session

POST
/api/agents/draft

Draft outreach for a single lead

Auth: Session

All three accept either leadId or individual fields (name, company, etc.).

Full Pipeline

POST
/api/agents/pipeline

Run enrich → score → draft for a lead

Auth: Session

Request
{ "leadId": "clx...", "step": "enrich" }

Omit step to run all three steps. Valid steps: enrich, score, draft.