Google Gemini์ LangGraph๋ฅผ ํ์ฉํ ์์จ ๋ง์ผํ ์ ๋ต ์๋ฆฝ ๋ฐ ์ฝํ ์ธ ์์ฑ ์์คํ
- ํ๋ก์ ํธ๋ช : ์ฅ์ฌ์น๊ตฌ ๋ง์ผํ ์์ด์ ํธ
- ๊ฐ๋ฐ๊ธฐ๊ฐ : 2025.09.24 ~ 2025.10.24
- ํ์ ๊ตฌ์ฑ : ์ด 4๋ช
- ๐ ๋ฐ๋ชจ ์์ / ์คํ ๊ฒฐ๊ณผ (GIF): [Streamlit ์คํ ํ๋ฉด]
- ๐ ๋ฐํ์๋ฃ (pdf): [AI๋ฐ์ดํฐํ์ฉ๋ถ์ผ_์ฅ์ฌ์น๊ตฌํ_๋ฐํ์๋ฃ]
- ๐ค ํต์ฌ ๋ชจ๋ธ : Google Gemini 2.5 flash
- ๐ ๏ธ ์ฃผ์ ๊ธฐ์ : LangGraph, Streamlit, Tavily API
[์ด AI ์์ด์ ํธ๋ฅผ ๊ฐ๋ฐํ๊ฒ ๋ ๊ณ๊ธฐ๋ ํด๊ฒฐํ๊ณ ์ ํ๋ ๋ฌธ์ ๋ฅผ ์์ฑํฉ๋๋ค.] ์์๊ณต์ธ์ ๋ง์ผํ ์ ๋ต ์๋ฆฝ์ ์ด๋ ค์์ ๊ฒช์ต๋๋ค. ์ ํฌ๋... [AI๋ฅผ ํตํด ๋ฌ์ฑํ๊ณ ์ ํ๋ ๊ตฌ์ฒด์ ์ธ ๋ชฉํ๋ฅผ ๊ธฐ์ ํฉ๋๋ค.]
- ์์ฅ ๋ถ์ ์๋ํ, 2. ์ํฉ๋ณ ๋ง์ถค ์ ์ ์ฆ๊ฐ ์ ์, 3. ์ฑ๋๋ณ ์ฝํ ์ธ ์ด์ ์์ฑ
๋ณธ ์์คํ ์ 3๊ฐ์ง ์์ ์ ํ์ ์ง์ํ๋ฉฐ, Top-Level Supervisor ์์ด์ ํธ๊ฐ ์ฌ์ฉ์์ ์์ฒญ์ ๋ถ์ํ์ฌ ์ต์ ์ ์ํฌํ๋ก์ฐ๋ก ์์ ์ ๋ผ์ฐํ ํฉ๋๋ค.
- Top-Level Supervisor: [์ฌ์ฉ์์ '์์ ์ ํ'์ ๋ฐ๋ผ ์ ์ ํ ํ์ผ๋ก ๋ผ์ฐํ ํ๋ ๋ฉ์ธ ์ปจํธ๋กค๋ฌ]
์ฌ์ฉ์ ์
๋ ฅ
โ
โโ ๊ฐ๋งน์ ์ ํ
โโ ์์
์ ํ ์ ํ (์ข
ํฉ/์ํฉ/์ฝํ
์ธ )
โโ ์ถ๊ฐ ์ ๋ณด (์ํฉ/์ฑ๋)
โ
โผ
Top-Level Supervisor (๋ผ์ฐํ
)
โ
โโ [์ข
ํฉ] โ Analysis Team โ Strategy Team โ ๋ณด๊ณ ์
โโ [์ํฉ] โ Analysis Team โ Situation Agent โ Strategy Team โ ์ ์
โโ [์ฝํ
์ธ ] โ Analysis Team โ Strategy Team โ Content Agent โ ๊ฐ์ด๋
- Analysis Team: [์ข ํฉ ์ ๋ต ์๋ฆฝ : ์์ฅ๊ณผ ํ๊ฒฝ์ ๋ถ์]
- STP ๋ถ์ (PCA ๋ถ์ + KNN ๊ตฐ์ง)
- Segmentation: ์์ฅ ๊ตฐ์ง(Cluster)๋ณ ํน์ง ์ ์ + ๊ฐ์ค์น ๊ธฐ๋ฐ ์ถ ํด์
- Targeting: ํ๊ฒ ๊ตฐ์ง(Cluster) ์ ์ ๋ฐ ๊ฐ๋งน์ ์ ํ์ฌ ํฌ์ง์ {PC1, PC2} ์ขํ
- Positioning: ๋งคํธ๋ฆญ์ค ์ ๋น ํฌ์ง์ (White Space)์ขํ ๋ฐ ์ธ๊ทผ ๊ฒฝ์์ฌ ๊ตฐ์ง ์ ๋ณด => ์ต์ข ํ๊ฒ ํฌ์ง์ ์ ์
graph LR
A[Supervisor] --> B[๐ Analysis Team]
%% Analysis Team ๋ด๋ถ STP ํ๋ก์ฐ
subgraph STP ๋ถ์ ํ๋ก์ธ์ค
direction LR
S[Segmentation<br/>PCA + KNN ๊ตฐ์ง] --> T[Targeting<br/>ํ๊ฒ ์ ์ ๋ฐ ํ ํฌ์ง์
ํ์
]
T --> P[Positioning<br/>White Space ํ์ง ๋ฐ ๊ฒฝ์์ฌ ๋ถ์]
P --> F[โ
์ต์ข
ํ๊ฒ ํฌ์ง์
์ ์ : ๐ STP ์ง๋จ ๋ฆฌํฌํธ]
end
%% ๋ถ์ํ์์ STP ํ๋ก์ธ์ค ์ง์
B --> S
%% ๋ฆฌํฌํธ๊ฐ Strategy Team์ผ๋ก ์ ๋ฌ
F --> G[ Strategy Team]
%% ์คํ์ผ ์ ์
classDef main fill:#1f2937,stroke:#9ca3af,stroke-width:1px,color:#f9fafb;
classDef team fill:#0f766e,stroke:#e5e7eb,stroke-width:1px,color:#ecfeff;
classDef step fill:#0369a1,stroke:#e5e7eb,stroke-width:0.8px,color:#f9fafb;
classDef output fill:#15803d,stroke:#e5e7eb,stroke-width:0.8px,color:#f9fafb;
class A,G main;
class B team;
class S,T,P step;
class F output;
- Strategy Team: [๋ถ์๋ ๋ฐ์ดํฐ๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ์ค์ 4P ์ ๋ต ๋ฐ ์ ์ ์นด๋ ์์ฑ]
graph LR
A[Supervisor] --> B[Analysis Team]
B --> C[Strategy Team]
%% Strategy Team ๋ด๋ถ ์ ๋ต ์ค๊ณ ํ๋ก์ฐ
subgraph Strategy_Flow
direction LR
SA[๐งญ Strategy Agent<br/>STP ๊ธฐ๋ฐ ์ ๋ต ์ค๊ณ] --> V[๐น Targeting ๊ฒ์ฆ<br/>ํต์ฌ ๋์ฆยท๊ณ ๊ฐ ๊ตฌ์กฐ ์ ๊ฒ]
V --> POS[โ๏ธ Positioning ์ ์<br/>๋น ํฌ์ง์
: PC1ยทPC2 ๋ถ์ยท์ปจ์
ํ์ ]
POS --> STP4P[๐๏ธ STP ๋ฆฌํฌํธ โ 4P ์ ๋ตํ]
STP4P --> P1[Product<br/>ํฌ์ง์
๋ง์ถค ์๊ทธ๋์ฒ ๋ฉ๋ด ์ ์<br/>์น๊ฒ์ ๊ธฐ๋ฐ]
STP4P --> P2[Price<br/>ํฌ์ง์
์์ค์ ๋ง๋ ๊ฐ๊ฒฉ ์ฑ
์ ]
STP4P --> P3[Place<br/>DLV_SAA_RAT ๊ธฐ๋ฐ ์ ํตยท๋ฐฐ๋ฌ ์ ๋ต]
STP4P --> P4[Promotion<br/>์ฌ๋ฐฉ๋ฌธ์จยท์ฐ๋ น๋ ๊ธฐ์ค ์ฝํ
์ธ ๊ฐ์ด๋]
end
%% Strategy Team ์ง์
C --> SA
%% 4P ์ ๋ต์ด ์ต์ข
๋ฆฌํฌํธ๋ก ์๋ ด
P1 --> D[๐ Final Report]
P2 --> D
P3 --> D
P4 --> D
%% ์คํ์ผ ์ ์ (์ต์
)
classDef main fill:#1f2937,stroke:#9ca3af,stroke-width:1px,color:#f9fafb;
classDef team fill:#0f766e,stroke:#e5e7eb,stroke-width:1px,color:#ecfeff;
classDef agent fill:#312e81,stroke:#e5e7eb,stroke-width:0.8px,color:#e0e7ff;
classDef step fill:#0369a1,stroke:#e5e7eb,stroke-width:0.8px,color:#f9fafb;
classDef fourp fill:#92400e,stroke:#e5e7eb,stroke-width:0.8px,color:#fffbeb;
classDef output fill:#15803d,stroke-width:0.8px,stroke:#e5e7eb,color:#f9fafb;
class A,B,C main;
class SA agent;
class V,POS,STP4P step;
class P1,P2,P3,P4 fourp;
class D output;
- Situation Agent: [์ํฉ ์ ์ ์ ์ : Tavily, Weather API ๋ฑ Tool์ ์ฌ์ฉํ์ฌ ์ด๋ฒคํธ/๋ ์จ ๋ฑ ํน์ ์ํฉ์ ์ง์คํ์ฌ ๊ธฐํ ์์๋ฅผ ๋์ถ]
graph LR
A[Supervisor] --> B[Analysis Team]
B --> C[Strategy Team]
C --> SA[๐งญ Strategy Agent<br/>STP ๊ธฐ๋ฐ 4P ์ ๋ต ์ค๊ณ]
SA --> STP4P[๐๏ธ 4P ์ ๋ต ์นด๋<br/>ProductยทPriceยทPlaceยทPromotion]
%% ์ฌ์ฉ์ ์์ฒญ: ์ํฉ ์ ์ ์ ์
STP4P --> SIT[๐ฆ๏ธ Situation Agent<br/>์ํฉ ์ ์ ์ ์ ์์ฒญ ์ ์๋<br/>TavilyยทWeather API ๋ฑ Tool ์ฌ์ฉ]
SIT --> SP[๐ Situation Playbook<br/>์ด๋ฒคํธยท๋ ์จ ๊ธฐ๋ฐ ์ ์ ์นด๋]
%% ์คํ์ผ ์ ์
classDef agent fill:#312e81,stroke:#e5e7eb,stroke-width:0.8px,color:#e0e7ff;
classDef main fill:#1f2937,stroke:#9ca3af,stroke-width:1px,color:#f9fafb;
classDef node fill:#0369a1,stroke:#e5e7eb,stroke-width:0.8px,color:#f9fafb;
classDef output fill:#15803d,stroke-width:0.8px,stroke:#e5e7eb,color:#f9fafb;
class A,B,C main;
class SA,SIT agent;
class STP4P node;
class SP output;
- Content Agent: [์ฝํ ์ธ ์์ฑ ๊ฐ์ด๋ : ํ์ ๋ ์ ๋ต์ ๋ฐํ์ผ๋ก SNS ์ฑ๋๋ณ ์ฝํ ์ธ ๊ฐ์ด๋ ๋ฐ ์นดํผ ์์ฑ]
graph LR
A[Supervisor] --> B[Analysis Team]
B --> C[Strategy Team]
C --> SA[๐งญ Strategy Agent<br/>STP ๊ธฐ๋ฐ 4P ์ ๋ต ์ค๊ณ]
SA --> STP4P[๐๏ธ 4P ์ ๋ต ์นด๋<br/>ProductยทPriceยทPlaceยทPromotion]
%% ์ฌ์ฉ์ ์์ฒญ: ์ฝํ
์ธ ์์ฑ ๊ฐ์ด๋
STP4P --> CON[๐ฃ Content Agent<br/>์ฝํ
์ธ ์์ฑ ๊ฐ์ด๋ ์์ฒญ ์ ์๋<br/>SNS ์ฑ๋๋ณ ์ ๋ต ๋ฐ์]
CON --> CG[๐ Content Guide<br/>์ฑ๋๋ณ ์ฝํ
์ธ ยท์นดํผ ๊ฐ์ด๋]
%% ์คํ์ผ ์ ์
classDef agent fill:#312e81,stroke:#e5e7eb,stroke-width:0.8px,color:#e0e7ff;
classDef main fill:#1f2937,stroke:#9ca3af,stroke-width:1px,color:#f9fafb;
classDef node fill:#0369a1,stroke:#e5e7eb,stroke-width:0.8px,color:#f9fafb;
classDef output fill:#15803d,stroke-width:0.8px,stroke:#e5e7eb,color:#f9fafb;
class A,B,C main;
class SA,CON agent;
class STP4P node;
class CG output;
- ๊ฐ๋งน์ ์ ์์ฅ ํ๊ฒฝ์ ๋ถ์ํ์ฌ ์ค์ฅ๊ธฐ์ ์ธ ์ข ํฉ ๋ง์ผํ ์ ๋ต์ ์๋ฆฝํฉ๋๋ค.
- Input: [ : ๊ฐ๋งน์ ID, ์ ์ข ]
- Process: [ : Analysis Team๊ณผ Strategy Team์ด ํ๋ ฅํ์ฌ STP ๋ถ์ ๋ฐ 4P ์ ๋ต ๋์ถ]
- Output ( ์): [AI๊ฐ ์์ฑํ ์ค์ '์ข ํฉ ์ปจ์คํ ๋ณด๊ณ ์' ์๋ฅผ ๋งํฌ๋ค์ด์ด๋ ์ด๋ฏธ์ง๋ก ์ฒจ๋ถ]
[AI ์์ฑ ๋ณด๊ณ ์ ์]
1. ์์ฅ ๋ถ์ (Market Analysis)
- ์ฃผ์ ํ๊ฒ ๊ณ ๊ฐ: 20๋ ์ฌ์ฑ, ์ง์ฅ์ธ
- ...
2. 4P ์ ๋ต (Strategy)
- Product: ...
- Price: ...
- Input: [ : ๊ฐ๋งน์ ID, ๊ธฐ๊ฐ, ํน์ ์ํฉ( : ๋น ์ค๋ ๋ )]
- Process: [ : Situation Agent๊ฐ ๋ ์จ/์ด๋ฒคํธ ์ ๋ณด๋ฅผ ๋ถ์ํ์ฌ ์ฆ๊ฐ์ ์ธ ์ ์ ์ ์]
- Output ( ์): [AI๊ฐ ์์ฑํ '์ ์ ์นด๋' ์]
[AI ์์ฑ ์ ์ ์นด๋ ์]
- ์ํฉ: ์ฃผ๋ง ๋น ๋ณด (11/08 ~ 11/09)
- ์ ์: "๋น ์ค๋ ๋ ์ ๋ฐ๋ปํจ" ํ๋ก๋ชจ์
- ์ก์ : 1+1 ์๋ฃ ์ฟ ํฐ ๋ฐ์ก, ๋งค์ฅ ๋ด ์ฌ์ฆ ์์ ํ๋ ์ด
- ์ฑ๋: ์ธ์คํ๊ทธ๋จ ์คํ ๋ฆฌ, ๋น๊ทผ๋ง์ผ
- Input: [ : ๊ฐ๋งน์ ID, ํ๊ฒ ์ฑ๋( : ์ธ์คํ๊ทธ๋จ)]
- Process: [ : Content Agent๊ฐ ์ ๋ต์ ๋ฐํ์ผ๋ก ์ฑ๋ ๋ง์ถคํ ๊ฐ์ด๋๋ผ์ธ ์์ฑ]
- Output ( ์): [AI๊ฐ ์์ฑํ '์ฝํ ์ธ ๊ฐ์ด๋' ์]
[AI ์์ฑ ์ฝํ ์ธ ๊ฐ์ด๋ (์ธ์คํ๊ทธ๋จ)]
- ์นดํผ ์: "๋น๊ฐ ๋ด๋ ค๋ ๋ญ๋ง์ ํฌ๊ธฐ ๋ชปํด! โ ํ ์ผ๋ฌ ์นดํ์์ ๋ฐ๋ปํ ๋ผ๋ผ ํ ์ ์ด๋์?"
- ์ถ์ฒ ํด์ํ๊ทธ:
#ํ ์คํธ์นดํ #๋น์ค๋๋ #์นดํ์ถ์ฒ #๊ฐ์ฑ- ์ด๋ฏธ์ง ๊ฐ์ด๋: ๋ฐ๋ปํ ์กฐ๋ช ์๋ ๊น์ด ๋๋ ์ปคํผ์ ํด๋ก์ฆ์
- Repository ํด๋ก
git clone [๋ ํฌ์งํ ๋ฆฌ URL] cd [ํ๋ก์ ํธ ํด๋] - ํ์ํ ํจํค์ง ์ค์น
pip install -r requirements.txt
- .env ํ์ผ ์์ฑ (API ํค ์ค์ )
# .env ํ์ผ์ ์์ฑํ๊ณ ์๋ ๋ด์ฉ์ ์ฑ์์ฃผ์ธ์ GOOGLE_API_KEY="์ฌ๋ฌ๋ถ์ Gemini API ํค" TAVILY_API_KEY="์ฌ๋ฌ๋ถ์ Tavily API ํค"
from marketing_multiagent_system_final import run_marketing_strategy_system
# 1. ์ข
ํฉ ์ ๋ต ์๋ฆฝ
result_1 = run_marketing_strategy_system(
target_store_id="TEST001",
target_store_name="ํ
์คํธ ์นดํ",
task_type="์ข
ํฉ_์ ๋ต_์๋ฆฝ"
)
print(result_1)
# 2. ์ํฉ ์ ์ ์ ์
result_2 = run_marketing_strategy_system(
# ... (์ดํ ์๋ต)
)
print(result_2)- Streamlit ์คํ
streamlit run '์ฅ์ฌ์น๊ตฌ ์๋น์ค ์๊ฐ.py' - ๋ธ๋ผ์ฐ์ ์์
http://localhost:8501๋ก ์ ์ํฉ๋๋ค.
</br>
/project/agent_all
โ
โโโ ์ฅ์ฌ์น๊ตฌ ์๋น์ค ์๊ฐ.py # Streamlit UI (ํตํฉ)
โโโ pages/
โ โโโ 1_๐์ฌ์ฅ๋ ๋์๋ณด๋.py # ๋ฐ์ดํฐ ๋ถ์ ๋์๋ณด๋
โ โโโ 2_๐ชฝ๋ง์ผํ
AI Agent.py # ๋ง์ผํ
์ ๋ต ์๋ฆฝ ์์ด์ ํธ
โโโ agents/
โ โโโ marketing_multiagent_system_final.py # ๋ฉ์ธ ์์คํ
(ํตํฉ)
โ โโโ situation_agent.py # Situation Agent
โ โโโ content_agent.py # Content Agent
โโโ tools/
โ โโโ tavily_events.py # ์ด๋ฒคํธ ์์ง Tool
โ โโโ weather_signals.py # ๋ ์จ ๋ถ์ Tool
โโโ workflows/
โ โโโ integrated_workflow.py # Langgraph ์ํฌํ๋ก์ฐ
โโโ requirements.txt
โโโ README.md
[Gemini, LangGraph, Tavily API ๋ฑ ์์ด์ฝ]
[Streamlit ๋ฑ ์์ด์ฝ]
[Git, Notion ๋ฑ ์์ด์ฝ]
-
์ข ํฉ ์ ๋ต: 20-30์ด
- Analysis Team: 10-15์ด
- Strategy Team: 10-15์ด
-
์ํฉ ์ ์ : 25-35์ด
- Analysis Team: 10-15์ด
- Situation Agent: 3-5์ด (๋ณ๋ ฌ)
- Strategy Team: 10-15์ด
-
์ฝํ ์ธ ๊ฐ์ด๋: 30-40์ด
- Analysis Team: 10-15์ด
- Strategy Team: 10-15์ด
- Content Agent: 10-15์ด
- ์บ์ฑ: Streamlit
@st.cache_dataํ์ฉ - ๋ณ๋ ฌ ์ฒ๋ฆฌ: Situation Agent์ ThreadPoolExecutor
- ๋ฐ์ดํฐ ๊ฒฝ๋ํ: ํ์ ์ปฌ๋ผ๋ง ๋ก๋
| [AI Engineer/๊ธฐํ] | [AI Engineer] | [Data Analyst] | [๊ธฐํ/PM] |
|---|---|---|---|
| ๊น์ด์ | ๊น์์ | ์ด์๊ฒฝ | ์๋ก์ง |