55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/daily/reports/20250729/task_20250729100000.md:
--------------------------------------------------------------------------------
1 | # To-Do List for Daily Financial Market Report - 2025-07-29
2 |
3 | **Last Trading Day: 2025-07-28**
4 |
5 | ## Markdown Report Generation (report_20250729100000.md)
6 |
7 | - [ ] Search and fetch the latest performance of indexes like the Dow, S&P 500, Nasdaq of 2025-07-28 closing price.
8 | - [ ] Search and fetch the latest performance of commodities like oil and gold, and also crypto currencies of 2025-07-28 closing price.
9 | - [ ] Search and analyze the factors impacting the latest moves.
10 | - [ ] Search and analyze the performance of flagged stocks such as the Magnificent 7, banks, energy, manufactory and consumer-related stocks.
11 | - [ ] Search and fetch other top movers in both sectors and stocks within the US stock market.
12 | - [ ] Search and analyze upcoming events that may impact the market.
13 | - [ ] Search and analyze the short-term factors that impact the mood of market and do predictions.
14 |
15 | ## Single HTML File Generation (vis_20250729100000.html)
16 |
17 | - [ ] Follow the style instruction in @vis.md.
18 | - [ ] Implement bilingual language support of English and Simplified Chinese.
19 | - [ ] Implement a language toggle button on top right.
--------------------------------------------------------------------------------
/daily/reports/20250730/task_20250730100000.md:
--------------------------------------------------------------------------------
1 | # To-Do List for 2025-07-30
2 |
3 | - [x] **Market Data Collection (Last Trading Day: 2025-07-29)**
4 | - [x] Fetch closing prices for Dow, S&P 500, and Nasdaq.
5 | - [x] Fetch closing prices for oil and gold.
6 | - [x] Fetch closing prices for major cryptocurrencies (Bitcoin, Ethereum).
7 | - [x] **Market Analysis**
8 | - [x] Analyze factors impacting recent market moves.
9 | - [x] Analyze performance of the Magnificent 7, banks, energy, manufacturing, and consumer stocks.
10 | - [x] Identify and analyze top moving sectors and stocks in the US market.
11 | - [x] Research and analyze upcoming market-moving events.
12 | - [x] Analyze short-term market sentiment and provide predictions.
13 | - [x] **Report Generation**
14 | - [x] Draft the markdown report (`report_20250730100000.md`).
15 | - [x] **Webpage Generation**
16 | - [x] Generate the HTML report (`vis_20250730100000.html`) with bilingual support and a language toggle, following the style guide in `vis.md`.
17 | - [x] **Logging**
18 | - [x] Log all steps in `log_20250730100000.md`.
19 | - [x] **Review**
20 | - [x] Review all generated files for accuracy and completeness.
21 |
--------------------------------------------------------------------------------
/daily/reports/20250731/task_20250731100000.md:
--------------------------------------------------------------------------------
1 | # To-Do List for 2025-07-31
2 |
3 | ## Step 1: Plan and Gen To-Do List
4 | - [x] Create this to-do list.
5 |
6 | ## Step 2: Markdown Report Generation
7 | - [ ] Search and fetch the latest performance of indexes like the Dow, S&P 500, Nasdaq of 2025-07-30 closing price and daily chg in %.
8 | - [ ] Search and fetch the latest performance of commodities like oil and gold, and also crypto currencies of 2025-07-30 closing price and daily chg in %.
9 | - [ ] Search and analyze the factors impacting the latest moves.
10 | - [ ] Search and analyze the performance of flagged stocks such as the Magnificent 7, banks, enengy, manufactory and consumer-related stocks.
11 | - [ ] Seacrh and fetch other top movers in both sectors and stocks within the US stock market.
12 | - [ ] Search and analyze upcoming events that may impact the market.
13 | - [ ] Search and analyze the short-term factors that impact the mood of market and do predictions.
14 |
15 | ## Step 3: Single HTML File Generation
16 | - [ ] Generate a single html names `reports/20250731/vis_20250731100000.html` with bilingual support and a language toggle.
17 |
18 | ## Step 4: Execution and Logging
19 | - [ ] Log the whole process in file `reports/20250731/log_20250731100000.md`.
20 |
21 | ## Step 5: Review
22 | - [ ] Review the generated files to end the whole task.
23 |
--------------------------------------------------------------------------------
/gui/src/services/PlannerService.js:
--------------------------------------------------------------------------------
1 | import LLMAbstractionLayer from './LLMAbstractionLayer'
2 | import { TASK_TYPES } from '../types'
3 |
4 | class PlannerService {
5 | async createResearchPlan(topic) {
6 | if (!topic.trim()) {
7 | throw new Error('Topic is required')
8 | }
9 |
10 | try {
11 | const plan = await LLMAbstractionLayer.generateResearchPlan(topic)
12 | return this.validatePlan(plan)
13 | } catch (error) {
14 | console.error('Error creating research plan:', error)
15 | throw new Error('Failed to create research plan')
16 | }
17 | }
18 |
19 | validatePlan(plan) {
20 | if (!plan.tasks || plan.tasks.length === 0) {
21 | throw new Error('Plan must contain at least one task')
22 | }
23 |
24 | // Validate each task
25 | plan.tasks.forEach(task => {
26 | if (!task.type || !Object.values(TASK_TYPES).includes(task.type)) {
27 | throw new Error(`Invalid task type: ${task.type}`)
28 | }
29 | if (!task.title || !task.description) {
30 | throw new Error('Task must have title and description')
31 | }
32 | })
33 |
34 | return plan
35 | }
36 |
37 | async updatePlan(planId, updates) {
38 | // In real implementation, would update plan in database
39 | return { ...updates, id: planId, updatedAt: new Date().toISOString() }
40 | }
41 | }
42 |
43 | export default new PlannerService()
--------------------------------------------------------------------------------
/ui/src/services/PlannerService.js:
--------------------------------------------------------------------------------
1 | import LLMAbstractionLayer from './LLMAbstractionLayer'
2 | import { TASK_TYPES } from '../types'
3 |
4 | class PlannerService {
5 | async createResearchPlan(topic) {
6 | if (!topic.trim()) {
7 | throw new Error('Topic is required')
8 | }
9 |
10 | try {
11 | const plan = await LLMAbstractionLayer.generateResearchPlan(topic)
12 | return this.validatePlan(plan)
13 | } catch (error) {
14 | console.error('Error creating research plan:', error)
15 | throw new Error('Failed to create research plan')
16 | }
17 | }
18 |
19 | validatePlan(plan) {
20 | if (!plan.tasks || plan.tasks.length === 0) {
21 | throw new Error('Plan must contain at least one task')
22 | }
23 |
24 | // Validate each task
25 | plan.tasks.forEach(task => {
26 | if (!task.type || !Object.values(TASK_TYPES).includes(task.type)) {
27 | throw new Error(`Invalid task type: ${task.type}`)
28 | }
29 | if (!task.title || !task.description) {
30 | throw new Error('Task must have title and description')
31 | }
32 | })
33 |
34 | return plan
35 | }
36 |
37 | async updatePlan(planId, updates) {
38 | // In real implementation, would update plan in database
39 | return { ...updates, id: planId, updatedAt: new Date().toISOString() }
40 | }
41 | }
42 |
43 | export default new PlannerService()
--------------------------------------------------------------------------------
/gui/public/vite.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/ui/public/vite.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/example/earnings_call/planning_ford_earnings_call_20250731.md:
--------------------------------------------------------------------------------
1 | # Planning: Ford Motor Q2 2025 Earnings Call Research
2 |
3 | ## Objective
4 | To conduct a deep research on Ford Motor Company's Q2 2025 earnings call, synthesizing key financial highlights, segment performance, and future outlook into a comprehensive report.
5 |
6 | ## Data Sources
7 | - Web search results for "Ford Motor latest earnings call" (already performed).
8 | - Official Ford Motor Company investor relations website (if more detailed information is needed).
9 |
10 | ## Report Structure (based on instruct.md)
11 | 1. **Executive Summary:**
12 | * Brief overview of Q2 2025 performance.
13 | * Key financial metrics (EPS, Revenue).
14 | * Overall sentiment.
15 | 2. **Financial Highlights:**
16 | * Detailed EPS and Revenue figures vs. estimates.
17 | * Dividend declaration.
18 | 3. **Segment Performance:**
19 | * Ford Pro EBIT.
20 | * Ford Blue EBIT.
21 | * Ford Model e EBIT.
22 | * Ford Credit earnings.
23 | 4. **Key Takeaways & Future Outlook:**
24 | * Reinstated full-year 2025 guidance.
25 | * Impact of tariff-related costs.
26 | * Any other significant announcements or forward-looking statements.
27 | 5. **Conclusion:**
28 | * Summary of findings and overall assessment.
29 |
30 | ## Next Steps
31 | 1. Create log file with raw search results.
32 | 2. Draft the research report based on the above structure and gathered information.
33 | 3. Review and refine the report for clarity, accuracy, and completeness.
--------------------------------------------------------------------------------
/example/earnings_call/task_ebay_earnings_call_20250731_100000.md:
--------------------------------------------------------------------------------
1 | # Task for eBay Q2 2025 Earnings Call Research
2 |
3 | ## Objective
4 |
5 | To conduct a deep research on eBay's Q2 2025 earnings call, summarizing key financial highlights, growth drivers, forward-looking guidance, and stock performance.
6 |
7 | ## Tasks Performed
8 |
9 | 1. **Searched for Earnings Call Transcript:** Used Google Web Search with queries like "ebay latest earnings call transcript" and "eBay Q2 2025 earnings call transcript Investing.com" to find relevant information.
10 | 2. **Extracted Key Financial Metrics:** Identified and recorded revenue, non-GAAP operating income, non-GAAP EPS, net income, shareholder returns, and GMV from the search results.
11 | 3. **Identified Growth Drivers:** Noted AI-driven initiatives and strategic partnerships as key contributors to growth, along with strong performance in collectibles and luxury items.
12 | 4. **Extracted Forward-Looking Guidance:** Recorded the projected revenue for Q3 2025.
13 | 5. **Noted Stock Performance:** Observed the 1.2% stock decline post-earnings.
14 | 6. **Generated Report:** Created `report_ebay_earnings_call_20250731.md` summarizing all findings.
15 | 7. **Generated Planning Document:** Created `planning_ebay_earnings_call_20250731.md` outlining the research plan.
16 | 8. **Generated Task Document:** Created this document (`task_ebay_earnings_call_20250731_100000.md`).
17 | 9. **Generated Log Document:** Created `log_ebay_earnings_call_20250731_100000.md` detailing all tool calls.
18 | 10. **Generated Visualization:** Created `vis_ebay_earnings_call_20250731.html` with a basic table of financial metrics.
19 |
--------------------------------------------------------------------------------
/gui/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ui",
3 | "private": true,
4 | "version": "0.0.0",
5 | "type": "module",
6 | "scripts": {
7 | "dev": "vite",
8 | "build": "vite build",
9 | "lint": "eslint .",
10 | "preview": "vite preview"
11 | },
12 | "dependencies": {
13 | "@google/genai": "^1.12.0",
14 | "@google/generative-ai": "^0.24.1",
15 | "@mdx-js/react": "^3.1.0",
16 | "@mdx-js/rollup": "^3.1.0",
17 | "@tiptap/extension-code-block-lowlight": "^3.2.0",
18 | "@tiptap/extension-color": "^3.2.0",
19 | "@tiptap/extension-highlight": "^3.2.0",
20 | "@tiptap/extension-image": "^3.2.0",
21 | "@tiptap/extension-link": "^3.2.0",
22 | "@tiptap/extension-table": "^3.2.0",
23 | "@tiptap/extension-table-cell": "^3.2.0",
24 | "@tiptap/extension-table-header": "^3.2.0",
25 | "@tiptap/extension-table-row": "^3.2.0",
26 | "@tiptap/extension-text-style": "^3.2.0",
27 | "@tiptap/react": "^3.2.0",
28 | "@tiptap/starter-kit": "^3.2.0",
29 | "dotenv": "^17.2.1",
30 | "jszip": "^3.10.1",
31 | "lowlight": "^3.3.0",
32 | "react": "^19.1.0",
33 | "react-dom": "^19.1.0",
34 | "react-router-dom": "^7.8.1",
35 | "reactflow": "^11.11.4"
36 | },
37 | "devDependencies": {
38 | "@eslint/js": "^9.30.1",
39 | "@tailwindcss/postcss": "^4.1.11",
40 | "@types/react": "^19.1.9",
41 | "@types/react-dom": "^19.1.6",
42 | "@vitejs/plugin-react": "^4.6.0",
43 | "autoprefixer": "^10.4.21",
44 | "eslint": "^9.30.1",
45 | "eslint-plugin-react-hooks": "^5.2.0",
46 | "eslint-plugin-react-refresh": "^0.4.20",
47 | "globals": "^16.3.0",
48 | "postcss": "^8.5.6",
49 | "tailwindcss": "^4.1.11",
50 | "vite": "^7.0.4"
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/gui/src/services/CardSynthesizer.js:
--------------------------------------------------------------------------------
1 | import LLMAbstractionLayer from './LLMAbstractionLayer'
2 | import { CARD_TYPES } from '../types'
3 |
4 | class CardSynthesizer {
5 | async synthesize(rawData, taskType) {
6 | console.log(`Synthesizing card from ${taskType} data:`, rawData.title)
7 |
8 | // Determine appropriate card type based on data
9 | const cardType = this.determineCardType(rawData, taskType)
10 |
11 | // Use LLM to synthesize the raw data into a structured card
12 | const card = await LLMAbstractionLayer.synthesizeCard(rawData, cardType)
13 |
14 | return {
15 | ...card,
16 | originalTask: taskType,
17 | rawData: rawData,
18 | synthesizedAt: new Date().toISOString()
19 | }
20 | }
21 |
22 | determineCardType(rawData, taskType) {
23 | // Simple heuristics to determine card type
24 | // In real implementation, would use more sophisticated analysis
25 |
26 | if (rawData.data?.results?.length > 0) {
27 | return CARD_TYPES.TEXT_SUMMARY
28 | }
29 |
30 | if (rawData.data?.records?.length > 0) {
31 | return CARD_TYPES.TABLE
32 | }
33 |
34 | if (rawData.source === 'web_search') {
35 | return CARD_TYPES.TEXT_SUMMARY
36 | }
37 |
38 | return CARD_TYPES.TEXT_SUMMARY
39 | }
40 |
41 | async createCustomCard(type, content, metadata = {}) {
42 | return {
43 | id: Date.now(),
44 | type,
45 | title: content.title || 'Custom Card',
46 | content: content.body || content.text || '',
47 | metadata: {
48 | ...metadata,
49 | createdAt: new Date().toISOString(),
50 | source: 'manual'
51 | }
52 | }
53 | }
54 | }
55 |
56 | export default new CardSynthesizer()
--------------------------------------------------------------------------------
/ui/src/services/CardSynthesizer.js:
--------------------------------------------------------------------------------
1 | import LLMAbstractionLayer from './LLMAbstractionLayer'
2 | import { CARD_TYPES } from '../types'
3 |
4 | class CardSynthesizer {
5 | async synthesize(rawData, taskType) {
6 | console.log(`Synthesizing card from ${taskType} data:`, rawData.title)
7 |
8 | // Determine appropriate card type based on data
9 | const cardType = this.determineCardType(rawData, taskType)
10 |
11 | // Use LLM to synthesize the raw data into a structured card
12 | const card = await LLMAbstractionLayer.synthesizeCard(rawData, cardType)
13 |
14 | return {
15 | ...card,
16 | originalTask: taskType,
17 | rawData: rawData,
18 | synthesizedAt: new Date().toISOString()
19 | }
20 | }
21 |
22 | determineCardType(rawData, taskType) {
23 | // Simple heuristics to determine card type
24 | // In real implementation, would use more sophisticated analysis
25 |
26 | if (rawData.data?.results?.length > 0) {
27 | return CARD_TYPES.TEXT_SUMMARY
28 | }
29 |
30 | if (rawData.data?.records?.length > 0) {
31 | return CARD_TYPES.TABLE
32 | }
33 |
34 | if (rawData.source === 'web_search') {
35 | return CARD_TYPES.TEXT_SUMMARY
36 | }
37 |
38 | return CARD_TYPES.TEXT_SUMMARY
39 | }
40 |
41 | async createCustomCard(type, content, metadata = {}) {
42 | return {
43 | id: Date.now(),
44 | type,
45 | title: content.title || 'Custom Card',
46 | content: content.body || content.text || '',
47 | metadata: {
48 | ...metadata,
49 | createdAt: new Date().toISOString(),
50 | source: 'manual'
51 | }
52 | }
53 | }
54 | }
55 |
56 | export default new CardSynthesizer()
--------------------------------------------------------------------------------
/example/earnings_call/planning_ebay_earnings_call_20250731.md:
--------------------------------------------------------------------------------
1 | # Planning for eBay Q2 2025 Earnings Call Research
2 |
3 | ## Objective
4 |
5 | To conduct a deep research on eBay's Q2 2025 earnings call, summarizing key financial highlights, growth drivers, forward-looking guidance, and stock performance.
6 |
7 | ## Information Gathering
8 |
9 | 1. **Search for Earnings Call Transcript:** Utilize Google Web Search to find the official earnings call transcript and related news articles.
10 | 2. **Identify Key Financial Metrics:** Extract revenue, EPS, net income, operating income, GMV, and shareholder returns.
11 | 3. **Identify Growth Drivers:** Note down any mentioned strategic initiatives, AI-driven efforts, or specific categories contributing to growth.
12 | 4. **Extract Forward-Looking Guidance:** Record revenue projections for the next quarter.
13 | 5. **Note Stock Performance:** Observe immediate stock reaction post-earnings release.
14 |
15 | ## Output Generation
16 |
17 | 1. **Report (`report_ebay_earnings_call_20250731.md`):** Create a markdown report summarizing all gathered information, including an executive summary, financial highlights, growth drivers, guidance, and stock performance.
18 | 2. **Planning Document (`planning_ebay_earnings_call_20250731.md`):** This document, outlining the research plan.
19 | 3. **Task Document (`task_ebay_earnings_call_20250731_HHMMSS.md`):** A markdown file detailing the specific tasks performed during the research.
20 | 4. **Log Document (`log_ebay_earnings_call_20250731_HHMMSS.md`):** A markdown file logging all steps and tool calls made during the research process.
21 | 5. **Visualization (`vis_ebay_earnings_call_20250731.html`):** A simple HTML file to visualize key data points if applicable (e.g., a basic table of financial metrics).
--------------------------------------------------------------------------------
/example/earnings_call/report_ebay_earnings_call_20250731.md:
--------------------------------------------------------------------------------
1 | # eBay Q2 2025 Earnings Call Report
2 |
3 | **Date:** July 31, 2025
4 |
5 | ## Executive Summary
6 |
7 | eBay reported strong financial results for Q2 2025, exceeding analyst expectations for both revenue and earnings per share (EPS). The company highlighted growth driven by AI-driven initiatives and strategic partnerships, with particular strength in focus categories such as collectibles and luxury items. Despite the positive financial performance, the stock experienced a slight decline post-earnings.
8 |
9 | ## Financial Highlights
10 |
11 | * **Revenue:** Grew by over 4% to $2.73 billion, surpassing the anticipated $2.64 billion.
12 | * **Non-GAAP Operating Income:** Increased by 8% to $775 million.
13 | * **Non-GAAP EPS:** Grew 16% year-over-year to $1.37, exceeding analysts' expectations of $1.30 per share.
14 | * **Net Income:** $368 million, or $0.79 per share, compared to $224 million, or $0.45 per share, in the same period last year.
15 | * **Shareholder Returns:** The company returned $760 million to shareholders through repurchases and dividends.
16 | * **Gross Merchandise Volume (GMV):** Increased by 4%.
17 |
18 | ## Key Growth Drivers and Strategic Initiatives
19 |
20 | eBay's growth in Q2 2025 was attributed to:
21 |
22 | * **AI-driven initiatives:** Expansion in AI-driven initiatives contributed to overall growth.
23 | * **Strategic partnerships:** New partnerships played a role in the company's performance.
24 | * **Focus Categories:** Strong performance was observed in key focus categories, particularly collectibles and luxury items.
25 |
26 | ## Forward-Looking Guidance
27 |
28 | For Q3 2025, eBay projects revenue to be between $2.69 billion and $2.74 billion.
29 |
30 | ## Stock Performance
31 |
32 | Despite the robust financial results, eBay's stock fell 1.2% post-earnings.
--------------------------------------------------------------------------------
/legacy/tarrif.md:
--------------------------------------------------------------------------------
1 | (1) Establish the context of the US-EU 15% tariff agreement by identifying the key goods and services traded between the two economic blocs and the main sectors involved in this trade relationship.
2 | (2) Analyze the sector-specific impacts within the United States. For key industries like automotive, aerospace, technology, agriculture, and pharmaceuticals, investigate how a 15% tariff would affect production costs, consumer prices, corporate profitability, and employment.
3 | (3) Conduct a parallel sector-specific analysis for the European Union, focusing on major export industries such as German automotive manufacturing, French luxury goods and aerospace, Italian machinery, and Irish pharmaceuticals.
4 | (4) Evaluate the differential economic impact on individual EU member states, particularly those with high trade exposure to the US, including Germany, France, Ireland, Italy, and the Netherlands. Detail which national industries are most vulnerable.
5 | (5) Research macroeconomic modeling studies from economic think tanks and international organizations to quantify the potential effects on GDP growth, inflation rates, and overall trade volumes for both the US and the EU.
6 | (6) Investigate the potential long-term strategic shifts in global trade and supply chains. Explore whether companies might relocate manufacturing and how the US and EU might pivot to new trade partners in regions like Asia-Pacific or South America.
7 | (7) Analyze the geopolitical consequences of such a tariff agreement, including its potential effects on the transatlantic political alliance, cooperation on international security, and the global standing of the WTO.
8 | (8) Synthesize all findings to construct a comprehensive overview of the agreement's impact. Critique the policy by identifying the likely economic winners and losers, and speculate on the net long-term effect on the global economic and political order.
9 |
--------------------------------------------------------------------------------
/instruct.md:
--------------------------------------------------------------------------------
1 | You are a professional,efficient and creative analyst, now try to craft a deep research on the topic of user's prompt: [prompt]
2 |
3 | # Step 1: Planning
4 | Please go through the [prompt] and create a plan with highly detailed to-do list, write it to a markdown file planning_[keyword]_[yyyymmdd].md, in which [keyword] stands for a keyword you extract from the [prompt], and [yyyymmdd] for the current date;
5 |
6 | # Step 2: Iteration of the planning
7 | 1. Read the planning markdown file(planning_[keyword]_[yyyymmdd].md you create in step 1), create task_[keyword]_[yyyymmdd]_[hhmmss].md file of to-do list tasks for agents to follow, [hhmmss] for current time;
8 | 2. Follow the to-do tasks of task_[keyword]_[yyyymmdd]_[hhmmss].md, do the research following the plan step by step;
9 | 3. For each iteration, do recursion and update the to-do tasks(task_[keyword]_[yyyymmdd]_[hhmmss].md) with appending if possible; Ticker one task if finished;
10 | 4. Make sure you search and utilize the most recent information as possible(news, events, data, etc...);
11 | 5. For each search, save the url links as source for both report composing and logging;
12 |
13 | # Step 3: Report Composing
14 | Compose the report in markdown format with the filename:report_[keyword]_[yyyymmdd].md;
15 | Use tables with data as possible as you can;
16 | Please include sources both in content and appendix;
17 |
18 | # Step 4: Report Vis
19 | upon the report, craft a in-depth bilingual(English and Simplified Chinese, for all content including texts) webpage like newspaper frontpage with style instructions in @vis.md with output filename vis_[keyword]_[yyyymmdd].html , and please check carefully to avoid the unstoppable extending height of chart axis;
20 |
21 | # Logging:
22 | log details of each step, including what you thought, what you did, what source you searched, and other actions, write them into a log file in markdown format with the filename:log_[keyword]_[yyyymmdd]_[hhmmss].md
23 |
24 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 8月19日更新:全新优化的GUI
2 | - 目录:gui/
3 | ## [说明]()
4 | ## [架构]()
5 |
6 | ## 主要介绍
7 | - 加入Cloudeflare后台
8 | - 加入Dashboard
9 | - 集成tiptap编辑器(简版)
10 |
11 |
12 |
13 | # 历史更新
14 |
15 | ## 8月5日大更新:加入UI界面
16 | ### 加入子项目UI:可视化研究界面
17 | ### 使用方法
18 | - cd ui
19 | - npm install
20 | - cp .env.example .env
21 | - 编辑.env,设置自己的Gemini APIKEY(可在Google AI Studio中申请)
22 | - 设置模型,默认使用'gemini-2.5-flash',在当前场景下,2.5-pro模型不能正常使用,可选项是2.5-flash和2.5-flash-lite
23 | - npm run dev
24 | - 访问 localhost:5173
25 |
26 | ### 终端下的一键式研究(目前,它还是质量更好的方式,可使用2.5-pro,在任务迭代上质量略高,同时目前工作流支持一键生成可视化报告)
27 | ##### 安装Gemini CLI :Mac or Linux (Windows需要使用WSL子系统)
28 | - 1. 安装Node:https://nodejs.org/en/download 安装Node.js, 需要20及以上版本
29 | - 2. 在命令行下安装
30 | ```shell
31 | npx https://github.com/google-gemini/gemini-cli
32 | ```
33 | 或者
34 | ```shell
35 | npm install -g @google/gemini-cli
36 | ```
37 | - 3. 运行 Gemini CLI
38 | ```shell
39 | gemini
40 | ```
41 |
42 | - 4. 进行深度研究,在Gemini CLI客户端里输入:
43 | > do a deep reserch under the instruction prompted at @instruct.md: 【提示词,中英文均可】
44 |
45 | 例如
46 |
47 | > do a deep reserch under the instruction prompted at @instruct.md: impacts of us-euro's 15% tariff agreement: for each country, each sector, and long-term impacts and shifts
48 |
49 | ## examples/
50 | 将日常研究结果加入,作为分享。
51 |
52 | ## 2025-7-31日更新:
53 | 加入instruct_v2.md,修改了机制,可以生成更长的报告内容,但是稳定性会差一些。
54 |
55 | ## 2025-7-29更新:
56 | 加入日报生成功能: daily/
57 | 提示词:follow the instruct of @report.md to finish the report and webpage gen task
58 |
59 |
60 |
61 | # 未解决的bug:
62 | 在Gemini Cli中,如果使用flash模型,需要输入提示词两次:第一次程序读取了指定的文件,然后“自认为”任务完成了,需要再输入一次相同的提示词才可以继续进行工作。
63 |
64 |
65 | # 初衷,如果您会看到这里的话
66 | 自从Deep Research问世后,冠以“OpenResearch”的复刻项目琳琅满目,那么我为什么还要写这个名字?其实原因很简单:
67 | 1. 技术应该是越来越简单,我想尽可能用简单的方式来实现一些复杂的输出,特别是在这个AI时代;
68 | 2. Research没什么好神秘的,在这个时代,任何人应该都可以利用公开信息和合适的工具实现99%的“研究”需求;
69 | 综上,这是我理解的“Open”。
--------------------------------------------------------------------------------
/gui/src/App.jsx:
--------------------------------------------------------------------------------
1 | import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'
2 | import { WorkflowProvider } from './context/WorkflowContext'
3 | import Navigation from './components/Navigation'
4 | import Header from './components/Header'
5 | import CloudStatus from './components/CloudStatus'
6 | import TopicInput from './components/TopicInput'
7 | import PlanningPhase from './components/PlanningPhase'
8 | import ExecutionPhase from './components/ExecutionPhase'
9 | import ReportComposition from './components/ReportComposition'
10 | import SearchPage from './components/SearchPage'
11 | import KnowledgeDashboard from './components/KnowledgeDashboard'
12 | import ProjectDetails from './components/ProjectDetails'
13 | import WYSIWYGReportEditor from './components/WYSIWYGReportEditor'
14 |
15 | // Main Research Workflow Page
16 | const ResearchPage = () => {
17 | return (
18 |
47 |
48 |
49 | )
50 | }
51 |
52 | export default App
--------------------------------------------------------------------------------
/daily/report.md:
--------------------------------------------------------------------------------
1 | You are a professional,efficient and creative analyst, now try to craft a deep daily report of global financial market;
2 | # Step 1: Preparing
3 | 1. Create a new sub directory of {$date} for current date if the folder did not exist;
4 | 2. All generated files should be under the folder {$date};
5 |
6 | # Step 2: Plan and gen to-do list task file {$date}/task_{$timestamp}.md for agents to follow according to the following instructions:
7 | 1. Do planning after go through this whole file;
8 | 2. Align the trading date: for different market, align the last trading date as {$lastday};
9 | 3. Markdown Report: Gen markdown format report with filename {$date}/report_{$timestamp}.md with the following instruction:
10 | (1). Search and fetch the latest performance of indexes like the Dow, S&P 500, Nasdaq of {$lastday} closing price and daily chg in %;
11 |
12 | (2). Search and fetch the latest performance of commodities like oil and gold, and also crypto currencies of {$lastday} closing price and daily chg in %;
13 |
14 | (3). Search and analyze the factors impacting the latest moves.
15 |
16 | (4). Search and analyze the performance of flagged stocks such as the Magnificent 7, banks, enengy, manufactory and consumer-related stocks.
17 |
18 | (5). Seacrh and fetch other top movers in both sectors and stocks within the US stock market.
19 |
20 | (6). Search and analyze upcoming events that may impact the market.
21 |
22 | (7). Search and analyze the short-term factors that impact the mood of market and do predictions.
23 | 4. Single html file generation: Gen a single html names {$date}/vis_{$timestamp}.html:
24 | (1). Follow the style instruction in @vis.md;
25 | (2). Bilingual language support of English and Simplified Chinese;
26 | (3). Language toggle button on top right;
27 |
28 | # Step 3: Execution and Logging:
29 | 1. Follow the to-do tasks of {$date}/task_{$timestamp}.md, execute step by step;
30 | 2. Ticker one task if finised;
31 | 3. Log the whole process in file 20250731/log_100000.md with the following key information:
32 | (1). {$timestamp};
33 | (2). Task;
34 | (3). URL processed and the {$title};
35 | (4). Summary;
36 | Key: Append not overwrite the log file;
37 |
38 | # Step 4: Review: Review the files generated to end the whole task
--------------------------------------------------------------------------------
/gui/deploy.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # OpenResearch Cloudflare Worker Deployment Script
4 |
5 | set -e
6 |
7 | echo "🚀 Deploying OpenResearch to Cloudflare..."
8 |
9 | # Check if wrangler is installed
10 | if ! command -v wrangler &> /dev/null; then
11 | echo "❌ Wrangler CLI not found. Please install it first:"
12 | echo "npm install -g wrangler"
13 | exit 1
14 | fi
15 |
16 | # Navigate to worker directory
17 | cd worker
18 |
19 | echo "📦 Installing worker dependencies..."
20 | npm install
21 |
22 | echo "🗄️ Creating D1 database..."
23 | wrangler d1 create openresearch-db || echo "Database may already exist"
24 |
25 | echo "📊 Creating Vectorize index..."
26 | wrangler vectorize create research-embeddings --dimensions=768 --metric=cosine || echo "Index may already exist"
27 |
28 | echo "🗂️ Creating R2 buckets..."
29 | wrangler r2 bucket create openresearch-reports || echo "Reports bucket may already exist"
30 | wrangler r2 bucket create openresearch-assets || echo "Assets bucket may already exist"
31 |
32 | echo "🔄 Running database migrations..."
33 | wrangler d1 migrations apply openresearch-db
34 |
35 | echo "🔐 Setting up secrets..."
36 | echo "Please set the following secrets using 'wrangler secret put ':"
37 | echo "- GEMINI_API_KEY"
38 | echo "- GEMINI_EMBEDDING_MODEL (optional, defaults to gemini-embedding-001)"
39 | echo ""
40 | echo "Example:"
41 | echo "wrangler secret put GEMINI_API_KEY"
42 | echo "wrangler secret put GEMINI_EMBEDDING_MODEL"
43 |
44 | read -p "Have you set the required secrets? (y/n): " -n 1 -r
45 | echo
46 | if [[ ! $REPLY =~ ^[Yy]$ ]]; then
47 | echo "❌ Please set the required secrets before continuing."
48 | exit 1
49 | fi
50 |
51 | echo "🚀 Deploying worker..."
52 | wrangler deploy
53 |
54 | echo "✅ Worker deployed successfully!"
55 | echo ""
56 | echo "🌐 Your worker is now available at:"
57 | wrangler whoami | grep "Account ID" | awk '{print "https://openresearch-worker.YOUR_SUBDOMAIN.workers.dev"}'
58 | echo ""
59 | echo "📝 Next steps:"
60 | echo "1. Update your frontend .env file with:"
61 | echo " VITE_WORKER_API_URL=https://your-worker-url.workers.dev"
62 | echo " VITE_MODE=cloud"
63 | echo "2. Rebuild and redeploy your frontend"
64 | echo "3. Test the integration"
65 |
66 | cd ..
67 | echo "🎉 Deployment complete!"
--------------------------------------------------------------------------------
/example/earnings_call/report_ford_earnings_call_20250731.md:
--------------------------------------------------------------------------------
1 | # Report: Ford Motor Company Q2 2025 Earnings Call Analysis
2 |
3 | ## Executive Summary
4 | Ford Motor Company reported a strong second quarter for 2025, surpassing analyst expectations for both earnings per share (EPS) and revenue. The company reinstated its full-year 2025 guidance, signaling confidence despite anticipated impacts from tariff-related costs. While Ford Pro and Ford Credit delivered robust results, the Ford Model e segment continued to experience losses.
5 |
6 | ## Financial Highlights
7 | Ford's Q2 2025 performance exceeded market forecasts:
8 | * **Earnings Per Share (EPS):** $0.37, outperforming analyst estimates of $0.30 or $0.31.
9 | * **Revenue:** $50.18 billion, surpassing the consensus estimate of $45.29 billion.
10 | * **Dividend:** A third-quarter regular dividend of 15 cents per share was declared.
11 |
12 | ## Segment Performance
13 | * **Ford Pro:** Generated a significant EBIT of $2.3 billion, highlighting the strength of its commercial vehicle and services business.
14 | * **Ford Blue:** Earned a modest profit, indicating stable performance from its traditional internal combustion engine vehicle segment.
15 | * **Ford Model e:** Reported an EBIT loss of $1.3 billion, reflecting ongoing investments and challenges in the electric vehicle sector.
16 | * **Ford Credit:** Had a strong quarter with significantly increased earnings before taxes, contributing positively to the overall financial results.
17 |
18 | ## Key Takeaways & Future Outlook
19 | Ford reinstated its full-year 2025 guidance, suggesting a positive outlook for the remainder of the year. However, the company acknowledged the financial implications of tariff-related costs, estimating a gross adverse EBIT impact of $2.5 billion and a net adverse EBIT impact of approximately $1.5 billion for the full year 2025. This indicates that while the company is performing well, external factors like tariffs are posing a notable headwind.
20 |
21 | ## Conclusion
22 | Ford Motor Company's Q2 2025 earnings call demonstrates a resilient financial performance, driven by strong results in its commercial and financing divisions. Despite the continued losses in the electric vehicle segment and the impact of tariffs, the company's decision to reinstate its full-year guidance suggests a strategic approach to navigate current market conditions and maintain profitability.
--------------------------------------------------------------------------------
/ui/design-phase-one.md:
--------------------------------------------------------------------------------
1 | This is a compelling and well-articulated concept for an AI-driven interactive report composing platform. The two-phase approach effectively balances AI-powered automation in the research phase with essential human oversight and creativity in the composition phase. The use of modular "Cards" and an MDX foundation sets the stage for flexible and rich outputs.
2 |
3 | Here is a detailed breakdown, a formalized visualization, and an analysis of your proposed workflow.
4 |
5 | Platform Workflow Breakdown
6 | The platform architecture is logically divided into two main phases:
7 |
8 | Phase 1: Research and Content Curation
9 | This phase focuses on gathering, processing, and organizing the raw materials for the report.
10 |
11 | Topic Input: The user initiates the process by defining the report topic.
12 |
13 | AI Planning & User Confirmation: The LLM analyzes the topic and drafts a research plan. Crucially, the user reviews, edits, and confirms this plan before execution.
14 |
15 | Agent Execution: AI agents execute the plan, utilizing various information sources:
16 |
17 | Web Search: For external, up-to-date information. Using gemini search tool, with api_key and model set in .env, and tool documented at https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/web-search.md
18 |
19 |
20 |
21 | # Detailed Interaction Flows
22 |
23 | Phase 1: Research and Curation
24 | Planning: The User submits a topic. The API Gateway routes it to the Workflow Orchestrator, which calls the Planner Service. The Planner Service uses the LLM Abstraction Layer to generate a plan.
25 |
26 | Confirmation: The plan is returned to the Client UI for user review and approval.
27 |
28 | Dispatch: Upon confirmation, the Orchestrator breaks the plan into tasks and pushes them to the Task Queue.
29 |
30 | Execution: The Agent Execution Workers (Web, RAG, MCP) pull tasks from the queue and retrieve raw data.
31 |
32 | Synthesis: The raw data is passed to the Card Synthesizer. This worker uses the LLM Abstraction Layer to format the data into structured Cards.
33 |
34 |
35 | # Future enhancement
36 |
37 | ## Add sources:
38 | Context (RAG): Retrieval-Augmented Generation for accessing internal knowledge bases or specific documents.
39 |
40 | MCP (Data/APIs): Accessing structured databases or other specific data sources.
41 |
42 | Card Generation: The results from each task are synthesized into atomic units called "Cards" (e.g., a text summary, a chart, a table).
43 |
44 | Context Base: The generated cards are stored in a central repository (the "Context Base") for the current project.
45 |
--------------------------------------------------------------------------------
/gui/src/services/WorkflowOrchestrator.js:
--------------------------------------------------------------------------------
1 | import TaskQueue from './TaskQueue'
2 | import AgentExecutionWorkers from './AgentExecutionWorkers'
3 | import CardSynthesizer from './CardSynthesizer'
4 |
5 | class WorkflowOrchestrator {
6 | constructor() {
7 | this.activeWorkflows = new Map()
8 | }
9 |
10 | async startWorkflow(workflowId, researchPlan) {
11 | console.log(`Starting workflow ${workflowId} with plan:`, researchPlan)
12 |
13 | // Break plan into tasks and queue them
14 | const tasks = researchPlan.tasks.map(task => ({
15 | ...task,
16 | workflowId,
17 | status: 'queued',
18 | createdAt: new Date().toISOString()
19 | }))
20 |
21 | // Add tasks to queue
22 | tasks.forEach(task => TaskQueue.enqueue(task))
23 |
24 | // Store workflow state
25 | this.activeWorkflows.set(workflowId, {
26 | id: workflowId,
27 | plan: researchPlan,
28 | tasks,
29 | status: 'running',
30 | startedAt: new Date().toISOString()
31 | })
32 |
33 | // Start processing tasks
34 | this.processTasks(workflowId)
35 |
36 | return workflowId
37 | }
38 |
39 | async processTasks(workflowId) {
40 | const workflow = this.activeWorkflows.get(workflowId)
41 | if (!workflow) return
42 |
43 | while (TaskQueue.hasNext()) {
44 | const task = TaskQueue.dequeue()
45 | if (task.workflowId !== workflowId) continue
46 |
47 | try {
48 | // Execute task with appropriate agent
49 | const rawData = await AgentExecutionWorkers.executeTask(task)
50 |
51 | // Synthesize raw data into card
52 | const card = await CardSynthesizer.synthesize(rawData, task.type)
53 |
54 | // Update task status
55 | task.status = 'completed'
56 | task.completedAt = new Date().toISOString()
57 | task.result = card
58 |
59 | // Notify observers (in real app, would emit events)
60 | console.log(`Task completed: ${task.title}`, card)
61 |
62 | } catch (error) {
63 | console.error(`Task failed: ${task.title}`, error)
64 | task.status = 'failed'
65 | task.error = error.message
66 | }
67 | }
68 |
69 | // Mark workflow as complete
70 | workflow.status = 'completed'
71 | workflow.completedAt = new Date().toISOString()
72 | console.log(`Workflow ${workflowId} completed`)
73 | }
74 |
75 | getWorkflowStatus(workflowId) {
76 | return this.activeWorkflows.get(workflowId)
77 | }
78 |
79 | async cancelWorkflow(workflowId) {
80 | const workflow = this.activeWorkflows.get(workflowId)
81 | if (workflow) {
82 | workflow.status = 'cancelled'
83 | workflow.cancelledAt = new Date().toISOString()
84 | }
85 | }
86 | }
87 |
88 | export default new WorkflowOrchestrator()
--------------------------------------------------------------------------------
/ui/src/services/WorkflowOrchestrator.js:
--------------------------------------------------------------------------------
1 | import TaskQueue from './TaskQueue'
2 | import AgentExecutionWorkers from './AgentExecutionWorkers'
3 | import CardSynthesizer from './CardSynthesizer'
4 |
5 | class WorkflowOrchestrator {
6 | constructor() {
7 | this.activeWorkflows = new Map()
8 | }
9 |
10 | async startWorkflow(workflowId, researchPlan) {
11 | console.log(`Starting workflow ${workflowId} with plan:`, researchPlan)
12 |
13 | // Break plan into tasks and queue them
14 | const tasks = researchPlan.tasks.map(task => ({
15 | ...task,
16 | workflowId,
17 | status: 'queued',
18 | createdAt: new Date().toISOString()
19 | }))
20 |
21 | // Add tasks to queue
22 | tasks.forEach(task => TaskQueue.enqueue(task))
23 |
24 | // Store workflow state
25 | this.activeWorkflows.set(workflowId, {
26 | id: workflowId,
27 | plan: researchPlan,
28 | tasks,
29 | status: 'running',
30 | startedAt: new Date().toISOString()
31 | })
32 |
33 | // Start processing tasks
34 | this.processTasks(workflowId)
35 |
36 | return workflowId
37 | }
38 |
39 | async processTasks(workflowId) {
40 | const workflow = this.activeWorkflows.get(workflowId)
41 | if (!workflow) return
42 |
43 | while (TaskQueue.hasNext()) {
44 | const task = TaskQueue.dequeue()
45 | if (task.workflowId !== workflowId) continue
46 |
47 | try {
48 | // Execute task with appropriate agent
49 | const rawData = await AgentExecutionWorkers.executeTask(task)
50 |
51 | // Synthesize raw data into card
52 | const card = await CardSynthesizer.synthesize(rawData, task.type)
53 |
54 | // Update task status
55 | task.status = 'completed'
56 | task.completedAt = new Date().toISOString()
57 | task.result = card
58 |
59 | // Notify observers (in real app, would emit events)
60 | console.log(`Task completed: ${task.title}`, card)
61 |
62 | } catch (error) {
63 | console.error(`Task failed: ${task.title}`, error)
64 | task.status = 'failed'
65 | task.error = error.message
66 | }
67 | }
68 |
69 | // Mark workflow as complete
70 | workflow.status = 'completed'
71 | workflow.completedAt = new Date().toISOString()
72 | console.log(`Workflow ${workflowId} completed`)
73 | }
74 |
75 | getWorkflowStatus(workflowId) {
76 | return this.activeWorkflows.get(workflowId)
77 | }
78 |
79 | async cancelWorkflow(workflowId) {
80 | const workflow = this.activeWorkflows.get(workflowId)
81 | if (workflow) {
82 | workflow.status = 'cancelled'
83 | workflow.cancelledAt = new Date().toISOString()
84 | }
85 | }
86 | }
87 |
88 | export default new WorkflowOrchestrator()
--------------------------------------------------------------------------------
/daily/reports/20250731/log_20250731100000.md:
--------------------------------------------------------------------------------
1 | 20250731100000
2 | Task: Create directory
3 | Summary: Created directory reports/20250731
4 |
5 | 20250731100000
6 | Task: Generate task file
7 | Summary: Created task file reports/20250731/task_20250731100000.md
8 |
9 | 20250731100000
10 | Task: Search for major indexes performance
11 | URL processed and the title: Dow S&P 500 Nasdaq closing price July 30 2025
12 | Summary: Fetched closing prices and daily changes for Dow, S&P 500, and Nasdaq.
13 |
14 | 20250731100000
15 | Task: Search for commodities and cryptocurrencies performance
16 | URL processed and the title: oil gold and crypto currencies closing price July 30 2025
17 | Summary: Fetched closing prices for WTI Crude Oil, Brent Crude, Gold, Bitcoin, and Ethereum.
18 |
19 | 20250731100000
20 | Task: Search for factors impacting market moves
21 | URL processed and the title: factors impacting stock market July 30 2025
22 | Summary: Identified economic conditions, corporate performance, political/geopolitical factors, and market trends as key impacts.
23 |
24 | 20250731100000
25 | Task: Search for Magnificent 7 stocks performance
26 | URL processed and the title: Magnificent 7 stocks performance July 30 2025
27 | Summary: Gathered performance data for Magnificent 7 stocks, noting mixed results.
28 |
29 | 20250731100000
30 | Task: Search for bank stocks performance
31 | URL processed and the title: bank stocks performance July 30 2025
32 | Summary: No specific data for bank stock performance on July 30, 2025, was available.
33 |
34 | 20250731100000
35 | Task: Search for energy stocks performance
36 | URL processed and the title: energy stocks performance July 30 2025
37 | Summary: Gathered information on overall trends, company-specific performance, and renewable energy stocks.
38 |
39 | 20250731100000
40 | Task: Search for manufacturing stocks performance
41 | URL processed and the title: manufacturing stocks performance July 30 2025
42 | Summary: No specific data for manufacturing stock performance on July 30, 2025, was available.
43 |
44 | 20250731100000
45 | Task: Search for consumer-related stocks performance
46 | URL processed and the title: consumer-related stocks performance July 30 2025
47 | Summary: Gathered information on varied performance across markets and sub-sectors.
48 |
49 | 20250731100000
50 | Task: Search for top movers in US stock market
51 | URL processed and the title: top movers US stock market sectors and stocks July 30 2025
52 | Summary: Identified top moving sectors and individual stocks (gainers and losers).
53 |
54 | 20250731100000
55 | Task: Generate markdown report
56 | Summary: Created reports/20250731/report_20250731100000.md with gathered market data.
57 |
58 | 20250731100000
59 | Task: Generate HTML visualization
60 | Summary: Created reports/20250731/vis_20250731100000.html with bilingual support and charts.
61 |
--------------------------------------------------------------------------------
/instruct_v2.md:
--------------------------------------------------------------------------------
1 | You are a professional,efficient and creative analyst, now try to craft a deep research on the topic of user's prompt: [prompt]
2 |
3 | # [vis_instruct] : vis.md under current directory, which is prompt of visulization html generation;
4 |
5 | # Preparation
6 | Create a new [folder] with name [keyword]_[date]
7 | Create 5 blank files under [folder] for the whole process:
8 | 1. [plan_file]: markdown file plan_[keyword]_[date].md, in which [keyword] stands for a keyword extracted from the [prompt]
9 | 2. [task_file]: task_[keyword]_[date].md
10 | 3. [log_file]: markdown format with the filename log_[keyword]_[date].md
11 | 4. [report_file]: markdown format with the file name report_[keyword]_[date].md
12 | 5. [vis_file]: vis_[keyword]_[date].html
13 |
14 | # Step 1: Planning
15 | Please go through the [prompt] and create a highly-detailed research plan, write it to a [plan_file]. The plan should contain following parts: Research, Report Composing, Validation, Visualization HTML Generation referring to [vis_instruct], Validation of visualization;
16 |
17 | # Step 2: Create Tasks
18 | Create a highly-detailed to-do task list, write to [task_file], please follow the format as:
19 |
20 | --- Task Sample
21 | ### Step 1 {Step One}
22 | **1.1 {Task 1.1}
23 | [ ] {subtask}
24 | ---
25 |
26 | The to-do task should contain following parts: Research, Report Composing, Validation, Visualization HTML Generation referring to [vis_file], Validation of visualization;
27 |
28 | Fill the [log_file] and [report_file] with structures in to-do list task
29 |
30 | # Step 3: Task Iteration
31 | Iterate the to-do list of [task_file], cross "[ ]" of [task_file] after each task, and append [log_file] with the following items too:
32 | 1. What you thought;
33 | 2. What you did;
34 | 3. What you got;
35 | 4. Sources you searched or process;
36 | 5. Other important information to remember for further report composing;
37 |
38 | # Step 4: Report Composing
39 | Iterate and update each part of [report_file]
40 |
41 | # Step 5: Report Validation
42 | Go through the [report_file] for validation and detail refinery, refer to [log_file] to recall important information for validation and supplementation;
43 |
44 | # Step 6: Visualization
45 | Refer to [vis_instruct], craft a in-depth bilingual(English and Simplified Chinese, for all content including texts, language toggle swtich on top right) webpage like newspaper frontpage write to [vis_file];
46 |
47 | # Step 7: Visualization Validation and refinery
48 | Go throught the [vis_file] for validation, check carefully to avoid the unstoppable extending height of chart axis. And for each content div in [vis_file], add more details referring to [report_file].
49 |
50 | # Finishing
51 | Complete all 5 files:[plan_file],[task_file],[log_file],[report_file],[vis_file]
52 | Return a execution summary
53 |
54 | # Important
55 | Do not modify [vis_instruct]
56 |
57 |
58 |
--------------------------------------------------------------------------------
/gui/src/services/ServiceFactory.js:
--------------------------------------------------------------------------------
1 | import LLMAbstractionLayer from './LLMAbstractionLayer.js';
2 | import { HybridLLMService } from './HybridLLMService.js';
3 |
4 | /**
5 | * Service Factory - creates appropriate service instances based on configuration
6 | */
7 | class ServiceFactoryImpl {
8 | constructor() {
9 | this.mode = import.meta.env.VITE_MODE || 'local';
10 | this.hasWorkerApi = !!import.meta.env.VITE_WORKER_API_URL;
11 | this.llmServiceInstance = null; // Singleton instance
12 |
13 | // Only log once during first initialization
14 | if (!ServiceFactoryImpl._initialized) {
15 | console.log('🏭 ServiceFactory initialized:', {
16 | mode: this.mode,
17 | hasWorkerApi: this.hasWorkerApi,
18 | workerUrl: this.hasWorkerApi ? '✅ Connected' : '❌ Not configured'
19 | });
20 | ServiceFactoryImpl._initialized = true;
21 | }
22 | }
23 |
24 | /**
25 | * Create LLM service instance (singleton pattern)
26 | */
27 | createLLMService() {
28 | // Return existing instance if available
29 | if (this.llmServiceInstance) {
30 | return this.llmServiceInstance;
31 | }
32 |
33 | if (this.mode === 'cloud' && this.hasWorkerApi) {
34 | console.log('🚀 Creating HybridLLMService (Local AI + Worker Infrastructure)');
35 | this.llmServiceInstance = new HybridLLMService();
36 | } else {
37 | console.log('🔧 Using local LLMAbstractionLayer');
38 | this.llmServiceInstance = LLMAbstractionLayer; // This is already an instance
39 | }
40 |
41 | return this.llmServiceInstance;
42 | }
43 |
44 | /**
45 | * Check if cloud features are available
46 | */
47 | isCloudModeEnabled() {
48 | return this.mode === 'cloud' && this.hasWorkerApi;
49 | }
50 |
51 | /**
52 | * Get service mode
53 | */
54 | getMode() {
55 | return this.mode;
56 | }
57 |
58 | /**
59 | * Get feature availability
60 | */
61 | getFeatures() {
62 | const isCloud = this.isCloudModeEnabled();
63 |
64 | return {
65 | semanticSearch: isCloud,
66 | vectorStorage: isCloud,
67 | persistentStorage: isCloud,
68 | backgroundExecution: isCloud,
69 | projectManagement: isCloud,
70 | exportToCloud: isCloud,
71 | multiLanguageReports: true, // Available in both modes
72 | realTimeExecution: !isCloud, // Local mode has real-time, cloud mode uses polling
73 | };
74 | }
75 | }
76 |
77 | // Initialize static property
78 | ServiceFactoryImpl._initialized = false;
79 |
80 | // Create singleton instance
81 | const factory = new ServiceFactoryImpl();
82 |
83 | /**
84 | * Singleton access to service factory and LLM service
85 | */
86 | export class ServiceFactory {
87 | static getInstance() {
88 | return factory.createLLMService();
89 | }
90 |
91 | static getFactory() {
92 | return factory;
93 | }
94 | }
95 |
96 | export const serviceFactory = factory;
--------------------------------------------------------------------------------
/legacy/instruct_new.md:
--------------------------------------------------------------------------------
1 | You are a professional, efficient, and creative analyst. Your task is to conduct a deep research study based on the user's provided prompt.
2 |
3 | # Step 1: Planning
4 | 1. **Understand the Prompt:** Carefully analyze the user's research prompt.
5 | 2. **Extract Keyword & Date:** Identify a concise keyword from the prompt and note the current date in `YYYYMMDD` format.
6 | 3. **Create Research Plan:** Develop a highly detailed research plan, outlining all necessary steps and sub-tasks. Save this plan to a markdown file named `planning_[keyword]_[yyyymmdd].md`.
7 |
8 | # Step 2: Iterative Research Execution
9 | 1. **Generate Task List:** Based on the `planning_[keyword]_[yyyymmdd].md` file, create a comprehensive to-do list for research agents. Save this list to a markdown file named `task_[keyword]_[yyyymmdd]_[hhmmss].md`, where `[hhmmss]` represents the current timestamp.
10 | 2. **Execute Research Tasks:** Follow the tasks outlined in `task_[keyword]_[yyyymmdd]_[hhmmss].md` step by step.
11 | * **Information Gathering:** Utilize `google_web_search` to find the most recent and relevant information (news, events, data, reports). Prioritize official reports, reputable economic analyses, and established financial news outlets.
12 | * **Analysis and Synthesis:** Extract key data points, trends, and expert opinions. Identify specific impacts (positive/negative) and analyze long-term shifts.
13 | * **Information Structuring:** Organize findings logically, typically by country, sector, and long-term impact.
14 | 3. **Iterative Task Management:** For each completed task, mark it as finished in `task_[keyword]_[yyyymmdd]_[hhmmss].md`. Continuously refine and append new sub-tasks to this file as new research avenues emerge.
15 |
16 | # Step 3: Report Composing
17 | 1. **Draft Report:** Compile all gathered and analyzed information into a comprehensive report. Save the report in markdown format with the filename: `report_[keyword]_[yyyymmdd].md`.
18 | 2. **Data Presentation:** Use tables with data wherever possible to present information clearly and concisely.
19 | 3. **Comprehensive Coverage:** Ensure the report is well-structured and addresses all aspects of the original research prompt.
20 |
21 | # Step 4: Report Visualization
22 | 1. **Webpage Creation:** Based on the final report, craft an in-depth bilingual (English and Simplified Chinese, for all content including texts) webpage. The webpage should resemble a newspaper front page and adhere to the style instructions provided in `@vis.md`.
23 | 2. **Output Filename:** Save the webpage as `vis_[keyword]_[yyyymmdd].html`.
24 | 3. **Chart Axis Check:** Pay careful attention to chart generation to prevent the y-axis height from extending uncontrollably.
25 |
26 | # Logging
27 | 1. **Maintain Detailed Log:** Throughout the entire process, maintain a detailed log of all steps taken, thoughts, actions, search queries, and sources. Save this log in markdown format with the filename: `log_[keyword]_[yyyymmdd]_[hhmmss].md`.
28 |
--------------------------------------------------------------------------------
/daily/reports/20250730/log_20250730100000.md:
--------------------------------------------------------------------------------
1 |
2 | # Log for 2025-07-30
3 |
4 | **Timestamp:** 20250730100000
5 |
6 | **Task:** Create directory for today's report
7 | **Summary:** Created the `reports/20250730` directory.
8 |
9 | ---
10 |
11 | **Timestamp:** 20250730100000
12 |
13 | **Task:** Generate to-do list
14 | **Summary:** Created `reports/20250730/task_20250730100000.md` with the plan for the day.
15 |
16 | ---
17 |
18 | **Timestamp:** 20250730100000
19 |
20 | **Task:** Fetch Major Index Data
21 | **URL Processed:** google.com
22 | **Title:** closing prices for Dow, S&P 500, and Nasdaq on July 29, 2025
23 | **Summary:** Fetched closing prices for the Dow, S&P 500, and Nasdaq.
24 |
25 | ---
26 |
27 | **Timestamp:** 20250730100000
28 |
29 | **Task:** Fetch Commodity Data
30 | **URL Processed:** google.com
31 | **Title:** closing price of oil and gold on July 29, 2025
32 | **Summary:** Fetched closing prices for oil and gold.
33 |
34 | ---
35 |
36 | **Timestamp:** 20250730100000
37 |
38 | **Task:** Fetch Cryptocurrency Data
39 | **URL Processed:** google.com
40 | **Title:** closing price of Bitcoin and Ethereum on July 29, 2025
41 | **Summary:** Fetched closing prices for Bitcoin and Ethereum.
42 |
43 | ---
44 |
45 | **Timestamp:** 20250730100000
46 |
47 | **Task:** Draft Markdown Report
48 | **Summary:** Created and populated the initial markdown report with market data.
49 |
50 | ---
51 |
52 | **Timestamp:** 20250730100000
53 |
54 | **Task:** Analyze Market Drivers
55 | **URL Processed:** google.com
56 | **Title:** factors impacting stock market on July 29, 2025
57 | **Summary:** Analyzed and added key market drivers to the report.
58 |
59 | ---
60 |
61 | **Timestamp:** 20250730100000
62 |
63 | **Task:** Analyze Flagged Stocks
64 | **URL Processed:** google.com
65 | **Title:** performance of Magnificent 7, banks, energy, manufacturing, and consumer stocks on July 29, 2025
66 | **Summary:** Analyzed and added performance of flagged stocks to the report.
67 |
68 | ---
69 |
70 | **Timestamp:** 20250730100000
71 |
72 | **Task:** Analyze Top Movers
73 | **URL Processed:** google.com
74 | **Title:** top movers in US stock market on July 29, 2025
75 | **Summary:** Analyzed and added top movers to the report.
76 |
77 | ---
78 |
79 | **Timestamp:** 20250730100000
80 |
81 | **Task:** Analyze Upcoming Events
82 | **URL Processed:** google.com
83 | **Title:** upcoming events that may impact the stock market July 2025
84 | **Summary:** Analyzed and added upcoming events to the report.
85 |
86 | ---
87 |
88 | **Timestamp:** 20250730100000
89 |
90 | **Task:** Analyze Short-Term Outlook
91 | **URL Processed:** google.com
92 | **Title:** short-term stock market prediction July 30 2025
93 | **Summary:** Analyzed and added the short-term outlook and prediction to the report.
94 |
95 | ---
96 |
97 | **Timestamp:** 20250730100000
98 |
99 | **Task:** Generate HTML Report
100 | **Summary:** Generated the HTML report `vis_20250730100000.html` with bilingual support and charts.
101 |
102 | ---
103 |
104 | **Timestamp:** 20250730100000
105 |
106 | **Task:** Final Review
107 | **Summary:** All files have been generated and reviewed.
108 |
--------------------------------------------------------------------------------
/example/claude_tarrif/task_tariff_20250728_143022.md:
--------------------------------------------------------------------------------
1 | # Task List: US-Euro 15% Tariff Agreement Research
2 |
3 | ## Current Time: 14:30:22, July 28, 2025
4 |
5 | ### Phase 1: Background Research Tasks
6 | - [ ] **Task 1.1**: Search for recent US-EU trade statistics and current tariff structures
7 | - [ ] **Task 1.2**: Research historical precedents of similar tariff agreements
8 | - [ ] **Task 1.3**: Gather baseline economic data for major US states and EU countries
9 |
10 | ### Phase 2: Country-Specific Impact Research
11 | - [ ] **Task 2.1**: Analyze US state-level impacts (California, Texas, New York, Florida, others)
12 | - [ ] **Task 2.2**: Research major EU country impacts (Germany, France, Italy, Netherlands, Spain)
13 | - [ ] **Task 2.3**: Examine smaller EU member state vulnerabilities
14 | - [ ] **Task 2.4**: Assess regional economic variations within countries
15 |
16 | ### Phase 3: Sectoral Analysis Tasks
17 | - [ ] **Task 3.1**: Manufacturing sector analysis (automotive, machinery, chemicals, steel, electronics)
18 | - [ ] **Task 3.2**: Agricultural sector impacts (food, commodities, wine, dairy)
19 | - [ ] **Task 3.3**: Services sector effects (financial, logistics, digital)
20 | - [ ] **Task 3.4**: Energy sector implications (renewable, traditional, infrastructure)
21 |
22 | ### Phase 4: Long-term Impact Assessment
23 | - [ ] **Task 4.1**: Model trade flow redirections and supply chain shifts
24 | - [ ] **Task 4.2**: Analyze investment pattern changes and FDI flows
25 | - [ ] **Task 4.3**: Assess geopolitical and strategic implications
26 | - [ ] **Task 4.4**: Evaluate innovation and competitiveness effects
27 |
28 | ### Phase 5: Data Collection and Quantitative Analysis
29 | - [ ] **Task 5.1**: Compile official government trade and economic statistics
30 | - [ ] **Task 5.2**: Gather industry reports and business impact assessments
31 | - [ ] **Task 5.3**: Collect academic research and think tank analyses
32 | - [ ] **Task 5.4**: Perform quantitative modeling and projections
33 |
34 | ### Phase 6: Report Composition
35 | - [ ] **Task 6.1**: Structure executive summary with key findings
36 | - [ ] **Task 6.2**: Compose country-specific analysis sections
37 | - [ ] **Task 6.3**: Write detailed sector impact analysis
38 | - [ ] **Task 6.4**: Develop long-term projection scenarios
39 | - [ ] **Task 6.5**: Create data tables and supporting charts
40 |
41 | ### Logging Tasks (Ongoing)
42 | - [ ] **Log 1**: Document search strategies and sources accessed
43 | - [ ] **Log 2**: Record analysis methods and key insights
44 | - [ ] **Log 3**: Track challenges and limitations encountered
45 | - [ ] **Log 4**: Note data quality and reliability assessments
46 |
47 | ## Priority Order
48 | 1. Background research (Tasks 1.1-1.3)
49 | 2. Current economic data collection (Task 5.1)
50 | 3. Country-specific analysis (Tasks 2.1-2.4)
51 | 4. Sectoral analysis (Tasks 3.1-3.4)
52 | 5. Long-term impact modeling (Tasks 4.1-4.4)
53 | 6. Report composition (Tasks 6.1-6.5)
54 |
55 | ## Success Criteria for Each Task
56 | - Use multiple credible sources (minimum 3 per major finding)
57 | - Include quantitative data wherever possible
58 | - Cross-reference information for accuracy
59 | - Document sources and methodology
60 | - Focus on recent data (2023-2025 preferred)
--------------------------------------------------------------------------------
/example/pharma/task_tariff_20250728_143022.md:
--------------------------------------------------------------------------------
1 | # Research Tasks for Deep Research: Impacts to Pharmaceuticals of US Tariffs for Other Countries
2 |
3 | ## To-Do List (Generated: 2025-07-28 14:30:22)
4 |
5 | ### Step 2.1: Understand the Scope and Key Players
6 | - [x] Define "US tariffs" in the context of pharmaceuticals (e.g., specific acts, trade wars, general tariff policies).
7 | - [x] Identify "other countries" most affected or relevant to pharmaceutical trade with the US (e.g., China, India, EU, Canada, Mexico).
8 | - [x] Identify key pharmaceutical products/categories that might be impacted.
9 | - [x] Research the current state of the global pharmaceutical supply chain.
10 |
11 | ### Step 2.2: Identify Existing Tariffs and Their Application
12 | - [x] Search for specific US tariffs imposed on pharmaceutical products or related raw materials/components from identified countries.
13 | - [x] Determine the effective dates and duration of these tariffs.
14 | - [x] Investigate any retaliatory tariffs imposed by other countries on US pharmaceutical exports.
15 |
16 | ### Step 2.3: Analyze Economic Impacts
17 | - [ ] **For US Consumers/Patients:**
18 | - [x] Impact on drug prices (increase/decrease).
19 | - [x] Impact on drug availability/shortages.
20 | - [x] Impact on innovation and R&D within the US.
21 | - [ ] **For US Pharmaceutical Companies:**
22 | - [x] Impact on manufacturing costs (if raw materials are imported).
23 | - [x] Impact on export competitiveness.
24 | - [x] Impact on supply chain resilience and diversification strategies.
25 | - [x] Impact on investment decisions (e.g., reshoring, nearshoring).
26 | - [ ] **For Pharmaceutical Companies in Other Countries:**
27 | - [x] Impact on export volumes to the US.
28 | - [x] Impact on profitability and market share.
29 | - [x] Strategies adopted (e.g., finding new markets, reducing costs, shifting production).
30 | - [ ] **For Global Pharmaceutical Supply Chain:**
31 | - [x] Diversification of supply sources.
32 | - [x] Regionalization of manufacturing.
33 | - [x] Changes in trade flows.
34 |
35 | ### Step 2.4: Analyze Non-Economic Impacts
36 | - [ ] **Geopolitical Implications:**
37 | - [x] Impact on trade relations between the US and other countries.
38 | - [ ] Potential for trade disputes and their resolution.
39 | - [ ] **Regulatory and Quality Control:**
40 | - [x] How tariffs might affect regulatory compliance and quality standards if supply chains shift.
41 | - [ ] **Public Health Implications:**
42 | - [x] Long-term effects on global health security and access to essential medicines.
43 |
44 | ### Step 2.5: Gather Data and Case Studies
45 | - [ ] Collect relevant economic data (e.g., trade volumes, price indices, import/export figures).
46 | - [ ] Look for specific case studies of pharmaceutical companies or products affected by tariffs.
47 | - [ ] Utilize recent news articles, academic papers, industry reports, and government publications.
48 |
49 | ### Step 2.6: Identify Future Trends and Outlook
50 | - [x] Forecast potential future tariff policies.
51 | - [x] Analyze long-term implications for the pharmaceutical industry.
52 | - [x] Identify potential mitigation strategies or policy recommendations.
53 |
54 | ### Logging
55 | - [ ] Continuously update `log_tariff_20250728_143022.md` with actions, thoughts, and sources.
56 |
--------------------------------------------------------------------------------
/gui/src/components/Navigation.jsx:
--------------------------------------------------------------------------------
1 | import { Link, useLocation } from 'react-router-dom'
2 |
3 | const Navigation = () => {
4 | const location = useLocation()
5 |
6 | const navItems = [
7 | {
8 | path: '/',
9 | label: 'Research',
10 | icon: '🔬',
11 | description: 'Create new research projects'
12 | },
13 | {
14 | path: '/knowledge',
15 | label: 'Knowledge Base',
16 | icon: '🧠',
17 | description: 'Explore all projects, search, and analytics'
18 | }
19 | ]
20 |
21 | // Show editor tab only if we're on an editor page
22 | const isEditorPage = location.pathname.includes('/edit')
23 |
24 | if (isEditorPage) {
25 | navItems.push({
26 | path: location.pathname,
27 | label: 'Report Editor',
28 | icon: '✏️',
29 | description: 'WYSIWYG report editor'
30 | })
31 | }
32 |
33 | return (
34 |
90 | )
91 | }
92 |
93 | export default Navigation
--------------------------------------------------------------------------------
/daily/reports/20250729/log_20250729100000.md:
--------------------------------------------------------------------------------
1 | 20250729100000
2 | Task: Create directory for today's report.
3 | URL processed: N/A
4 | Summary: Created directory /Users/daoming/prog/work/reports/daily/reports/20250729.
5 |
6 | 20250729100000
7 | Task: Generate to-do list task file.
8 | URL processed: N/A
9 | Summary: Generated task_20250729100000.md with a plan for report and webpage generation.
10 |
11 | 20250729100000
12 | Task: Search and fetch latest performance of indexes, commodities, and cryptocurrencies.
13 | URL processed: greenwichtime.com, sfgate.com, latimes.com, tradingeconomics.com, hartenergy.com, investopedia.com, morningstar.com, mining.com, cryptonews.com, zacks.com
14 | Summary: Gathered closing prices for Dow, S&P 500, Nasdaq, Brent Crude, WTI Crude, Gold, and Bitcoin for July 28, 2025.
15 |
16 | 20250729100000
17 | Task: Search and analyze factors impacting latest market moves.
18 | URL processed: investopedia.com, latimes.com, ahdb.org.uk, marketpulse.com, ajg.com, hartenergy.com, fxleaders.com, pbs.org, spglobal.com, forvismazars.us, blackrock.com, icmarkets.com, youtube.com, business-standard.com
19 | Summary: Identified trade deals, geopolitical developments, economic data, central bank policies, corporate earnings, and commodity trends as key factors.
20 |
21 | 20250729100000
22 | Task: Search and analyze performance of flagged stocks (Magnificent 7, banks, energy, manufacturing, consumer-related).
23 | URL processed: coincentral.com, investing.com, techi.com, fool.com, nasdaq.com, marketbeat.com, seekingalpha.com, interactivebrokers.com, 247wallst.com, trefis.com, tradersunion.com, huntsvillebusinessjournal.com, prnewswire.com, californiabankofcommerce.com, icicidirect.com, nucor.com, spragueenergy.com
24 | Summary: Detailed performance of Magnificent 7 stocks and provided an overview of banks, energy, manufacturing, and consumer-related sectors.
25 |
26 | 20250729100000
27 | Task: Search and fetch top movers in US stock market.
28 | URL processed: investopedia.com, latimes.com, timesunion.com, thestreet.com, indopremier.com
29 | Summary: Identified top gainers (Super Micro Computer, AMD, Nike, Tesla) and top losers (Albemarle, Revvity, Centene, Nucor).
30 |
31 | 20250729100000
32 | Task: Search and analyze upcoming events that may impact the market.
33 | URL processed: icmarkets.com, mortgageelements.com, hancockwhitney.com, seekingalpha.com, oldpoint.com
34 | Summary: Noted upcoming Eurozone GDP and inflation data, and the Bank of Japan meeting.
35 |
36 | 20250729100000
37 | Task: Search and analyze short-term factors impacting market and predictions.
38 | URL processed: guggenheiminvestments.com, seekingalpha.com, ey.com, home.saxo, economictimes.com, forvismazars.us, 4xsolutions.com, morganstanley.com, carnegieinvest.com, fanniemae.com, ccrwealth.com
39 | Summary: Discussed tariffs, inflation, labor market, GDP, consumer spending, Fed policy, corporate earnings, geopolitical tensions, and market valuations as short-term factors, and predicted continued volatility.
40 |
41 | 20250729100000
42 | Task: Generate markdown format report.
43 | URL processed: N/A
44 | Summary: Created report_20250729100000.md with all gathered financial market information.
45 |
46 | 20250729100000
47 | Task: Generate single HTML file.
48 | URL processed: N/A
49 | Summary: Created vis_20250729100000.html with data visualization and bilingual support based on vis.md instructions.
--------------------------------------------------------------------------------
/example/earnings_call/report_ups_earnings_call_20250731.md:
--------------------------------------------------------------------------------
1 | # UPS Q2 2025 Earnings Call Research Report
2 |
3 | ## 1. Executive Summary
4 |
5 | UPS reported a mixed financial performance for Q2 2025. While consolidated revenue of $21.2 billion surpassed forecasts, diluted earnings per share (EPS) of $1.55 slightly missed expectations. The company is actively pursuing strategic actions, including significant cost reduction programs and network reconfiguration, aiming for $3.5 billion in cost savings for 2025. Challenges include a softer U.S. small package market, subdued manufacturing activity, and the impact of trade policy changes. UPS is also continuing its strategic decision to reduce lower-margin business, particularly from Amazon.
6 |
7 | ## 2. Financial Performance Analysis
8 |
9 | ### Revenue Breakdown
10 | * **Consolidated Revenue:** $21.2 billion, a 2.7% decrease compared to the same period last year, but exceeding the anticipated $20.8 billion.
11 | * **U.S. Domestic Package:** Revenue was $14.1 billion, a 0.8% decline year-over-year. This was primarily due to an expected volume decrease, partially offset by increases in air cargo and revenue per piece. Average daily volume in this segment declined by 7.3%.
12 | * **International:** Revenue increased by 2.6% to $4.5 billion, driven by a 3.9% growth in total average daily volume.
13 | * **Supply Chain Solutions:** Revenue decreased by 18.3% to $2.7 billion, mainly due to the divestiture of Coyote Logistics in Q3 2024.
14 |
15 | ### Profitability
16 | * **Consolidated Operating Profit:** $1.9 billion (non-GAAP adjusted).
17 | * **Consolidated Operating Margin:** 8.8% (non-GAAP adjusted).
18 |
19 | ### Earnings Per Share (EPS)
20 | * **Diluted Earnings Per Share (EPS):** $1.55 (non-GAAP adjusted), slightly below the $1.57 forecast.
21 |
22 | ### Cash Flow
23 | * **Free Cash Flow:** $742 million.
24 | * **Dividends Paid Year-to-Date:** $2.7 billion.
25 |
26 | ## 3. Key Strategic Initiatives and Future Outlook
27 |
28 | ### Strategic Actions
29 | UPS is actively pursuing strategic actions, including:
30 | * Targeting $3.5 billion in cost reductions for 2025 through network reconfiguration and efficiency initiatives.
31 | * Expanding its healthcare logistics capabilities, with plans to acquire Andlauer Healthcare Group to enhance its presence in Canadian and U.S. markets.
32 | * Continuing its strategic decision to reduce lower-margin business, particularly from Amazon.
33 |
34 | ### Market Conditions and Challenges
35 | Challenges faced during the quarter included:
36 | * A softer U.S. small package market.
37 | * Subdued manufacturing activity.
38 | * The impact of trade policy changes and tariffs.
39 |
40 | ## 4. Q&A Highlights
41 |
42 | *Due to the unavailability of the full earnings call transcript, this section is limited to information gleaned from summaries.*
43 |
44 | The summaries indicate that investor concerns were primarily related to broader market conditions and uncertainties regarding future guidance, leading to a drop in share price despite the revenue beat. Management's responses likely focused on the strategic cost-cutting measures and network optimization efforts as ways to navigate these challenges and improve future profitability.
45 |
46 | ## 5. Conclusion
47 |
48 | UPS's Q2 2025 performance reflects a company in transition, strategically adjusting its operations to optimize profitability amidst a challenging market. While revenue growth was modest and EPS slightly missed targets, the aggressive cost reduction initiatives and strategic acquisitions in healthcare logistics demonstrate a proactive approach to long-term growth and efficiency. The company faces headwinds from a softer market and trade policies, but its focus on network optimization and shedding lower-margin business suggests a commitment to improving its financial standing.
49 |
--------------------------------------------------------------------------------
/gui/src/services/AgentExecutionWorkers.js:
--------------------------------------------------------------------------------
1 | import { AGENT_TYPES } from '../types'
2 |
3 | class AgentExecutionWorkers {
4 | async executeTask(task) {
5 | console.log(`Executing task: ${task.title} with agent: ${task.agent}`)
6 |
7 | switch (task.agent) {
8 | case AGENT_TYPES.WEB:
9 | return this.executeWebSearch(task)
10 | case AGENT_TYPES.RAG:
11 | return this.executeRAGQuery(task)
12 | case AGENT_TYPES.MCP:
13 | return this.executeMCPQuery(task)
14 | default:
15 | throw new Error(`Unknown agent type: ${task.agent}`)
16 | }
17 | }
18 |
19 | async executeWebSearch(task) {
20 | // Simulate web search using Gemini search tool
21 | // In real implementation, would use the Gemini CLI tool as documented
22 | return new Promise((resolve) => {
23 | setTimeout(() => {
24 | resolve({
25 | title: task.title,
26 | content: `Web search results for: ${task.query}`,
27 | source: 'web_search',
28 | data: {
29 | query: task.query,
30 | results: [
31 | {
32 | title: `Academic paper on ${task.query}`,
33 | url: 'https://example.com/paper1',
34 | snippet: 'Relevant research findings...'
35 | },
36 | {
37 | title: `Industry report on ${task.query}`,
38 | url: 'https://example.com/report1',
39 | snippet: 'Statistical analysis shows...'
40 | }
41 | ]
42 | },
43 | metadata: {
44 | searchEngine: 'gemini',
45 | timestamp: new Date().toISOString(),
46 | resultCount: 2
47 | }
48 | })
49 | }, 2000 + Math.random() * 2000) // 2-4 seconds
50 | })
51 | }
52 |
53 | async executeRAGQuery(task) {
54 | // Simulate RAG query against internal knowledge base
55 | return new Promise((resolve) => {
56 | setTimeout(() => {
57 | resolve({
58 | title: task.title,
59 | content: `Internal knowledge results for: ${task.query}`,
60 | source: 'rag_query',
61 | data: {
62 | query: task.query,
63 | documents: [
64 | {
65 | id: 'doc1',
66 | title: 'Internal research document',
67 | relevance: 0.85,
68 | excerpt: 'Previous analysis indicates...'
69 | }
70 | ]
71 | },
72 | metadata: {
73 | knowledgeBase: 'internal',
74 | timestamp: new Date().toISOString(),
75 | relevanceScore: 0.85
76 | }
77 | })
78 | }, 1500 + Math.random() * 1500) // 1.5-3 seconds
79 | })
80 | }
81 |
82 | async executeMCPQuery(task) {
83 | // Simulate MCP (Model Context Protocol) data access
84 | return new Promise((resolve) => {
85 | setTimeout(() => {
86 | resolve({
87 | title: task.title,
88 | content: `Database/API results for: ${task.query}`,
89 | source: 'mcp_data',
90 | data: {
91 | query: task.query,
92 | records: [
93 | {
94 | id: 'record1',
95 | type: 'statistical_data',
96 | value: Math.random() * 1000,
97 | unit: 'units'
98 | }
99 | ]
100 | },
101 | metadata: {
102 | database: 'structured_data',
103 | timestamp: new Date().toISOString(),
104 | recordCount: 1
105 | }
106 | })
107 | }, 1000 + Math.random() * 1000) // 1-2 seconds
108 | })
109 | }
110 | }
111 |
112 | export default new AgentExecutionWorkers()
--------------------------------------------------------------------------------
/ui/src/services/AgentExecutionWorkers.js:
--------------------------------------------------------------------------------
1 | import { AGENT_TYPES } from '../types'
2 |
3 | class AgentExecutionWorkers {
4 | async executeTask(task) {
5 | console.log(`Executing task: ${task.title} with agent: ${task.agent}`)
6 |
7 | switch (task.agent) {
8 | case AGENT_TYPES.WEB:
9 | return this.executeWebSearch(task)
10 | case AGENT_TYPES.RAG:
11 | return this.executeRAGQuery(task)
12 | case AGENT_TYPES.MCP:
13 | return this.executeMCPQuery(task)
14 | default:
15 | throw new Error(`Unknown agent type: ${task.agent}`)
16 | }
17 | }
18 |
19 | async executeWebSearch(task) {
20 | // Simulate web search using Gemini search tool
21 | // In real implementation, would use the Gemini CLI tool as documented
22 | return new Promise((resolve) => {
23 | setTimeout(() => {
24 | resolve({
25 | title: task.title,
26 | content: `Web search results for: ${task.query}`,
27 | source: 'web_search',
28 | data: {
29 | query: task.query,
30 | results: [
31 | {
32 | title: `Academic paper on ${task.query}`,
33 | url: 'https://example.com/paper1',
34 | snippet: 'Relevant research findings...'
35 | },
36 | {
37 | title: `Industry report on ${task.query}`,
38 | url: 'https://example.com/report1',
39 | snippet: 'Statistical analysis shows...'
40 | }
41 | ]
42 | },
43 | metadata: {
44 | searchEngine: 'gemini',
45 | timestamp: new Date().toISOString(),
46 | resultCount: 2
47 | }
48 | })
49 | }, 2000 + Math.random() * 2000) // 2-4 seconds
50 | })
51 | }
52 |
53 | async executeRAGQuery(task) {
54 | // Simulate RAG query against internal knowledge base
55 | return new Promise((resolve) => {
56 | setTimeout(() => {
57 | resolve({
58 | title: task.title,
59 | content: `Internal knowledge results for: ${task.query}`,
60 | source: 'rag_query',
61 | data: {
62 | query: task.query,
63 | documents: [
64 | {
65 | id: 'doc1',
66 | title: 'Internal research document',
67 | relevance: 0.85,
68 | excerpt: 'Previous analysis indicates...'
69 | }
70 | ]
71 | },
72 | metadata: {
73 | knowledgeBase: 'internal',
74 | timestamp: new Date().toISOString(),
75 | relevanceScore: 0.85
76 | }
77 | })
78 | }, 1500 + Math.random() * 1500) // 1.5-3 seconds
79 | })
80 | }
81 |
82 | async executeMCPQuery(task) {
83 | // Simulate MCP (Model Context Protocol) data access
84 | return new Promise((resolve) => {
85 | setTimeout(() => {
86 | resolve({
87 | title: task.title,
88 | content: `Database/API results for: ${task.query}`,
89 | source: 'mcp_data',
90 | data: {
91 | query: task.query,
92 | records: [
93 | {
94 | id: 'record1',
95 | type: 'statistical_data',
96 | value: Math.random() * 1000,
97 | unit: 'units'
98 | }
99 | ]
100 | },
101 | metadata: {
102 | database: 'structured_data',
103 | timestamp: new Date().toISOString(),
104 | recordCount: 1
105 | }
106 | })
107 | }, 1000 + Math.random() * 1000) // 1-2 seconds
108 | })
109 | }
110 | }
111 |
112 | export default new AgentExecutionWorkers()
--------------------------------------------------------------------------------
/daily/vis.md:
--------------------------------------------------------------------------------
1 | You are an expert web designer specializing in professional financial data visualization. Your task is to take a raw text financial report provided by the user and transform it into a sophisticated, single-file HTML report with a specific visual theme.
2 |
3 | All content, including text, numbers, and table entries, must be derived directly from the user's input. Your primary role is the visual and structural transformation based on the theme defined below.
4 |
5 | 1. Overall Theme & Layout
6 | Theme: A modern, professional dark theme using a slate blue and gold palette. The aesthetic should be clean, data-focused, and authoritative.
7 |
8 | Structure: Generate a single, self-contained HTML file. Use semantic HTML tags (, , ,
, etc.) to structure the document logically based on the headings in the source text.
9 |
10 | Dependencies: Use CDN links for Tailwind CSS for styling and Chart.js for data visualization.
11 |
12 | 2. Typography (Fonts, Size, Color)
13 | Font Family: Use a clean, professional sans-serif font stack: font-family: 'Inter', sans-serif;.
14 |
15 | Color Palette (Dark Theme):
16 |
17 | Page Background: Dark, desaturated slate blue (#1e293b).
18 |
19 | Primary Text: Off-white (#f8fafc).
20 |
21 | Container Backgrounds (Tables/Charts): A slightly lighter slate blue to create depth (e.g., #283447).
22 |
23 | Accent / Title Border: Muted, elegant gold (#c0a062).
24 |
25 | Muted / Note Text: A light, muted gray-blue (#94a3b8).
26 |
27 | Positive Values (Up): A professional, medium blue (#3b82f6).
28 |
29 | Negative Values (Down): A clear, desaturated red (#ef4444).
30 |
31 | Sizing & Weight:
32 |
33 | Main Title (
): Large and bold (e.g., Tailwind text-3xl font-bold).
34 |
35 | Section Titles (
): Very prominent (e.g., text-xl font-bold) with a 2px gold bottom border.
36 |
37 | Subsection Titles (
): Moderately prominent (e.g., text-lg font-semibold).
38 |
39 | Body Text (
): Standard size and weight for readability.
40 |
41 | 3. Table Styling
42 | Structure: When the source text contains tabular data, format it into a proper HTML
.
43 |
44 | Header (): Use the container background color and gold (#c0a062) bold text.
45 |
46 | Rows (
): Use the main page background and the slightly lighter container background for alternating row colors. Use a subtle bottom border (1px solid #334155) for each row.
47 |
48 | Data Formatting: For columns showing market changes, automatically format the data:
49 |
50 | Positive numbers should be colored blue (#3b82f6).
51 |
52 | Negative numbers should be colored red (#ef4444).
53 |
54 | 4. Chart Generation & Style
55 | Automatic Generation: Analyze the input text to identify opportunities for data visualization. If the text compares several items (e.g., index performance, stock movers, sector changes), generate a chart.
56 |
57 | Chart Type: Primarily use horizontal bar charts (type: 'bar', indexAxis: 'y') for clear comparison.
58 |
59 | Styling (Chart.js options):
60 |
61 | Container: Place each