SF

sausheong/felix

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

50 stars 14 forks 质量 55 趋势 21

Felix — 单二进制AI代理网关。多提供商的大型语言模型,持久内存,MCP客户端,完全运行在你的硬件上

概览

一个用Go编写的自托管AI代理网关。单一二进制,内存不足,完全运行在你自己的机器上。 Felix通过CLI或网络聊天将你连接到LLM——Claude、GPT、Gemini、Qwen、Ollama或任何兼容OpenAI的终端——并允许代理通过固定的进程中工具注册表和任意数量的远程MCP服务器在你的硬件上执行任务。 1. 一个二进制,一个状态目录,无需网络依赖。LLM可以是本地的。矢量索引正在处理中。知识图谱是一个SQLite文件。没有Felix云,没有Felix账户,也没有任何人都能关闭的Felix后端。2.长期运行的代理会触摸文件、处理文件、与不稳定的API通信,并在重启间积累状态。每次外部调用都有超时。每个队列都有上限。每个调用资源都有配对的清理。磁盘上的状态在下一次加载时会自动修复。3. 默认安装——没有配置编辑、没有API密钥、没有vim——必须只是正常工作。

概述(AI 翻译)

一个用Go编写的自托管AI代理网关。单一二进制,内存不足,完全运行在你自己的机器上。

Felix通过CLI或网络聊天将你连接到LLM——Claude、GPT、Gemini、Qwen、Ollama或任何兼容OpenAI的终端——并允许代理通过固定的进程中工具注册表和任意数量的远程MCP服务器在你的硬件上执行任务。

设计理念

  1. 自给自足。 一个二进制,一个状态目录,无需网络依赖。LLM可以是本地的。向量索引正在处理中。知识图谱是一个SQLite文件。没有Felix云,没有Felix账户,也没有任何人都能关闭的Felix后端。
  2. 鲁棒性。 长期运行的代理会触碰文件、处理文件、与不稳定的 API 通信,并在重启时积累状态。每个外部调用都有超时。每个队列都有上限。每个每次调用的资源都有配对的清理。磁盘上的状态在下一次加载时会自动修复。
  3. 非技术人员开箱即用。 默认安装——不修改配置,不使用API密钥,不使用vim]——必须能正常工作。高级配置可以复杂到需要多复杂,但不能妨碍默认路径。
  4. **默认安全。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Felix

A self-hosted AI agent gateway written in Go. Single binary, low memory, runs entirely on your own machine.

Felix connects you (via CLI or web chat) to LLMs — Claude, GPT, Gemini, Qwen, Ollama, or any OpenAI-compatible endpoint — and lets agents execute tasks on your hardware using a fixed registry of in-process tools plus any number of remote MCP servers.

Design philosophy

  1. Self-sufficient. One binary, one directory of state, no required network dependency. The LLM can be local. The vector index is in-process. The knowledge graph is a SQLite file. There is no Felix cloud, no Felix account, no Felix backend that anyone could turn off.
  2. Robust. Long-running agents touch files, shell out, talk to flaky APIs, and accumulate state across restarts. Every external call has a timeout. Every queue has a cap. Every per-call resource has a paired cleanup. On-disk state heals itself on the next load.
  3. Usable out of the box by non-technical people. The default install — no config edits, no API keys, no vim — must just work. Advanced configuration can be as complex as it needs to be, but it must not be in the way of the default path.
  4. Secure by default. An agent that can read files, run shell commands, and make web requests is genuinely powerful — defaults have to protect users who won’t read the security docs. Felix binds to localhost only, ships the bash tool in allowlist mode rather than full shell access, blocks web requests to internal IP ranges and cloud metadata endpoints, contains file access to each agent’s workspace with symlink resolution, and writes config and session files with owner-only permissions. You can relax any of it deliberately; you don’t have to opt out of it.

Features

Interfaces

  • Single binary, no runtime dependencies. Download and run.
  • macOS / Windows system tray app that runs the gateway in the background and serves a web chat at http://127.0.0.1:18789/chat.
  • felix chat CLI that auto-detects a running gateway and shares its session, memory, and MCP state — start in the browser, continue in the terminal.
  • WebSocket JSON-RPC 2.0 control plane for programmatic access.

Models

  • Claude, GPT, Gemini, Qwen, Ollama, LM Studio, DeepSeek, or any OpenAI-compatible API.
  • Bundled Ollama runtime so you can run agents with no API key. Downloads gemma4 on first startup if no other models are available.
  • Per-agent extended reasoning (off|low|medium|high) mapped to Claude thinking budgets, OpenAI reasoning_effort, Gemini ThinkingConfig, and Qwen enable_thinking.
  • Context-window auto-detection from the model identifier (handles proxy prefixes correctly), with a per-agent contextWindow override for unusual fine-tunes.
  • Cross-provider tool portability: JSON Schema fields one provider rejects (Gemini drops anyOf/oneOf/format; OpenAI drops $ref/definitions) are stripped at the provider boundary.

Memory & knowledge

在 GitHub 查看完整 README

安装

uvx mcp-server-filesystem /Users/me/projects
新手?先看 mcpskill.org 教程 →