Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/vrashmanyu605-eng/Agentic_Sales-Markerting/llms.txt

Use this file to discover all available pages before exploring further.

The Agentic Sales & Marketing system is built on three composable layers: a LangGraph StateGraph that defines execution flow, a set of ten specialized agents that each perform a single task, and a tool layer that connects agents to external services. Every agent reads from and writes to a single shared state object — SalesMarketingState — so no agent calls another directly. This design keeps each layer independently testable and straightforward to extend.
The supervisor is a plain Python function — no LLM involved. It uses deterministic logic to pop leads from the queue and signal the router, which eliminates latency, cost, and non-determinism from the orchestration layer.

Three-layer architecture

Graph layer

The graph layer is defined in graph/workflow.py using LangGraph’s StateGraph. It owns:
  • Entry pointdiscovery_agent is always the first node to execute.
  • Static edges — deterministic add_edge calls wire agents together in a fixed sequence.
  • Conditional routing — the supervisor_router function reads state["next_agent"] and returns either "lead_research_agent" (process next lead) or "finished" (terminate via END).
  • Compiled appgraph.compile() produces the app object used in main.py to stream execution events.
The graph has no dynamic branching beyond the supervisor’s binary decision. Every lead follows the same path through the pipeline in the same order.

Agent layer

Ten specialized agents each own a single responsibility. They are registered as nodes in the graph and communicate exclusively through SalesMarketingState — reading the fields they need and writing the fields they produce.
AgentResponsibility
discovery_agentWeb search for target companies; populates pending_leads
supervisor_agentPops the next lead, sets next_agent, clears stale outputs
lead_research_agentScrapes company website and finds decision-makers
icp_matching_agentScores lead against ideal customer profile
competitor_analysis_agentMaps competitive landscape for the active lead
outreach_generation_agentWrites personalized emails, LinkedIn messages, and call pitches
proposal_generation_agentProduces a structured proposal document
crm_update_agentWrites lead summary and next steps to Google Sheets
sales_strategy_agentGenerates deal-specific sales strategy (available for extension)
marketing_content_agentProduces marketing collateral for the target industry (available for extension)
client_sentiment_agentAnalyzes email threads and meeting transcripts for sentiment signals (available for extension)
sales_strategy_agent, marketing_content_agent, and client_sentiment_agent are imported and registered as graph nodes in workflow.py but are not connected by edges in the default pipeline. You can activate any of them by inserting add_edge calls in workflow.py. See Add a custom agent for the pattern.

Tool layer

Agents delegate all external I/O to tools:
  • Web search — discovers companies and retrieves public company information
  • Website scraper — extracts content from company websites for lead research
  • LinkedIn finder — locates decision-makers and contact information
  • Email generator — generates candidate email address variants from a name and company domain
  • Google Sheets — writes enriched lead data to your configured spreadsheet

Pipeline execution order

Each lead moves through the pipeline in a fixed sequence. After crm_update_agent completes, control returns to the supervisor for the next lead. The loop continues until pending_leads is empty.
1

Discovery

discovery_agent searches for companies matching your target_industry and client_requirements. It populates pending_leads with a list of lead objects and passes control to the supervisor.
2

Supervisor evaluation

supervisor_agent pops the first lead from pending_leads, sets company_name and current_lead, clears the previous lead’s outputs, and writes next_agent: "lead_research_agent" to signal the router.
3

Lead research

lead_research_agent scrapes the lead’s website and finds decision-makers. It writes its findings to lead_research.
4

ICP matching

icp_matching_agent compares the lead against ideal_customer_profile and writes a fit score and rationale to icp_analysis.
5

Competitor analysis

competitor_analysis_agent analyzes the competitive landscape for this deal and writes results to competitor_analysis.
6

Outreach generation

outreach_generation_agent produces personalized emails, LinkedIn messages, and call pitches. Results go to outreach_content.
7

Proposal generation

proposal_generation_agent writes a structured IT services proposal to proposal_document.
8

CRM update

crm_update_agent writes all outputs for this lead to your Google Sheet and records the result in crm_update. Control returns to the supervisor.
9

Next lead or end

The supervisor checks pending_leads. If leads remain, it starts the next lead’s pipeline. If pending_leads is empty, it sets next_agent: "finished" and the graph terminates.

Learn more

Workflow graph

Full source code, node registration, edges, and the supervisor router

State reference

Every field in SalesMarketingState and which agents read or write it

Agent reference

Individual agent pages with inputs, outputs, and implementation notes

Build docs developers (and LLMs) love