Skip to content

NathanJCW/lark-news

Repository files navigation

🚀 Feishu News Agent (飞书情报助手)

Based on "Master-Tool" Agent pattern, this bot provides Concurrent Search and Daily News Curation directly in Feishu (Lark).

Note: This is a pure Python implementation (FastAPI + LangChain/OpenAI SDK).

✨ Features

  • 🔍 Concurrent Search: Paralleled search execution for "Tech", "Business", and "Policy" dimensions using Tavily API.
  • 🧠 AI Curation: DeepSeek powered summarization and report generation.
  • 📅 Subscription System: Users can subscribe to topics, manage push times, and get daily reports via Feishu Cards.
  • ⚡ Interactive Cards:
    • Edit Time: Form-based subscription time management.
    • Loading State: Immediate feedback with loading cards during long AI tasks.

🛠️ Tech Stack

  • Core: Python 3.10+, FastAPI
  • LLM: DeepSeek V3 (via OpenAI SDK)
  • Search: Tavily API
  • Deployment: Docker & Docker Compose
  • Platform: Feishu Open Platform (Event Subscription + Robot)

🚀 Quick Start

1. Prerequisites

  • Docker Installed
  • Feishu App Created (with Robot & Bot capabilities)
  • API Keys: DeepSeek, Tavily, Feishu App ID/Secret

2. Configuration

Copy .env.example (create one based on code) or set env vars directly.

# .env
FEISHU_APP_ID=cli_xxx
FEISHU_APP_SECRET=xxx
FEISHU_VERIFICATION_TOKEN=xxx
FEISHU_ENCRYPT_KEY= (Optional)
DEEPSEEK_API_KEY=sk-xxx
TAVILY_API_KEY=tvly-xxx

3. Run with Docker

docker-compose up --build -d

The service will listen on port 8000. Configure your Feishu Event Subscription Request URL to: http://<your-server>/

📂 Project Structure

.
├── main.py              # Entry point & FastAPI app
├── src/
│   ├── agent/           # LLM Planning & Curation logic
│   ├── delivery/        # Feishu Card construction & sending
│   ├── tools/           # Search & Database tools
│   └── test_pipeline.py # Integration tests
├── tests/               # Unit tests
├── Dockerfile
└── docker-compose.yml

📝 License

MIT

About

AI-powered News Agent for Feishu/Lark. Features concurrent search (Tech/Biz/Policy), DeepSeek V3 curation, and interactive subscription cards. Built with Python, FastAPI, and Docker.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors