Every agent in the pipeline communicates exclusively throughDocumentation 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.
SalesMarketingState. No agent calls another directly; each reads the fields it needs, does its work, and returns a dict of updated fields that LangGraph merges back into the shared state. This means you can add, remove, or reorder agents without changing how data flows — as long as the fields they depend on are populated by an earlier step.
SalesMarketingState is declared with total=False, making every field optional by default. Agents only read what they need and only write what they produce. A field that has not yet been set by any agent will be absent from the dict (not None) unless explicitly initialized in initial_state.Full source
graph/state.py
Field reference
Task input
These fields define the top-level goal for the workflow run. You set them ininitial_state before calling app.stream().
Natural language description of what the workflow should accomplish. Read by the discovery agent to guide its search strategy.Example:
"Find potential IT services leads, research them, generate outreach strategies and proposals, and save all details to Google Sheets."Name of the company currently being processed. The supervisor sets this by reading
current_lead["company_name"] when it pops a lead from pending_leads. Cleared to None when the workflow ends.Industry vertical to target during lead discovery. Passed to the discovery agent to filter search results.Example:
"IT Services / AI Automation"Name of the person sending outreach on behalf of the company. Used by the outreach generation agent to personalize emails and messages.
Raw inputs
These fields hold documents and data you provide at startup. Agents use them as context for analysis and content generation.Full text extracted from your sales deck PDF. Loaded by
main.py using extract_pdf_text() before the workflow starts. Agents use this to understand your service offerings when generating proposals and outreach.Requirements document or job description read from
jd.txt. Used by the discovery agent to match leads and by content agents to tailor messaging.Seed data about known competitors. The competitor analysis agent builds on this with live research for each lead.
Business data
Fields describing your company’s services, positioning, and pricing. Set these ininitial_state to give agents the context they need to produce accurate, personalized content.
Comma-separated list of services your company provides. Used in proposals and outreach to match offerings to each lead’s needs.
Longer description of your service capabilities. Gives agents richer context for proposal generation.
Description of your target customer. The ICP matching agent compares each lead against this field to produce a fit score.
High-level pricing range or structure. Included in proposals and outreach when relevant.Example:
"Projects range $10k-$50k."Agent outputs
These fields are written by agents as they complete their work. Each field is cleared by the supervisor before processing the next lead, so agents always see fresh data for the active lead.Research findings for the active lead, written by
lead_research_agent. Includes website content summary, key personnel, and company background.Queue of lead objects waiting to be processed. Populated by
discovery_agent. The supervisor pops one lead at a time by reading pending_leads[0] and writing pending_leads[1:] back to state.ICP fit assessment for the active lead, written by
icp_matching_agent. Includes a fit score and rationale based on ideal_customer_profile.Competitive landscape analysis for the active lead’s deal, written by
competitor_analysis_agent.Personalized outreach materials written by
outreach_generation_agent. Typically includes an email, LinkedIn message, follow-up sequence, and call pitch.Structured IT services proposal written by
proposal_generation_agent. Incorporates lead research, ICP fit, and your service details.Deal-specific sales strategy, written by
sales_strategy_agent. This agent is registered but not connected by pipeline edges in the default workflow.Marketing collateral for the lead, written by
marketing_content_agent. This agent is registered but not connected by pipeline edges in the default workflow.Sentiment analysis output from
client_sentiment_agent. This agent is registered but not connected by pipeline edges in the default workflow.Confirmation or summary of the Google Sheets write operation, written by
crm_update_agent. Indicates what was saved and where.List of enriched contact objects for the current lead, produced by
lead_research_agent. Each entry contains the contact’s name, LinkedIn URL, and a list of possible email addresses. Overwritten for each new lead.Agent-specific inputs
These fields provide context that specific agents need. Set them ininitial_state or let upstream agents populate them.
Single meeting transcript. Used by
crm_update_agent to extract CRM data such as client requirements, objections, and next steps.List of meeting transcripts. Used by
client_sentiment_agent to analyze sentiment trends across multiple interactions.Name of an existing client or prospect. Distinct from
company_name — used by content agents when addressing the recipient directly.Existing email threads with a prospect. Used by
client_sentiment_agent to analyze sentiment and buying signals from prior communications.Summaries of past successful projects. Included in proposals and outreach to build credibility.
Detailed or custom pricing information. More granular than
pricing_information; used when a proposal requires scope-specific pricing.Google Sheets spreadsheet ID. The
crm_update_agent uses this to identify which sheet to write to.Example: "1MsG4jkVacHwuw2cxTQ_Vt5cW5qKoBgGJH1IqfDCdRto"A1 notation range for CRM writes.Example:
"Sheet1!A1"Declared in the schema for extensibility. In the default pipeline,
discovery_agent writes leads directly to pending_leads. This field is available for custom agents or pipelines that want to separate raw discovery results from the supervisor’s processing queue.Numeric index tracking position in the lead list. Initialized to
0 in initial_state.The full lead object currently being processed. Declared in the schema; the supervisor writes
current_lead in practice — active_lead is available for custom agents that prefer this key name.Workflow control
These fields coordinate execution flow. The supervisor reads and writes most of them; the router readsnext_agent to decide where to go next.
Human-readable label for the current phase of the workflow. Initialized to
"start" and updated as the workflow progresses.The routing signal written by the supervisor and read by
supervisor_router. Valid values in the default pipeline are "lead_research_agent" (process next lead) and "finished" (terminate).Append-only log of agents that have executed. Printed as a summary at the end of a successful workflow run.
List of agent names that have completed successfully in the current run.
List of agent names that raised an error. Used for diagnostics and potential retry logic.
Execution status
Top-level status fields for monitoring and error reporting.True when the workflow has finished processing all leads. Initialized to False.Integer from
0 to 100 representing workflow progress. Initialized to 0.Free-text explanation of the supervisor’s last routing decision. Declared in the schema for observability;
main.py reads and prints this field if populated. The current deterministic supervisor does not write to it, but you can add reasoning strings here when extending the supervisor.Error message if the workflow encountered an unhandled exception.
None during normal execution.Learn more
Workflow graph
How nodes, edges, and the supervisor router connect in the StateGraph
Architecture overview
Three-layer design and how agents, tools, and state fit together