简介
用于使用 Astreus 框架构建 agent 的 AI 驱动开发助手。CLI 帮助你直接在终端中创建、测试和迭代 AI agent —— 并且完全了解 Astreus SDK。
为什么选择 Astreus CLI?#
Astreus CLI 专为熟悉 Astreus 框架、希望加速 agent 开发工作流的开发者设计。它提供:
- Astreus SDK 专家 —— AI 理解完整的 Astreus 框架:agent 创建、内存、知识库、插件、MCP、子 agent、图(graph)等等
- 项目脚手架 —— 生成具有正确结构、类型和配置的完整 agent 项目
- 代码生成 —— 创建生产级的 agent、插件、工具和集成代码
- 多提供商测试 —— 在 OpenAI、Claude、Gemini 和本地模型之间切换以测试你的 agent
- 文件操作 —— AI 可以直接读取、写入和编辑你的项目文件
- 会话持久化 —— 在多个会话中继续 agent 开发
适合谁?#
CLI 专为以下开发者打造:
- 熟悉 Astreus 框架 并希望构建 AI agent
- 希望使用理解 Astreus 模式和最佳实践的 AI 助手
- 需要快速搭建 agent 项目脚手架或生成样板代码
- 希望迭代 agent 配置并测试不同方案
快速示例#
# 安装并启动
npm install -g @astreus-ai/astreus-cli
export OPENAI_API_KEY=your-api-key
astreusYou: Create a customer support agent with memory and a knowledge base for our FAQ
Astreus: I'll create a customer support agent for you.
[Tool: list_directory] Checking current directory...
[Tool: create_directory] Creating src/...
[Tool: write_file] Creating src/agent.ts...
[Tool: write_file] Creating src/index.ts...
[Tool: write_file] Creating package.json...
[Tool: write_file] Creating .env.example...
Done! I've created a complete customer support agent with:
- Memory enabled for conversation history
- Knowledge base setup for FAQ documents
- Streaming responses configured
- TypeScript with proper types
Run `npm install && npm run dev` to start the agent.你能构建什么?#
| 使用场景 | CLI 提供的帮助 |
|---|---|
| 对话式 Agent | 内存配置、上下文管理、流式响应设置 |
| RAG Agent | 知识库集成、文档摄取、检索调优 |
| 使用工具的 Agent | 插件创建、工具定义、处理程序实现 |
| 多 Agent 系统 | 子 agent 协调、图工作流、任务委派 |
| MCP 集成 | 服务器配置、工具发现、能力映射 |
核心功能#
| 功能 | 描述 |
|---|---|
| 框架知识 | 内置对 Astreus SDK 模式和 API 的理解 |
| 代码生成 | 创建 agent、插件和完整项目 |
| 多提供商 | 使用 OpenAI、Claude、Gemini 或 Ollama 进行测试 |
| 文件工具 | 直接读取、写入、编辑项目文件 |
| 会话记忆 | 跨会话继续开发 |
| 项目上下文 | 附加文件夹以让 AI 完全了解项目 |