The pipeline is designed to be extensible. Because each agent is a plain Python function and edges between nodes are declared explicitly, you can insert a new agent at any point in the deterministic sequential chain without touching the supervisor or changing how other agents behave.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 supervisor only routes to
lead_research_agent or finished. Custom agents must be inserted inside the sequential chain — not after the supervisor’s conditional branch.Write the agent function
Every agent in the pipeline takes
state: dict and returns a dict containing the fields it produces. It reads what it needs from state, does its work, and returns only its output keys.Create a new file in the agents/ directory, for example agents/my_custom_agent.py:Add a state field
The output key your agent returns must be declared in Because
SalesMarketingState in graph/state.py. Open the file and add your field under the # AGENT OUTPUTS section:SalesMarketingState uses total=False, all fields are optional — you don’t need to provide a default value.Register the node
Open The node name (first argument) is the string identifier used when wiring edges.
graph/workflow.py and import your agent, then register it as a node on the StateGraph:Wire the edges
Edges define the order agents run. The current sequential pipeline in To insert your agent after You can insert your agent at any position in the chain using the same pattern — remove the existing edge between two nodes and replace it with two edges that route through your new agent.
workflow.py looks like this:proposal_generation_agent and before crm_update_agent, replace the edge between them and add two new edges:Test the pipeline
Run the workflow from the project root:As each lead is processed, If the node does not appear, check that
main.py prints a section header for every node that executes. Confirm your agent appears in the output:graph.add_node and both graph.add_edge calls are present in workflow.py, and that the agent file is importable without errors.