How rishabjn10/marketmuse works
Project type and purpose
• This is a CLI‑based Python application (“market_muse”) built on the CrewAI framework.
• Its goal is to orchestrate autonomous AI agents (defined in YAML) that collaborate to generate a complete marketing strategy.
File structure
• Top level:
• .gitignore, RATIONALE.md, README.md, pyproject.toml (Poetry project + entrypoint)
• src/market_muse/ package:
• .env.example – environment‑variable template
• config/ – two YAML files (agents.yaml, tasks.yaml) driving agent definitions and task pipelines
• main.py – CLI entrypoint that loads env, configs, and kicks off Crew
• crew.py – orchestrator module that reads configs, instantiates agents, dispatches tasks
• (Optional) tools/ – custom tool classes used by agents to interact with AI services or external systems
README for additional insights
• Entrypoint command: poetry run market_muse
• Instructions to configure .env and YAML files to customize agents/tasks
• Emphasis on CrewAI framework as the engine for agent collaboration
a. Main components
1. User/CLI Layer
2. Environment Loader (.env) & Configuration Loader (agents.yaml + tasks.yaml)
3. Core Application Modules (main.py + crew.py)
4. Agent Instances (dynamically created by CrewAI)
5. Tool Classes (helpers for agents)
6. External AI Service (e.g., OpenAI API)
7. Output/Reporting Layer (console or files)
b. Relationships & interactions
• User invokes CLI →
• main.py:
• Loads .env → sets API keys, other vars
• Parses YAML configs → builds agent & task definitions
• crew.py:
• Creates CrewAI engine → reads definitions → spins up Agent objects
• Orchestrates task flow: each Agent calls Tool methods → Tool makes API calls → returns data
• Crew aggregates intermediate results, coordinates handoff between agents
• Final aggregated strategy → printed to console or written to file
c. Architectural patterns & design principles
• Orchestration pattern: centralized engine (crew.py) managing distributed agents
• Configuration‑driven extensibility: YAML files define agents/tasks without code changes
• Plugin‑style tools: new capabilities added by dropping new Tool classes in tools/
• Dependency injection: CrewAI framework injects configs & tools into agent instances
d. Key technologies & libraries
• Python 3.x, Poetry (pyproject.toml)
• CrewAI Framework (core orchestration library)
• YAML (agents.yaml, tasks.yaml) for declarative configuration
• External AI API (e.g., OpenAI via HTTP)