经 AI Skill Hub 精选评估,一环AI智能框架 获评「推荐使用」。这款MCP工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.5 分,适合有一定技术背景的用户使用。
一环AI智能框架 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
一环AI智能框架 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/aantich/oneringai
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"--ai----": {
"command": "npx",
"args": ["-y", "oneringai"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 一环AI智能框架 执行以下任务... Claude: [自动调用 一环AI智能框架 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"__ai____": {
"command": "npx",
"args": ["-y", "oneringai"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
A unified AI agent library with multi-provider support for text generation, image/video generation, audio (TTS/STT), and agentic workflows.
AgentContextNextGenSuspendSignal, resume hours/days later with Agent.hydrate()userId once, flows automatically to all tool executions and session metadataAgent with plugins insteadAgent with WorkingMemoryPluginNextGenAgent with search toolsshowInUI)MemoryPluginNextGen (self-learning memory). Still works unchanged.MemoryPluginNextGen. Still works unchanged.MemoryPluginNextGen + MemoryWritePluginNextGen + 11 memory_* tools — brain-like entity/fact store with three-principal permissions, semantic search, graph queries, LLM-synthesised profiles that evolve from observations, user-driven behavior rules, optional background ingestion via SessionIngestorPluginNextGenconfigure() callcreateExecutionRecorder() — replaces manual hook wiringSimpleScheduler for interval/one-time schedules, EventEmitterTrigger for webhook/queue-driven execution{{DATE}}, {{AGENT_ID}}, {{RANDOM:1:10}} and custom {{COMMAND:arg}} in agent instructions — extensible registry with async supportv0.2.0 — Multi-User Support: SetuserIdonce on an agent and it automatically flows to all tool executions, OAuth token retrieval, session metadata, and connector scoping. Combine withidentitiesand access policies for complete multi-tenant isolation. See Multi-User Support and Auth Identities in the User Guide.
Text-to-Speech and Speech-to-Text with multiple providers:
import { TextToSpeech, SpeechToText } from '@everworker/oneringai';
// === Text-to-Speech ===
const tts = TextToSpeech.create({
connector: 'openai',
model: 'tts-1-hd', // or 'gpt-4o-mini-tts' for instruction steering
voice: 'nova',
});
// Synthesize to file
await tts.toFile('Hello, world!', './output.mp3');
// Synthesize with options
const audio = await tts.synthesize('Speak slowly', {
format: 'wav',
speed: 0.75,
});
// Introspection
const voices = await tts.listVoices();
const models = tts.listAvailableModels();
// === Speech-to-Text ===
const stt = SpeechToText.create({
connector: 'openai',
model: 'whisper-1', // or 'gpt-4o-transcribe'
});
// Transcribe
const result = await stt.transcribeFile('./audio.mp3');
console.log(result.text);
// With timestamps
const detailed = await stt.transcribeWithTimestamps(audioBuffer, 'word');
console.log(detailed.words); // [{ word, start, end }, ...]
// Translation
const english = await stt.translate(frenchAudio);
Streaming TTS — for real-time voice applications:
// Stream audio chunks as they arrive from the API
for await (const chunk of tts.synthesizeStream('Hello!', { format: 'pcm' })) {
if (chunk.audio.length > 0) playPCMChunk(chunk.audio); // 24kHz 16-bit LE mono
if (chunk.isFinal) break;
}
// VoiceStream wraps agent text streams with interleaved audio events
const voice = VoiceStream.create({
ttsConnector: 'openai', ttsModel: 'tts-1-hd', voice: 'nova',
});
for await (const event of voice.wrap(agent.stream('Tell me a story'))) { ... }
Available Models: - TTS: OpenAI (tts-1, tts-1-hd, gpt-4o-mini-tts), Google (gemini-tts) - STT: OpenAI (whisper-1, gpt-4o-transcribe), Groq (whisper-large-v3 - 12x cheaper!)
npm install @everworker/oneringai
Part 0. One Lib to Rule Them All: Why We Built OneRingAI: introduction and architecture overview
Part 1. Your AI Agent Forgets Everything. Here’s How We Fixed It.: context management plugins
import { Connector, Agent, Vendor } from '@everworker/oneringai';
// 1. Create a connector (authentication)
Connector.create({
name: 'openai',
vendor: Vendor.OpenAI,
auth: { type: 'api_key', apiKey: process.env.OPENAI_API_KEY! },
});
// 2. Create an agent
const agent = Agent.create({
connector: 'openai',
model: 'gpt-4.1',
});
// 3. Run
const response = await agent.run('What is the capital of France?');
console.log(response.output_text);
// Output: "The capital of France is Paris."
Enterprise web scraping with automatic fallback and bot protection bypass:
import { Connector, ScrapeProvider, ConnectorTools, Services, Agent, tools } from '@everworker/oneringai';
// Create ZenRows connector for bot-protected sites
Connector.create({
name: 'zenrows',
serviceType: Services.Zenrows,
auth: { type: 'api_key', apiKey: process.env.ZENROWS_API_KEY! },
baseURL: 'https://api.zenrows.com/v1',
});
// Option 1: Use ScrapeProvider directly
const scraper = ScrapeProvider.create({ connector: 'zenrows' });
const result = await scraper.scrape('https://protected-site.com', {
includeMarkdown: true,
vendorOptions: {
jsRender: true, // JavaScript rendering
premiumProxy: true, // Residential IPs
},
});
// Option 2: Use web_scrape tool with Agent via ConnectorTools
const scrapeTools = ConnectorTools.for('zenrows');
const agent = Agent.create({
connector: 'openai',
model: 'gpt-4.1',
tools: [...scrapeTools, tools.webFetch],
});
// web_scrape auto-falls back: native → API
await agent.run('Scrape https://example.com and summarize');
Supported Scrape Providers: - ZenRows - Enterprise scraping with JS rendering, residential proxies, anti-bot bypass - Jina Reader - Clean content extraction with AI-powered readability - Firecrawl - Web scraping with JavaScript rendering - ScrapingBee - Headless browser scraping with proxy rotation
The Agent class is the primary agent type, supporting all features through composable plugins:
import { Agent, createFileContextStorage } from '@everworker/oneringai';
// Create storage for session persistence
const storage = createFileContextStorage('my-assistant');
const agent = Agent.create({
connector: 'openai',
model: 'gpt-4.1',
userId: 'user-123', // Flows to all tool executions automatically
identities: [ // Only these connectors visible to tools
{ connector: 'github' },
{ connector: 'slack' },
],
tools: [weatherTool, emailTool],
context: {
features: {
workingMemory: true, // Store/retrieve data across turns
inContextMemory: true, // Key-value pairs directly in context
persistentInstructions: true, // Agent instructions that persist to disk
},
agentId: 'my-assistant',
storage,
},
});
// Run the agent
const response = await agent.run('Check weather and email me the report');
console.log(response.output_text);
// Save session for later
await agent.context.save('session-001');
Features: - 🔧 Plugin Architecture - Enable/disable features via context.features - 💾 Session Persistence - Save/load full state with ctx.save() and ctx.load() - 📝 Working Memory - Store findings with automatic eviction - 📌 InContextMemory - Key-value pairs visible directly to LLM - 🔄 Persistent Instructions - Agent instructions that persist across sessions
Extend tool execution with custom behavior through a pluggable pipeline architecture. Add logging, analytics, UI updates, permission prompts, or any custom logic:
import { Agent, LoggingPlugin, type IToolExecutionPlugin } from '@everworker/oneringai';
const agent = Agent.create({
connector: 'openai',
model: 'gpt-4.1',
tools: [weatherTool],
});
// Add built-in logging plugin
agent.tools.executionPipeline.use(new LoggingPlugin());
// Create a custom plugin
const analyticsPlugin: IToolExecutionPlugin = {
name: 'analytics',
priority: 100,
async beforeExecute(ctx) {
console.log(`Starting ${ctx.toolName}`);
},
async afterExecute(ctx, result) {
const duration = Date.now() - ctx.startTime;
trackToolUsage(ctx.toolName, duration);
return result; // Must return result (can transform it)
},
async onError(ctx, error) {
reportError(ctx.toolName, error);
return undefined; // Let error propagate (or return value to recover)
},
};
agent.tools.executionPipeline.use(analyticsPlugin);
Plugin Lifecycle: 1. beforeExecute - Modify args, abort execution, or pass through 2. Tool execution 3. afterExecute - Transform results (runs in reverse priority order) 4. onError - Handle/recover from errors
Plugin Context (PluginExecutionContext):
interface PluginExecutionContext {
toolName: string; // Name of the tool being executed
args: unknown; // Original arguments (read-only)
mutableArgs: unknown; // Modifiable arguments
metadata: Map<string, unknown>; // Share data between plugins
startTime: number; // Execution start timestamp
tool: ToolFunction; // The tool being executed
executionId: string; // Unique ID for this execution
}
Built-in Plugins: - LoggingPlugin - Logs tool execution with timing and result summaries
Pipeline Management:
// Add plugin
agent.tools.executionPipeline.use(myPlugin);
// Remove plugin
agent.tools.executionPipeline.remove('plugin-name');
// Check if registered
agent.tools.executionPipeline.has('plugin-name');
// Get plugin
const plugin = agent.tools.executionPipeline.get('plugin-name');
// List all plugins
const plugins = agent.tools.executionPipeline.list();
A brain-like, queryable knowledge store built on the memory layer. Two cooperating context plugins + 11 LLM-callable tools turn the agent into a learning system: it bootstraps a person entity for the user (and optionally an organization entity for their group), injects the evolving user profile + any user-given behavior rules into the system message every turn, and exposes memory_* tools so the LLM can read or write the knowledge graph mid-conversation. Observations flow in via memory_remember (LLM-driven) or SessionIngestorPluginNextGen (passive); incremental profile regeneration synthesises them; the next turn sees the updated profile. No manual prompt engineering for user/agent preferences.
import { Agent, createMemorySystemWithConnectors, InMemoryAdapter } from '@everworker/oneringai';
const memory = createMemorySystemWithConnectors({
store: new InMemoryAdapter(), // or MongoMemoryAdapter for production
connectors: {
embedding: { connector: 'openai', model: 'text-embedding-3-small', dimensions: 1536 },
profile: { connector: 'anthropic', model: 'claude-sonnet-4-6' },
},
});
const agent = Agent.create({
connector: 'anthropic',
model: 'claude-sonnet-4-6',
userId: 'alice', // REQUIRED — memory's owner invariant
context: {
agentId: 'my-assistant',
features: {
memory: true, // reads: profile injection + 5 retrieval tools
memoryWrite: true, // writes: 6 mutation tools (omit for retrieval-only)
},
plugins: {
memory: {
memory,
// groupId: 'team-A', // trusted, from your auth layer
// userProfileInjection: { topFacts: 20, relatedTasks: true },
// groupBootstrap: { displayName: 'Acme', identifiers: [{ kind: 'domain', value: 'acme.com' }] },
},
},
},
});
await agent.run('Remember I prefer concise answers');
// Agent calls memory_remember({subject:"me", predicate:"prefers", value:"concise answers"})
// Fact stored → profile regen fires in background → next turn sees it in the user profile
Key Features: - 🧠 Self-learning — profiles synthesised from facts via incremental regeneration (prior profile + new facts + invalidated IDs → evolved profile) - 🔐 Three-principal permissions — owner / group / world, enforced at the adapter - 📊 Ranked recall — profile + top facts by confidence × recency × predicateWeight × importance - 🕸️ Graph queries — Mongo native $graphLookup when available, iterative BFS fallback - 🔍 Semantic search — over embedded facts (with Atlas Vector Search at scale) - 🧬 Multi-ID entities — lookup by email / slack_id / github_login / domain / any identifier; upsert auto-merges - 📜 Supersession history — corrections archive predecessors; audit chain preserved via archivedOnly: true - 🪧 User-driven behavior rules — memory_set_agent_rule records "be terse" / "reply in Russian" / "your name is Jason" directives, rendered back into the system message every turn (per-user-per-agent scoped) - 🏢 Optional org bootstrap — when groupBootstrap is set, an organization entity is upserted and rendered as a separate "Your Organization Profile" block alongside the user profile - 🛡️ LLM-safe — groupId fixed by host app (never from tool args); ghost-write protection; contextIds auto-downgrade; numeric limits clamped
12 LLM tools (memory_*), split into two opt-in bundles:
Read (via MemoryPluginNextGen, feature flag memory): - memory_recall(subject, include?) — profile + top facts + optional tiers (documents / semantic / neighbors) - memory_graph(start, direction, maxDepth, predicates?) — N-hop traversal - memory_search(query, topK?, filter?) — semantic text search across facts - memory_search_documents(query, mode?, attachedTo?, role?, limit?) — search long-form documents (type='document') by content. Semantic mode matches contentEmbedding; keyword mode is case-insensitive substring over body + title. - memory_find_entity(by, action? ∈ {find, list}) — lookup or list (read-only) - memory_list_facts(subject, predicate?, archivedOnly?) — structured enumeration
Write (via MemoryWritePluginNextGen, feature flag memoryWrite, requires memory: true): - memory_remember(subject, predicate, value?/objectId?/details?, visibility?) — write a fact (atomic or document) - memory_link(from, predicate, to) — write a relational fact - memory_upsert_entity(type, displayName, identifiers, ...) — create or merge an entity by identifier - memory_forget(factId, replaceWith?) — archive or supersede (rate-limited 10/60s/user) - memory_restore(factId) — un-archive (undo for memory_forget) - memory_set_agent_rule(rule, replaces?) — record a user-specific behavior rule for THIS agent
Enable memory: true alone for retrieval-only agents (and pair with SessionIngestorPluginNextGen for passive background learning); enable both flags for agents that write memory deliberately.
Flexible SubjectRef — every tool accepts any of: entity id, "me", "this_agent", {id}, {identifier: {kind, value}}, {surface: "..."}.
Storage backends: InMemoryAdapter (zero deps, dev/tests), MongoMemoryAdapter + RawMongoCollection (production servers — supports native $graphLookup + Atlas Vector Search via ensureVectorSearchIndexes()), MongoMemoryAdapter + MeteorMongoCollection (Meteor apps — reactive publications). Custom adapters implement IMemoryStore.
See the USER_GUIDE Self-Learning Memory section for the user-guide-level walkthrough, docs/MEMORY_GUIDE.md for the full conceptual model + adapter setup + signal ingestion, docs/MEMORY_API.md for the MemorySystem API reference, and docs/MEMORY_PERMISSIONS.md for the permission model.
统一的MCP框架设计思路良好,多LLM支持实用性强。但项目热度一般,需观察社区反馈和维护频率
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
AI Skill Hub 点评:一环AI智能框架 的核心功能完整,质量良好。对于Claude Desktop / Claude Code 用户来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | oneringai |
| 原始描述 | 开源MCP工具:One lib to rule them all (gen ai)。⭐57 · TypeScript |
| Topics | MCPAI代理LLM集成多模型支持TypeScript |
| GitHub | https://github.com/aantich/oneringai |
| License | MIT |
| 语言 | TypeScript |
收录时间:2026-05-19 · 更新时间:2026-05-20 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端