经 AI Skill Hub 精选评估,AIfred智能多代理助手 获评「推荐使用」。这款AI工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.2 分,适合有一定技术背景的用户使用。
AIfred智能多代理助手 是一款基于 Python 开发的开源工具,专注于 多智能体、工作流编排、思维链 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
AIfred智能多代理助手 是一款基于 Python 开发的开源工具,专注于 多智能体、工作流编排、思维链 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:pip 安装(推荐)
pip install aifred-intelligence
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install aifred-intelligence
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/Peuqui/AIfred-Intelligence
cd AIfred-Intelligence
pip install -e .
# 验证安装
python -c "import aifred_intelligence; print('安装成功')"
# 命令行使用
aifred-intelligence --help
# 基本用法
aifred-intelligence input_file -o output_file
# Python 代码中调用
import aifred_intelligence
# 示例
result = aifred_intelligence.process("input")
print(result)
# aifred-intelligence 配置文件示例(config.yml) app: name: "aifred-intelligence" debug: false log_level: "INFO" # 运行时指定配置文件 aifred-intelligence --config config.yml # 或通过环境变量配置 export AIFRED_INTELLIGENCE_API_KEY="your-key" export AIFRED_INTELLIGENCE_OUTPUT_DIR="./output"
🌍 Languages: English | Deutsch
---
<img src="assets/AIfred-Zylinder.png" alt="AIfred" width="80" align="left" style="margin-right: 16px;">
| Mode | Min LLM Calls | Max LLM Calls | Typical Duration |
|---|---|---|---|
| **Own Knowledge** | 1 | 1 | 5-30s |
| **Automatik** (Cache Hit) | 0 | 0 | <1s |
| **Automatik** (Direct Answer) | 2 | 3 | 5-35s |
| **Automatik** (Web Research) | 4 | 5 | 15-60s |
| **Quick Web Search** | 3 | 4 | 10-40s |
| **Deep Web Search** | 3 | 4 | 15-60s |
---
The LLM autonomously decides which tools to use — OpenAI-compatible tool infrastructure with plugin system:
.py file into plugins/channels/ or plugins/tools/ — auto-discovered, no code changes needed. Built-in channels: E-Mail Monitor (IMAP IDLE push-based + SMTP auto-reply), Discord (bot with channel + DM support, /clear command). Plugin Manager UI modal to enable/disable any plugin at runtime (moves files to disabled/). Pipeline: Channel listener → Envelope normalization → SQLite routing table → AIfred engine call (with full toolkit incl. web research, calendar check) → Auto-reply (optional, per-channel toggle). Agent routing: address Sokrates or Salomo by name. Note: Hub messages are processed without browser State — progress bars, live streaming and sources HTML are not available for Hub-processed messages; this is by design, not a limitation. See Architecture & Setup.env or UI modalsearch_documents(query=…, folder="bibel/Schlachter")) and chunk-neighbor retrieval (each hit returns its immediate neighbor chunks for full surrounding context). Document Manager UI with preview, bulk-folder index (one click for an entire tree), live file count per folder, orphan cleanup (find indexed entries whose source file is gone) and toast-based feedback for terminal status messagessystem + history + memory + tool_result ≤ 75% of the active model's context window — guarantees the model has 25% headroom for its answer. JSON-aware truncation: result-list responses are shortened from the end (with _truncated marker) so the model still sees structured datacalculate (math), web_fetch (URL extraction), store_memory (memory)-c with ngl=99, stops llama-swap, tests on temp portnative_context ≤ 8192 are tested directly (no binary search)--flash-attn, updates llama-swap YAML on successmodel-speed entry in llama-swap YAML with its own KV quantdata/model_vram_cache.jsonscripts/llama-swap-autoscan.py) — zero manual YAML editing required~/models/ (e.g., sha256-6335adf... → Qwen3-14B-Q8_0.gguf)~/.cache/huggingface/hub/) → creates symlinks for downloaded GGUFsmmproj-*.gguf) automatically get --mmproj argumentdeepseekocr) are detected and excluded before being added to the config~/.config/llama-swap/autoscan-skip.json): incompatible models are remembered, no re-test on every restart. Delete entry to re-test after a llama.cpp update-ngl 99, --flash-attn on, -ctk q8_0, etc.)groups.main.members in the YAML — all models share VRAM exclusivity without manual editingvram_used_mb measured while the model is loaded)config.yaml from scratch if not present — no manual bootstrap requiredExecStartPre in systemd service → ollama pull model or hf download is all it takes to add a model/docsZero-Config Model Management (llama.cpp backend): After the initia
```bash
---
Agent selection, discussion mode, and research mode are persisted per session, not globally. Every chat session has its own config block stored in its session file:
{
"data": {
"config": {
"active_agent": "aifred",
"multi_agent_mode": "standard",
"symposion_agents": [],
"research_mode": "automatik"
}
}
}
Clean default on new session: every new chat starts with aifred + standard + automatik — never inheriting from the previous session.
Multi-tab / cross-channel sync via session file mtime-watching: whenever any writer (browser tab, API, email channel, voice puck) modifies the session file, all other tabs that have this session open detect the change within 1 second and reload — without polling, without events, without race conditions. This replaces the legacy update_flag mechanism entirely.
curl http://localhost:8002/api/settings
curl -X PATCH http://localhost:8002/api/settings \ -H "Content-Type: application/json" \ -d '{"aifred_model": "qwen3:14b"}'
AIfred supports 6 TTS engines with different trade-offs between quality, latency, and resource usage. Each engine was chosen for a specific use case after extensive experimentation.
| Engine | Type | Streaming | Quality | Latency | Resources |
|---|---|---|---|---|---|
| **XTTS v2** | Local Docker | Sentence-level | High (voice cloning) | ~1-2s/sentence | ~2 GB VRAM |
| **MOSS-TTS 1.7B** | Local Docker | None (batch after bubble) | Excellent (best open-source) | ~18-22s/sentence | ~11.5 GB VRAM |
| **DashScope Qwen3-TTS** | Cloud API | Sentence-level | High (voice cloning) | ~1-2s/sentence | API key only |
| **Piper TTS** | Local | Sentence-level | Medium | <100ms | CPU only |
| **eSpeak** | Local | Sentence-level | Low (robotic) | <50ms | CPU only |
| **Edge TTS** | Cloud | Sentence-level | Good | ~200ms | Internet only |
Why multiple engines?
The search for the perfect TTS experience led through several iterations:
state.py:_init_streaming_tts() (see code comment there).Playback Architecture: - Visible HTML5 <audio> widget with blob-URL prefetching (next 2 chunks pre-fetched into memory) - preservesPitch: true for speed adjustments without chipmunk effect - Per-agent voice/pitch/speed settings (AIfred, Sokrates, Salomo can each have distinct voices) - SSE-based audio streaming from backend to browser (persistent connection, 15s keepalive)
AIfred supports cloud LLM providers via OpenAI-compatible APIs:
| Provider | Models | API Key Variable |
|---|---|---|
| **Qwen (DashScope)** | qwen-plus, qwen-turbo, qwen-max | DASHSCOPE_API_KEY |
| **DeepSeek** | deepseek-chat, deepseek-reasoner | DEEPSEEK_API_KEY |
| **Claude (Anthropic)** | claude-3.5-sonnet, claude-3-opus | ANTHROPIC_API_KEY |
| **Kimi (Moonshot)** | moonshot-v1-8k, moonshot-v1-32k | MOONSHOT_API_KEY |
Features: - Dynamic model fetching (models loaded from provider's /models endpoint) - Token usage tracking (prompt + completion tokens displayed in debug console) - Per-provider model memory (each provider remembers its last used model) - Vision model filtering (excludes -vl variants from main LLM dropdown) - Streaming support with real-time output
Note: Cloud APIs don't require local GPU resources - ideal for: - Testing larger models without hardware investment - Mobile/laptop usage without dedicated GPU - Comparing cloud vs local model quality
Core Entry Points: - aifred/state.py - Main state management, send_message()
Automatik Mode: - aifred/lib/conversation_handler.py - Decision logic, RAG context
Web Research Pipeline: - aifred/lib/research/orchestrator.py - Top-level orchestration (incl. URL ranking) - aifred/lib/research/cache_handler.py - Session cache - aifred/lib/research/query_processor.py - Query optimization + search - aifred/lib/research/url_ranker.py - LLM-based URL relevance ranking (NEW) - aifred/lib/research/scraper_orchestrator.py - Parallel scraping - aifred/lib/research/context_builder.py - Context building + LLM
Document RAG Pipeline: - aifred/lib/document_store.py - ChromaDB Documents collection — token-accurate chunking (Qwen3 tokenizer, char fallback), delete + upsert for clean re-indexing, dual embedding functions (index/query mode), folder filter + chunk-neighbor retrieval in search() - aifred/lib/file_manager.py - Single source of truth for file-system + ChromaDB operations (used by Document UI and Workspace plugin): list/create/delete/rename/index/deindex/search/list_orphaned
Supporting Modules: - aifred/lib/vector_cache.py - ChromaDB semantic cache for web research, includes OllamaEmbeddingFunction with mode-switch (index→GPU+warm, query→CPU) - aifred/lib/agent_memory.py - Per-agent ChromaDB memory collections - aifred/lib/tool_output_cap.py - Token budget for tool results (75% input ratio, JSON-aware truncation, ContextVar-based) - aifred/lib/debug_format.py - Tool-call/result formatting for the debug panel (key=value rendering, agent prefix, token count) - aifred/lib/intent_detector.py - Temperature selection - aifred/lib/agent_tools.py - Web search, scraping, context building
The Automatik-LLM uses dedicated prompts in prompts/{de,en}/automatik/ for various decisions:
| Prompt | Language | When Called | Purpose |
|---|---|---|---|
intent_detection.txt | EN only | Pre-processing | Determine query intent (FACTUAL/MIXED/CREATIVE) and addressee |
research_decision.txt | DE + EN | Phase 3 | Decide if web research needed + generate queries |
followup_intent_detection.txt | DE + EN | Cache follow-up | Detect if user wants more details from cache |
url_ranking.txt | EN only | Quick-Search Phase 2.5 | Rank URLs by relevance (output: numeric indices) |
Language Rules: - EN only: Output is structured/numeric (parseable), language doesn't affect result - DE + EN: Output depends on user's language or requires semantic understanding in that language
Prompt Directory Structure:
prompts/
├── de/
│ └── automatik/
│ ├── research_decision.txt # German queries for German users
│ └── followup_intent_detection.txt
└── en/
└── automatik/
├── intent_detection.txt # Universal intent detection
├── research_decision.txt # English queries (Query 1 always EN)
├── followup_intent_detection.txt
└── url_ranking.txt # Numeric output (indices)
---
AIfred provides a complete REST API for programmatic control - enabling remote operation via Cloud, automation systems, and third-party integrations.
The API enables pure remote control - messages are injected into browser sessions, the browser performs the full processing (Intent Detection, Multi-Agent, Research, etc.). The user sees everything live in the browser.
| Endpoint | Method | Description |
|---|---|---|
/api/health | GET | Health check with backend status |
/api/settings | GET | Retrieve global settings |
/api/settings | PATCH | Update global settings (backend, models, TTS, …) |
/api/session/config | POST | Update per-session config (agent, mode, research mode) |
/api/models | GET | List available models |
/api/chat/inject | POST | Inject message into browser session |
/api/chat/status | GET | Check if inference is running (is_generating, message_count) |
/api/chat/history | GET | Get chat history |
/api/chat/clear | POST | Clear chat history |
/api/sessions | GET | List all browser sessions |
/api/system/restart-ollama | POST | Restart Ollama |
/api/system/restart-aifred | POST | Restart AIfred |
/api/calibrate | POST | Start context calibration |
Global vs per-session: /api/settings covers truly global settings (backend, models, TTS voices, language, sampling). Anything that belongs to a specific conversation — agent, multi-agent mode, research mode, symposion participants — goes through /api/session/config and is stored in the session file as SSOT.
AIfred offers 4 different research modes, each using different strategies depending on requirements. Here's the detailed workflow for each mode:
curl -X POST http://localhost:8002/api/chat/inject \ -H "Content-Type: application/json" \ -d '{"message": "What is Python?", "device_id": "abc123..."}'
创新的多智能体协作框架,思维链和辩论模式设计合理。但生态成熟度待提升,建议关注长期维护动态。
该工具使用 NOASSERTION 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
📄 NOASSERTION — 请查阅原始协议条款了解具体使用限制。
AI Skill Hub 点评:AIfred智能多代理助手 的核心功能完整,质量良好。对于AI爱好者来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | AIfred-Intelligence |
| 原始描述 | 开源AI工作流:🤵 AIfred-Intelligence — self-hosted Multi-Agent Assistant with Debate Modes (Sy。⭐32 · Python |
| Topics | 多智能体工作流编排思维链自托管Python |
| GitHub | https://github.com/Peuqui/AIfred-Intelligence |
| License | NOASSERTION |
| 语言 | Python |
收录时间:2026-05-20 · 更新时间:2026-05-22 · License:NOASSERTION · AI Skill Hub 不对第三方内容的准确性作法律背书。