支持永久记忆、持续学习、探索性解决复杂问题的Agent框架。

luojunhui 2c943a43f8 project init hai 17 horas
agent 2c943a43f8 project init hai 17 horas
docs 2c943a43f8 project init hai 17 horas
src 2c943a43f8 project init hai 17 horas
tests 2c943a43f8 project init hai 17 horas
.dockerignore baece2b3b6 project init hai 2 semanas
.gitignore baece2b3b6 project init hai 2 semanas
CLAUDE.md 2c943a43f8 project init hai 17 horas
Dockerfile baece2b3b6 project init hai 2 semanas
LICENSE baece2b3b6 project init hai 2 semanas
Makefile baece2b3b6 project init hai 2 semanas
README.md baece2b3b6 project init hai 2 semanas
app.py baece2b3b6 project init hai 2 semanas
pipeline_visualize.py 2c943a43f8 project init hai 17 horas
pyproject.toml baece2b3b6 project init hai 2 semanas
requirements.txt baece2b3b6 project init hai 2 semanas
run_pipeline.py 2c943a43f8 project init hai 17 horas
run_search_agent.py 2c943a43f8 project init hai 17 horas
server.toml baece2b3b6 project init hai 2 semanas

README.md

LongArticleSearchAgent

长文供给寻找 Agent

1. 项目结构

LongArticleSearchAgent/
├── app.py                                  # 应用入口
├── pyproject.toml                          # 项目元信息 & 工具配置
├── requirements.txt                        # Python 依赖
├── Makefile                                # 常用命令快捷方式
├── Dockerfile                              # 容器构建
├── .env.example                            # 环境变量模板
│
├── src/
│   ├── agent/                              # Agent 业务逻辑(待开发)
│   │
│   ├── config/                             # 配置层(Pydantic Settings)
│   │   ├── agent_config.py                 # 聚合配置入口
│   │   ├── api/
│   │   │   └── deepseek.py                 # DeepSeek LLM 配置
│   │   ├── aliyun/
│   │   │   └── log.py                      # 阿里云日志配置
│   │   └── database/
│   │       └── mysql_config.py             # MySQL 数据库配置
│   │
│   ├── core/                               # 核心层
│   │   ├── api/v1/                         # API 路由 & 端点
│   │   │   ├── endpoints/
│   │   │   │   └── health.py               # 健康检查端点
│   │   │   ├── middleware/
│   │   │   │   ├── error_handler.py        # 全局异常处理
│   │   │   │   └── response.py             # 统一响应构建器 R
│   │   │   ├── routes/
│   │   │   │   └── route.py                # 路由统一注册
│   │   │   └── utils/
│   │   │       └── deps.py                 # API 依赖容器
│   │   ├── bootstrap/
│   │   │   ├── logging_config.py           # 统一日志配置
│   │   │   └── resource_manager.py         # 应用生命周期管理
│   │   └── dependency/
│   │       └── dependencies.py             # DI 容器(dependency_injector)
│   │
│   └── infra/                              # 基础设施层
│       ├── database/
│       │   └── mysql/
│       │       └── async_mysql_pool.py     # 异步 MySQL 连接池
│       └── trace/
│           └── logging/
│               └── log_service.py          # 阿里云日志服务
│
└── tests/                                  # 测试
    ├── conftest.py                         # 公共 fixtures
    ├── unit/
    │   └── test_config.py
    └── integration/
        └── test_health.py

2. 快速开始

# 安装依赖
make install

# 复制环境变量模板并填写真实配置
cp .env.example .env

# 开发模式运行(热重载)
make dev

# 生产模式运行
make run

3. 常用命令

命令 说明
make install 安装 Python 依赖
make dev 开发模式启动(热重载)
make run 生产模式启动
make test 运行测试
make lint 代码检查
make format 代码格式化
make docker-build 构建 Docker 镜像
make docker-run 以 Docker 容器运行

4. 环境变量

参考 .env.example 查看所有需要配置的环境变量。

5. License

MIT