graph TD
A[User Input] --> B{Research Agent: ResearchConductor}
B --> C[#181 - Research Topic Or Keyword Deeply]
C --> D[#185 - Brainstorm Most Relevant DomainsWebsites]
D --> E[Select top 3 URLs for each keyword]
E --> F[Crawl content from selected URLs using BeautifulSoup]
F --> G[Summarize crawled content using text summarization API or library]
G --> H[Store search queries, selected URLs, crawled content, and summaries in JSON object]
H --> I{Content Structuring Agent: ContentStructurer}
I --> J[#238 - Code interpreter: Analyze summarized research content using NLP techniques]
J --> K[Decide on 10 specific section titles based on analysis]
K --> L[Create structured outline with section titles as keys and bullet points or short descriptions as values]
L --> M[Store section titles and structured outline in JSON object]
M --> N{Content Generation Agent: ContentCreator}
N --> O[For each section in structured outline:]
O --> P[Retrieve relevant information from summarized research content]
P --> Q[#177 - Write Text Or Copy From Researched Text]
Q --> R[#169 - Create Dalle Image Rectangle]
R --> S[Store generated content for each section in plain text files]
S --> T[Store generated images with their respective section titles]
T --> U{PDF Generation Agent: PDFGenerator}
U --> V[#227 - Format Up To 4000 Characters Of Text Into Pretty HTML]
V --> W[Create title page and table of contents in HTML format]
W --> X[Concatenate formatted content, title page, and table of contents into single HTML file]
X --> Y[#203 - Convert HTML URL To PDF]
Y --> Z[Apply necessary styling to ensure visually appealing and professional-looking ebook]
Z --> AA[Save final PDF file]
AA --> AB[Ebook PDF Output]