Token导航 LogoToken导航TokenDH.com
AI Daemon logo
运维云端未说明官方级别未说明来源级核验

AI Daemon

MCP Server

轻量级AI框架,支持多LLM提供商、技能扩展、自主任务调度,并提供REST、Web UI和终端交互。

工具数

0

提示词数

0

GitHub Stars

1

资源数

0
Java云端部署Docker

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

EvalVis

提供方

EvalVis

最后核验

2026/5/17 20:19

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

AI守护进程

基于Spring Boot 4和Spring AI构建的轻量级AI框架。连接任何LLM提供商,用技能和MCP扩展功能,安排自主作业,并通过REST、Web UI或终端进行交互——所有这些都可以从一个自托管服务中实现。

Example use case

建筑

graph TB
    User([User])

    subgraph Interface["Interface Layer"]
        REST[REST API]
        WebUI[Web UI]
        CLI[Interactive CLI]
    end

    User -->|HTTP / curl| REST
    User -->|Browser| WebUI
    User -->|Terminal| CLI
    WebUI --> REST

    subgraph Engine["AI Engine"]
        Chat[Chat Service]
        Conv[Conversation Manager]
        Providers[Provider Registry]
        Memory[Persistent Memory]
        Skills[Skills Reader]
        Shell[Shell Executor]
        Scheduler[Job Scheduler]
        MCPTools[MCP Tools]
    end

    subgraph Providers_Sub["LLM Providers"]
        OpenAI[OpenAI]
        Anthropic[Anthropic]
        Gemini[Gemini]
        Ollama[Ollama / Local]
    end

    subgraph External["External Integrations"]
        MCPRemote[Remote MCPs]
        MCPLocal[Local MCPs - stdio]
        Smithery[Smithery Skills Registry]
    end

    subgraph Storage["~/.aidaemon/"]
        ProvidersJSON[providers.json]
        MemoryJSON[memory.json]
        JobsJSON[jobs.json]
        ConversationsDir[conversations/]
        SkillsDir[skills/]
        McpsDir[mcps/]
    end

    REST --> Chat
    REST --> Conv
    CLI --> Conv

    Conv -->|multi-turn history| Chat
    Chat --> Providers
    Providers --> OpenAI & Anthropic & Gemini & Ollama

    Chat -->|tool calls| Memory & Skills & Shell & Scheduler & MCPTools

    Memory -->|read/write| MemoryJSON
    Skills -->|read| SkillsDir
    Scheduler -->|persist| JobsJSON
    Scheduler -->|executes via| Chat
    Conv -->|persist| ConversationsDir
    MCPTools --> MCPRemote & MCPLocal
    MCPRemote & MCPLocal -.->|config| McpsDir
    Smithery -->|install all files| SkillsDir
    Providers -.->|persist| ProvidersJSON

    Shell -->|guarded by flag| OS[Host OS]

    style User fill:#f9f,stroke:#333
    style Storage fill:#c9a800,stroke:#333,color:#fff
    style External fill:#1a7a7a,stroke:#333,color:#fff

授权

启用委派后,主代理可以生成子代理以并行处理子任务。子代理异步运行;当它们完成时,家长会被状态更新唤醒,可以综合结果或发送修订工作。 子代理可以创建自己的子代理。该图简单地显示了一个父代理和一个顶级子代理。

sequenceDiagram
    participant User
    participant Parent as Parent Agent
    participant DelegationService
    participant Sub1 as Sub-agent 1
    participant Sub2 as Sub-agent 2

    User->>Parent: Message
    Parent->>Parent: Estimates time > threshold
    Parent->>DelegationService: delegateToSubAgent x2
    DelegationService->>Sub1: Create and run sub-conversation
    DelegationService->>Sub2: Create and run sub-conversation
    Parent->>User: Delegated, will respond when ready
    Sub1->>DelegationService: Completed
    Sub2->>DelegationService: Completed
    DelegationService->>Parent: Delegation Status Update with sub results
    Parent->>Parent: Review, addWorkToSubAgent or synthesize
    Parent->>User: Final response
  • 工具: delegateToSubAgent(name, instruction) 创建子对话并将其排队。 addWorkToSubAgent(subConversationId, instruction) 在审查其输出后,将后续工作发送给子代理。
  • 配置: aidaemon.delegation-enabled=true, aidaemon.delegation-threshold-seconds=30当模型的估计时间超过阈值时,指示模型进行委托。

特性

  • 多供应商 --OpenAI、Anthropic、Gemini、Ollama。使用API密钥持久性在运行时添加/删除提供程序。
  • 对话 --有状态的多回合会话,具有完整的聊天历史记录,在以下情况下持续存在 ~/.aidaemon/conversations/。已选择提供商(代理) 按提示:为对话设置或更改它,以便下一条消息使用该提供程序。对话有创建时间戳,可以按时间排序。
  • 流媒体 --对话消息可以通过以下方式发送 POST /api/conversations/{id}/messages/stream 上海证券交易所块包括 reasoning, answer,以及 tool 类型,以便UI可以实时显示思维和工具。
  • 授权 --可选的子代理委托:AI将工作拆分为并行运行的子对话;当它们完成时,家长会收到通知,可以综合或请求修改。启用 aidaemon.delegation-enabled=true.
  • 思考/推理 --支持暴露它的提供者(例如Anthropic扩展思维)。推理是单独流式传输的,并在Web UI中显示;计划作业结果包括存储输出中的思考。
  • 快速缓存 --在支持的情况下(例如Anthropic、Gemini)使用对话历史和提示缓存来降低成本和延迟。
  • 上下文窗口 --可选 aidaemon.context-window.chars-limit (字符限制)修剪旧消息,对于命名的机器人,修剪个人记忆,使提示适合。使用 aidaemon.context-window.personal-memory-ratio (0–1)在对话历史和机器人个人记忆之间分配预算。AI可以使用 retrieveOlderMessages 当上下文被修剪时,用于获取旧对话内容的工具。
  • 持久内存 --AI可以通过以下方式在会话之间保存和回忆信息 memory.json.
  • 技能 --将指令文件放入 ~/.aidaemon/skills/ 或从安装 铁匠铺 通过REST端点。AI根据特定领域的上下文读取它们。
  • MCP支持 --连接远程(流式HTTP、SSE)和本地(stdio)MCP服务器。将JSON配置放入 ~/.aidaemon/mcps/ 并重新加载或添加 铁匠铺-通过聊天(Notion、谷歌日历等)托管MCP。
  • 预定作业 --AI创建cron作业(重复或一次性),按计划自主执行指令。AI还可以列出和取消它们。
  • Shell 访问 --可选地允许AI执行主机命令(git、docker、curl等)。由全局切换端点控制。
  • 网页用户界面 --React应用程序 frontend/webui/ 对于提供者、对话和流媒体聊天,具有推理和工具可见性。
  • 交互式CLI --基于终端的聊天功能,包括提供商选择、对话管理和shell切换。

先决条件

  • Java 25+
  • Maven(或使用附带的 mvnw 包装)

快速开始

# Clone and build
git clone 
cd aidaemon
./mvnw spring-boot:run

在Windows PowerShell上:

.\mvnw.cmd spring-boot:run

服务器启动于 http://localhost:8080.

1.注册提供商

curl -X POST http://localhost:8080/api/providers \
  -H "Content-Type: application/json" \
  -d '{"name":"my-gpt","type":"OPENAI","apiKey":"...","model":"gpt-4o"}'

支持的类型: OPENAI, ANTHROPIC, GEMINI, OLLAMA

对于Ollama(不需要API密钥):

curl -X POST http://localhost:8080/api/providers \
  -H "Content-Type: application/json" \
  -d '{"name":"local-llama","type":"OLLAMA","baseUrl":"http://localhost:11434","model":"llama3"}'

2.聊天(无状态)

curl -X POST http://localhost:8080/api/chat/{providerId} \
  -H "Content-Type: application/json" \
  -d '{"messages":[{"role":"user","content":"Hello!"}]}'

3.对话(有状态)

对话持续进行 ~/.aidaemon/conversations/。每个都有一个可选名称。根据提示选择提供程序:在创建时设置或通过 PATCH;您发送的下一条消息将使用该提供商。

# Create a conversation
curl -X POST http://localhost:8080/api/conversations \
  -H "Content-Type: application/json" \
  -d '{"name":"My chat","providerId":""}'

# Send messages (history is maintained server-side)
curl -X POST http://localhost:8080/api/conversations/{id}/messages \
  -H "Content-Type: application/json" \
  -d '{"message":"What did I just ask you?"}'

# Stream response (SSE: reasoning, answer, tool chunks)
curl -X POST http://localhost:8080/api/conversations/{id}/messages/stream \
  -H "Content-Type: application/json" \
  -d '{"message":"Explain X"}' \
  -N

# Set which provider to use for the next prompt(s)
curl -X PATCH http://localhost:8080/api/conversations/{id} \
  -H "Content-Type: application/json" \
  -d '{"providerId":"other-provider-id"}'

4.交互式CLI

./mvnw spring-boot:run -Dspring-boot.run.profiles=cli

在Windows PowerShell上:

.\mvnw.cmd spring-boot:run "-Dspring-boot.run.profiles=cli"

CLI中的命令: /quit, /new (新对话), /shell (切换shell访问)。

5.Web用户界面

从项目根目录开始,构建并运行React UI(代理到后端):

cd frontend/webui
npm install
npm run dev

连接到显示的URL(例如Vite-dev服务器)。配置提供者和对话,然后聊天;响应流中包含推理和工具调用(如果可用)。

技能

技能是包含以下内容的文件夹 SKILL.md 以及提供AI领域特定知识的可选资源(脚本、参考、资产)。

手动安装: 将技能文件夹放入 ~/.aidaemon/skills/启用Smithery MCP后,要求AI搜索并安装技能(例如“安装Smithery的技能创建者技能”);使用 searchSmitherySkillsinstallSmitherySkill.

管理技能: 让AI列出技能(listSkills),以技能列出或读取文件(listSkillFiles, readSkillFile),或删除技能(removeSkill).

MCP服务器

在中创建JSON配置文件 ~/.aidaemon/mcps/.

远程(流式HTTP):

{
  "name": "github",
  "type": "REMOTE",
  "url": "https://api.githubcopilot.com/mcp/",
  "headers": {
    "Authorization": "Bearer "
  }
}

远程(传统SSE):

{
  "name": "my-sse-server",
  "type": "SSE",
  "url": "https://example.com/mcp/sse"
}

本地(stdio):

{
  "name": "aviation",
  "type": "LOCAL",
  "command": "npx",
  "args": ["-y", "aviationstack-mcp-server"],
  "env": {
    "AVIATIONSTACK_API_KEY": ""
  }
}

通过Smithery添加MCP

你可以连接 铁匠铺-托管MCP服务器(如Notion、Google Calendar),无需手动编写配置文件。

  1. 启用和配置Smithery MCPapplication.yaml 或环境:
   aidaemon:
     smithery-mcp:
       enabled: true
       namespace: 
       api-key: 

从获取命名空间和API密钥 Smithery仪表板.

  1. 查找服务器smithery.ai/servers 并注意它的蛞蝓(例如。 notion, googlecalendar)或完整URL(例如。 https://smithery.ai/servers/notion).
  1. 通过聊天添加MCP: 在任何对话中,让AI通过slug或URL添加服务器,例如:

- “添加Smithery的MCP概念” - “添加Smithery MCP服务器谷歌日历”

AI使用 addSmitheryMcp 工具,将配置写入 ~/.aidaemon/mcps/,并连接服务器。

  1. OAuth: 如果服务器需要登录,该工具将返回一个授权URL。在浏览器中打开它,完成登录,然后重新加载MCP:
   curl -X POST http://localhost:8080/api/mcps/reload
# List connected MCPs
curl http://localhost:8080/api/mcps

# Reload after adding/editing config files
curl -X POST http://localhost:8080/api/mcps/reload

Shell访问权限

Shell访问权限为 默认情况下禁用。在运行时切换它:

# Enable
curl -X POST http://localhost:8080/api/shell-access/enable

# Disable
curl -X POST http://localhost:8080/api/shell-access/disable

# Check status
curl http://localhost:8080/api/shell-access

启用后,AI可以在主机系统上执行任意命令。

计划的作业

人工智能可以通过工具调用创建cron作业。您还可以通过REST管理它们:

# List all jobs
curl http://localhost:8080/api/jobs

# View execution results
curl http://localhost:8080/api/jobs/results

# Cancel a job
curl -X DELETE http://localhost:8080/api/jobs/{id}

API 参考

方法端点描述
GET/api/providers列出已注册的提供商
POST/api/providers注册新提供商
DELETE/api/providers/{id}删除提供者
POST/api/chat/{providerId}无状态聊天
POST/api/conversations创建对话
PATCH/api/conversations/{id}为下一个提示设置提供者(例如providerId)
POST/api/conversations/{id}/messages发送消息
POST/api/conversations/{id}/messages/stream发送消息(SSE流)
GET/api/conversations列出对话
DELETE/api/conversations/{id}删除对话
GET/api/mcps列出已连接的MCP服务器
POST/api/mcps/reload重新加载MCP配置
GET/api/shell-access外壳访问状态
POST/api/shell-access/enable启用shell访问
POST/api/shell-access/disable禁用shell访问
GET/api/jobs列出计划作业
GET/api/jobs/results查看作业执行结果
DELETE/api/jobs/{id}取消作业

数据目录

所有持久数据都存在于 ~/.aidaemon/:

~/.aidaemon/
├── providers.json     # Registered LLM providers and API keys
├── memory.json        # AI's persistent memory
├── jobs.json          # Scheduled job definitions
├── conversations/     # Conversation JSON files (stateful chats)
├── skills/            # Skill folders (SKILL.md + resources)
└── mcps/              # MCP server config JSON files

配置

可选的 application.yaml /env属性:

属性默认值描述
aidaemon.config-dir~/.aidaemon数据目录
aidaemon.smithery-mcp.enabledfalse允许通过聊天从Smithery添加MCP服务器
aidaemon.smithery-mcp.namespace--Smithery命名空间(来自仪表板)
aidaemon.smithery-mcp.api-key-Smithery API密钥(来自仪表板)
aidaemon.shell-accessfalse允许AI shell执行
aidaemon.delegation-enabledfalse启用子代理委派
aidaemon.delegation-threshold-seconds30模型应委派的估计秒数
aidaemon.context-window.chars-limit0对话历史记录的最大字符数(以及,对于命名机器人,对话+个人记忆的组合)。与...一起使用 retrieveOlderMessages 用于长时间聊天
aidaemon.context-window.personal-memory-ratio0仅适用于命名机器人:用于个人内存的字符共享限制(0-1)。剩余部分用于对话历史记录
aidaemon.system-instructions(参见application.yaml)模型的系统提示

小心

  • API密钥以纯文本形式存储~/.aidaemon/providers.json。相应地保护此文件。
  • Shell访问权限授予AI完整的命令执行权限 在你的机器上。仅在受信任的环境中启用它,并在不需要时禁用它。
  • 计划作业自主运行 使用您配置的提供程序并使用API令牌。监控您的作业并取消不再需要的作业。
  • MCP服务器可能会暴露出强大的功能 (文件系统访问、API调用等)。在连接MCP配置之前,请先检查它们。
  • 该项目使用Spring AI里程碑版本,这些版本之间可能会有突破性的变化。

贡献

欢迎投稿!无论是bug修复、新的提供商集成、额外的工具还是文档改进,我们都非常感谢所有PR。

如果您对新功能有想法或发现问题,请在提交PR之前打开GitHub问题进行讨论。

目录标签

目录标签

Java云端部署DockerAI框架本地部署多LLM支持自主任务调度技能扩展RESTAPI

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

oauth

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明oauth部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP