sequential - final structure
This commit is contained in:
parent
a479dad3ad
commit
6033ed7e5f
6 changed files with 138 additions and 86 deletions
|
|
@ -1,3 +1,4 @@
|
||||||
.env
|
.env
|
||||||
startup-org
|
startup-org
|
||||||
settings.json
|
settings.json
|
||||||
|
shared_files
|
||||||
|
|
@ -1 +1,78 @@
|
||||||
|
# AI Startup Organization Agency 🚀
|
||||||
|
|
||||||
|
An intelligent multi-agent system that provides comprehensive startup analysis and strategic guidance for a startup you'd want to build using Agency Swarm framework and OpenAI's GPT models
|
||||||
|
|
||||||
|
## Demo:
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
### 🤖 Agency Swarm Agents
|
||||||
|
|
||||||
|
- **CEO Agent**: Strategic leader and final decision maker
|
||||||
|
- Analyzes startup ideas using structured evaluation
|
||||||
|
- Makes strategic decisions across product, technical, marketing, and financial domains
|
||||||
|
- Uses AnalyzeStartupTool and MakeStrategicDecision tools
|
||||||
|
|
||||||
|
- **CTO Agent**: Technical architecture and feasibility expert
|
||||||
|
- Evaluates technical requirements and feasibility
|
||||||
|
- Provides architecture decisions
|
||||||
|
- Uses QueryTechnicalRequirements and EvaluateTechnicalFeasibility tools
|
||||||
|
|
||||||
|
- **Product Manager Agent**: Product strategy specialist
|
||||||
|
- Defines product strategy and roadmap
|
||||||
|
- Coordinates between technical and marketing teams
|
||||||
|
- Focuses on product-market fit
|
||||||
|
|
||||||
|
- **Developer Agent**: Technical implementation expert
|
||||||
|
- Provides detailed technical implementation guidance
|
||||||
|
- Suggests optimal tech stack and cloud solutions
|
||||||
|
- Estimates development costs and timelines
|
||||||
|
|
||||||
|
- **Marketing Manager Agent**: Marketing strategy leader
|
||||||
|
- Develops go-to-market strategies
|
||||||
|
- Plans customer acquisition approaches
|
||||||
|
- Coordinates with product team
|
||||||
|
|
||||||
|
### 🔄 Asynchronous Communication
|
||||||
|
|
||||||
|
The agency operates in async mode, enabling:
|
||||||
|
- Parallel processing of analyses from different agents
|
||||||
|
- Efficient multi-agent collaboration
|
||||||
|
- Real-time communication between agents
|
||||||
|
- Non-blocking operations for better performance
|
||||||
|
|
||||||
|
### 🔗 Agent Communication Flows
|
||||||
|
- CEO ↔️ All Agents (Strategic Oversight)
|
||||||
|
- CTO ↔️ Developer (Technical Implementation)
|
||||||
|
- Product Manager ↔️ Marketing Manager (Go-to-Market Strategy)
|
||||||
|
- Product Manager ↔️ Developer (Feature Implementation)
|
||||||
|
- (and more!)
|
||||||
|
## How to Run
|
||||||
|
|
||||||
|
Follow the steps below to set up and run the application:
|
||||||
|
Before anything else, Please get your OpenAI API Key here: https://platform.openai.com/api-keys
|
||||||
|
|
||||||
|
1. **Clone the Repository**:
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git
|
||||||
|
cd ai_agent_tutorials
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Install the dependencies**:
|
||||||
|
```bash
|
||||||
|
pip install -r requirements.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Run the Streamlit app**:
|
||||||
|
```bash
|
||||||
|
streamlit run ai_startup_org_agents/main.py
|
||||||
|
```
|
||||||
|
|
||||||
|
4. **Enter your OpenAI API Key** in the sidebar when prompted and start analyzing your startup idea!
|
||||||
|
|
||||||
|
## Project Structure
|
||||||
|
|
||||||
|
ai_startup_org_agents/
|
||||||
|
├── main.py # Main application file with agents and tools
|
||||||
|
├── requirements.txt # Project dependencies
|
||||||
|
└── README.md # Project documentation
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,13 @@ import streamlit as st
|
||||||
from instructor import OpenAISchema
|
from instructor import OpenAISchema
|
||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
# New Tools
|
# Custom Tools - Startup Analysis, Strategic Decision, Technical Requirements, Technical Feasibility
|
||||||
class StartupAnalysis(OpenAISchema):
|
class StartupAnalysis(OpenAISchema):
|
||||||
"""Schema for startup analysis results"""
|
"""Schema for startup analysis results"""
|
||||||
market_potential: Literal["high", "medium", "low"]
|
market_potential: Literal["high", "medium", "low"]
|
||||||
technical_complexity: Literal["high", "medium", "low"]
|
technical_complexity: Literal["high", "medium", "low"]
|
||||||
resource_requirements: Literal["high", "medium", "low"]
|
resource_requirements: Literal["high", "medium", "low"]
|
||||||
|
rationale: str = Field(description="Explanation for the analysis")
|
||||||
|
|
||||||
class AnalyzeStartupTool(BaseTool):
|
class AnalyzeStartupTool(BaseTool):
|
||||||
"""Tool to analyze startup ideas"""
|
"""Tool to analyze startup ideas"""
|
||||||
|
|
@ -18,25 +19,45 @@ class AnalyzeStartupTool(BaseTool):
|
||||||
target_market: str = Field(..., description="Target market description")
|
target_market: str = Field(..., description="Target market description")
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
# Tool implementation
|
"""Run startup analysis based on CEO's evaluation"""
|
||||||
analysis = StartupAnalysis(
|
prompt = f"""
|
||||||
market_potential="high",
|
Analyze this startup idea:
|
||||||
technical_complexity="medium",
|
Idea: {self.startup_idea}
|
||||||
resource_requirements="low"
|
Target Market: {self.target_market}
|
||||||
)
|
|
||||||
return analysis.dict()
|
Provide a comprehensive analysis including:
|
||||||
|
1. Market potential (high/medium/low)
|
||||||
|
2. Technical complexity (high/medium/low)
|
||||||
|
3. Resource requirements (high/medium/low)
|
||||||
|
4. A brief rationale for your decisions
|
||||||
|
|
||||||
|
Format your response as a StartupAnalysis object.
|
||||||
|
"""
|
||||||
|
response = self._llm.invoke(prompt)
|
||||||
|
analysis = StartupAnalysis.from_response(response)
|
||||||
|
|
||||||
|
# Store analysis in shared state for other tools to access
|
||||||
|
self._shared_state.set("startup_analysis", analysis)
|
||||||
|
return analysis
|
||||||
|
|
||||||
class MakeStrategicDecision(BaseTool):
|
class MakeStrategicDecision(BaseTool):
|
||||||
"""Tool for CEO to make and track strategic decisions"""
|
"""Tool for CEO to make and track strategic decisions"""
|
||||||
decision: str = Field(..., description="The strategic decision to be recorded and taken for this particular startup idea")
|
decision: str = Field(..., description="The strategic decision to be made for this startup idea")
|
||||||
decision_type: Literal["product", "technical", "marketing", "financial"] = Field(..., description="Type of decision")
|
decision_type: Literal["product", "technical", "marketing", "financial"] = Field(..., description="Type of decision")
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
analysis = self._shared_state.get("startup_analysis", None)
|
"""Execute and record strategic decision"""
|
||||||
if analysis is None:
|
analysis = self._shared_state.get("startup_analysis")
|
||||||
raise ValueError("Please analyze the startup idea first using QueryStartupIdea tool.")
|
if not analysis:
|
||||||
|
return "Please analyze the startup idea first using AnalyzeStartupTool"
|
||||||
|
|
||||||
return f"Decision recorded: {self.decision} (Type: {self.decision_type}) based on analysis"
|
decision_record = {
|
||||||
|
"decision": self.decision,
|
||||||
|
"type": self.decision_type,
|
||||||
|
"based_on_analysis": analysis
|
||||||
|
}
|
||||||
|
|
||||||
|
return f"Strategic decision recorded: {self.decision} (Type: {self.decision_type})"
|
||||||
|
|
||||||
class QueryTechnicalRequirements(BaseTool):
|
class QueryTechnicalRequirements(BaseTool):
|
||||||
"""Tool to analyze technical requirements"""
|
"""Tool to analyze technical requirements"""
|
||||||
|
|
@ -110,9 +131,28 @@ def main():
|
||||||
name="CEO",
|
name="CEO",
|
||||||
description="Strategic leader and final decision maker for the startup",
|
description="Strategic leader and final decision maker for the startup",
|
||||||
instructions="""
|
instructions="""
|
||||||
Analyze the given startup idea and take the authority of a CEO of the startup to make strategic decisions.
|
You are an experienced CEO with deep expertise in evaluating startup ideas.
|
||||||
Use the AnalyzeStartupTool to evaluate the startup idea, and use the MakeStrategicDecision tool to make strategic decisions.
|
Your role involves two main responsibilities:
|
||||||
Coordinate with team members using the built-in SendMessage tool.
|
|
||||||
|
1. ANALYZING STARTUP IDEAS:
|
||||||
|
When analyzing startup ideas, carefully consider:
|
||||||
|
- Market Potential (high/medium/low): market size, growth, competition, accessibility
|
||||||
|
- Technical Complexity (high/medium/low): tech stack, scalability, timeline
|
||||||
|
- Resource Requirements (high/medium/low): capital, team, marketing costs
|
||||||
|
|
||||||
|
2. MAKING STRATEGIC DECISIONS:
|
||||||
|
After analysis, you should make clear strategic decisions:
|
||||||
|
- Product decisions: features, roadmap, priorities
|
||||||
|
- Technical decisions: architecture, stack choices
|
||||||
|
- Marketing decisions: go-to-market strategy, channels
|
||||||
|
- Financial decisions: funding, resource allocation
|
||||||
|
|
||||||
|
Process:
|
||||||
|
1. First use AnalyzeStartupTool to evaluate the idea
|
||||||
|
2. Then use MakeStrategicDecision to record your strategic choices
|
||||||
|
3. Always base decisions on your previous analysis
|
||||||
|
|
||||||
|
Provide clear, actionable insights and decisions.
|
||||||
""",
|
""",
|
||||||
tools=[AnalyzeStartupTool, MakeStrategicDecision],
|
tools=[AnalyzeStartupTool, MakeStrategicDecision],
|
||||||
temperature=0.7,
|
temperature=0.7,
|
||||||
|
|
@ -157,7 +197,7 @@ def main():
|
||||||
api_headers=api_headers
|
api_headers=api_headers
|
||||||
)
|
)
|
||||||
|
|
||||||
# Initialize agency with communication paths
|
# Initializing the agency with communication paths
|
||||||
agency = Agency(
|
agency = Agency(
|
||||||
[
|
[
|
||||||
ceo, cto, product_manager, developer, marketing_manager,
|
ceo, cto, product_manager, developer, marketing_manager,
|
||||||
|
|
@ -169,7 +209,7 @@ def main():
|
||||||
[product_manager, developer],
|
[product_manager, developer],
|
||||||
[product_manager, marketing_manager]
|
[product_manager, marketing_manager]
|
||||||
],
|
],
|
||||||
async_mode='threading',
|
async_mode='threading', # Runs agent tasks in separate threads for concurrent execution
|
||||||
shared_files='shared_files'
|
shared_files='shared_files'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -280,3 +320,4 @@ def main():
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
python-dotenv==1.0.0
|
python-dotenv==1.0.0
|
||||||
agency-swarm
|
agency-swarm==0.4.1
|
||||||
streamlit
|
streamlit
|
||||||
|
|
@ -1,42 +0,0 @@
|
||||||
# AI Startup Agency Manifesto
|
|
||||||
|
|
||||||
## Our Mission
|
|
||||||
To provide comprehensive, data-driven analysis and strategic guidance for startup ideas through collaborative AI agents.
|
|
||||||
|
|
||||||
## Agent Responsibilities
|
|
||||||
|
|
||||||
### CEO Agent
|
|
||||||
- Lead strategic decision-making
|
|
||||||
- Coordinate between all team members
|
|
||||||
- Ensure alignment with business goals
|
|
||||||
- Make final decisions on critical matters
|
|
||||||
|
|
||||||
### CTO Agent
|
|
||||||
- Evaluate technical feasibility
|
|
||||||
- Guide technology stack decisions
|
|
||||||
- Assess technical risks
|
|
||||||
- Collaborate with Developer on implementation plans
|
|
||||||
|
|
||||||
### Product Manager Agent
|
|
||||||
- Define product strategy
|
|
||||||
- Create and maintain product roadmap
|
|
||||||
- Balance user needs with technical constraints
|
|
||||||
- Coordinate between technical and marketing teams
|
|
||||||
|
|
||||||
### Developer Agent
|
|
||||||
- Provide technical implementation insights
|
|
||||||
- Assess development complexity
|
|
||||||
- Suggest technical solutions
|
|
||||||
- Work closely with CTO on feasibility
|
|
||||||
|
|
||||||
### Marketing Manager Agent
|
|
||||||
- Develop marketing strategies
|
|
||||||
- Analyze target audience
|
|
||||||
- Plan go-to-market approach
|
|
||||||
- Work with Product Manager on market fit
|
|
||||||
|
|
||||||
## Communication Guidelines
|
|
||||||
- All agents should communicate clearly and concisely
|
|
||||||
- Use data to support recommendations
|
|
||||||
- Highlight risks and opportunities
|
|
||||||
- Maintain focus on startup success
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
# Startup Analysis Templates
|
|
||||||
|
|
||||||
## Market Analysis Template
|
|
||||||
- Market Size: [TAM, SAM, SOM]
|
|
||||||
- Target Customer Segments: [Primary, Secondary]
|
|
||||||
- Competition Analysis: [Direct, Indirect]
|
|
||||||
- Market Trends: [Current, Emerging]
|
|
||||||
|
|
||||||
## Technical Feasibility Template
|
|
||||||
- Technology Stack Requirements
|
|
||||||
- Development Timeline
|
|
||||||
- Resource Requirements
|
|
||||||
- Technical Risks and Mitigations
|
|
||||||
|
|
||||||
## Financial Analysis Template
|
|
||||||
- Initial Investment Required
|
|
||||||
- Revenue Streams
|
|
||||||
- Cost Structure
|
|
||||||
- Break-even Analysis
|
|
||||||
|
|
||||||
## Marketing Strategy Template
|
|
||||||
- Value Proposition
|
|
||||||
- Marketing Channels
|
|
||||||
- Customer Acquisition Strategy
|
|
||||||
- Growth Metrics
|
|
||||||
Loading…
Reference in a new issue