Logo widemem.ai

widemem.ai

Cộng đồng
remete618

Next-gen AI memory layer with importance scoring, temporal decay, hierarchical memory, and YMYL prioritization

Nhà phát hànhremete618
Kho mãwidemem-ai
Ngôn ngữPython
Bản fork
15
Sao
49
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Giấy phépApache-2.0
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    widemem.ai cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    49 sao và 15 bản fork từ kho mã được liên kết.

widemem.ai

        .__    .___                                        .__
__  _  _|__| __| _/____   _____   ____   _____      _____  |__|
\ \/ \/ /  |/ __ |/ __ \ /     \_/ __ \ /     \     \__  \ |  |
 \     /|  / /_/ \  ___/|  Y Y  \  ___/|  Y Y  \     / __ \|  |
  \/\_/ |__\____ |\___  >__|_|  /\___  >__|_|  / /\ (____  /__|
                \/    \/      \/     \/      \/  \/      \/

  Goldfish memory? ¬_¬ Fixed.

PyPI version PyPI downloads CI OpenSSF Scorecard License Python

Background reading:

Because your AI deserves better than amnesia. ¬_¬

An open-source AI memory layer that actually remembers what matters. Local-first, batteries-included, and opinionated about not forgetting your user's blood type.

Look, AI memory has come a long way. Context windows are bigger, RAG pipelines are everywhere, and most frameworks have some form of "remember this for later." It's not terrible anymore. But it's not great either. Most memory systems treat every fact the same: your user's blood type sits next to what they had for lunch, decaying at the same rate, with the same priority. Contradictions pile up silently. There's no sense of "this matters more than that." And when you need to remember something from three months ago that actually matters? Good luck.

widemem is for when "good enough" isn't good enough.

widemem gives your AI a real memory: one that scores what matters, forgets what doesn't, and absolutely refuses to lose track of someone's prescription medication just because 72 hours passed and the decay function got bored. Think of it as long-term memory for LLMs, except it actually works and doesn't require a PhD to set up.

  • Memories that know their place. Importance scoring (1-10) plus time decay means "has a peanut allergy" always outranks "had pizza on Tuesday". As it should. Not all memories are created equal, and your retrieval system should know the difference between a life-threatening allergy and a lunch preference.
  • One brain, three layers. Facts roll up into summaries, summaries into themes. Ask "where does Alice live" and get the fact. Ask "tell me about Alice" and get the big picture. Your AI can zoom in and zoom out without breaking a sweat or making a second API call.
  • YMYL or GTFO. Health, legal, and financial facts get VIP treatment: higher importance floors, immunity from decay, and forced contradiction detection. Two-stage classification (regex for obvious matches, LLM for implied content) catches "my chest hurts" as health while ignoring "the bank of the river." Read more ↗
  • Conflict resolution that isn't stupid. Add "I live in Boston" after "I live in San Francisco" and the system doesn't just blindly append both. It detects the contradiction, resolves it in a single LLM call, and updates the memory. Like a reasonable adult would.
  • Graceful memory-miss handling. Every retrieval returns a confidence level (HIGH / MODERATE / LOW / NONE) so your agent knows when memory has nothing relevant and can abstain instead of guessing. Three modes: strict (refuse on low confidence), helpful (hedge with related context), creative (offer to guess, with a warning). For high-stakes contexts where a wrong answer is worse than no answer.
  • Local by default, cloud if you want. SQLite plus FAISS out of the box. No accounts, no API keys for storage, no "please sign up for our enterprise plan to store more than 100 memories". Plug in Qdrant or any cloud provider when you're ready. Or don't. We won't guilt-trip you.

Architecture


TL;DR

Seven features, one library. Here's what widemem does that most memory systems don't:

#FeatureWhat it doesWhy it matters
1Batch conflict resolutionSingle LLM call for all facts vs. existing memoriesN facts equals 1 API call, not N. Your wallet will thank you.
2Importance + decayFacts rated 1-10, with exponential/linear/step decayOld trivia fades. Critical facts don't.
3Hierarchical memoryFacts to summaries to themes, auto-routedBroad questions get themes, specific ones get facts.
4Active retrievalContradiction detection plus clarifying questions"Wait, you said you live in San Francisco AND Boston?"
5YMYL prioritizationHealth/legal/financial facts are untouchableSome things you just don't forget.
6Confidence & abstentionReturns confidence level for every retrieval; abstains on memory missLets the agent fall back to "I don't have that" instead of guessing
7Retrieval modesfast / balanced / deep, pick your accuracy-cost tradeoffSame system, three price points. You pick.

600+ tests. Zero external services required. SQLite plus FAISS by default. Plug in OpenAI, Anthropic, Ollama, Qdrant, or sentence-transformers as needed.


Table of Contents


Install

bash
pip install widemem-ai[faiss]

The [faiss] extra installs the default local vector store. Plain pip install widemem-ai installs the core only; you'll need at least one vector backend ([faiss] or [qdrant]) before WideMemory() will work. Python 3.10+ required.

Optional providers

bash
pip install widemem-ai[anthropic]             # Claude LLM provider
pip install widemem-ai[ollama]                # Local LLM via Ollama
pip install widemem-ai[sentence-transformers] # Local embeddings (no API key needed)
pip install widemem-ai[qdrant]                # Qdrant vector store
pip install widemem-ai[mcp]                   # Model Context Protocol server
pip install widemem-ai[all]                   # Everything. You want it all? You got it.

Quick Start

Five lines to a working memory system. Six if you count the import.

python
from widemem import WideMemory, MemoryConfig

memory = WideMemory()

# Add memories
result = memory.add("I live in San Francisco and work as a software engineer", user_id="alice")

# Search
results = memory.search("where does alice live", user_id="alice")
for r in results:
    print(f"{r.memory.content} (score: {r.final_score:.2f})")

# Update happens automatically. Add contradicting info and the resolver handles it.
memory.add("I just moved to Boston", user_id="alice")

# Delete
memory.delete(results[0].memory.id)

# History audit trail
history = memory.get_history(results[0].memory.id)

That's it. No 47-step setup guide. No YAML files. No existential dread. Your AI just went from goldfish to elephant in six lines.

WideMemory also works as a context manager if you're the responsible type:

python
with WideMemory() as memory:
    memory.add("I live in San Francisco", user_id="alice")
    results = memory.search("where does alice live", user_id="alice")
# Connection closed automatically. You're welcome.

Configuration

Most defaults are sane, so a minimal config is usually enough:

python
from widemem import WideMemory, MemoryConfig
from widemem.core.types import LLMConfig, ScoringConfig, YMYLConfig

config = MemoryConfig(
    llm=LLMConfig(provider="openai", model="gpt-4o-mini"),
    scoring=ScoringConfig(decay_rate=0.01),
    ymyl=YMYLConfig(enabled=True),
    history_db_path="~/.widemem/history.db",
)
memory = WideMemory(config)

Full reference for every field, default, and tradeoff: docs/configuration.md.


Scoring & Decay

The Formula

Every search result gets a combined score. It's not rocket science, but it's close enough:

final_score = (similarity_weight * similarity) + (importance_weight * importance) + (recency_weight * recency)
final_score *= topic_boost   # if topic weights are set
  • similarity: cosine similarity from vector search (0-1)
  • importance: normalized from the 1-10 rating assigned at extraction (0-1)
  • recency: time decay score (0-1), computed by the decay function
  • topic_boost: multiplier from topic weights (default 1.0)

Decay Functions

Control how memories fade over time. Like real memories, but configurable. Unlike a goldfish, you can turn decay off entirely.

FunctionFormulaUse Case
exponentiale^(-rate * days)Smooth, natural decay (default)
linearmax(1 - rate * days, 0)Predictable, linear drop-off
step1.0 / 0.7 / 0.4 / 0.1 at 7/30/90 daysDiscrete tiers
noneAlways 1.0Elephants never forget
python
# Fast decay: what happened last week? who cares
ScoringConfig(decay_function=DecayFunction.EXPONENTIAL, decay_rate=0.05)

# Slow decay: memories stay relevant longer
ScoringConfig(decay_function=DecayFunction.EXPONENTIAL, decay_rate=0.005)

# No decay: all memories equally fresh forever
ScoringConfig(decay_function=DecayFunction.NONE)

Providers

TypeProviderInstallOne-line example
LLMOpenAI (default)pip install widemem-ai[faiss]LLMConfig(provider="openai", model="gpt-4o-mini")
LLMAnthropicpip install widemem-ai[anthropic]LLMConfig(provider="anthropic", model="claude-haiku-4-5-20251001")
LLMOllama (local)pip install widemem-ai[ollama]LLMConfig(provider="ollama", model="llama3")
EmbeddingOpenAI (default)pip install widemem-ai[faiss]EmbeddingConfig(provider="openai", model="text-embedding-3-small", dimensions=1536)
EmbeddingSentence Transformerspip install widemem-ai[sentence-transformers]EmbeddingConfig(provider="sentence-transformers", model="all-MiniLM-L6-v2", dimensions=384)
Vector storeFAISS (default)pip install widemem-ai[faiss]VectorStoreConfig(provider="faiss")
Vector storeQdrantpip install widemem-ai[qdrant]VectorStoreConfig(provider="qdrant", path="./qdrant_data")

For Ollama, pair with sentence-transformers if you want fully local: EmbeddingConfig(provider="sentence-transformers", model="all-MiniLM-L6-v2", dimensions=384). Set QDRANT_URL env var for remote Qdrant.


YMYL (Your Money or Your Life)

Some facts are more equal than others. YMYL prioritization ensures that critical facts about health, finances, legal matters, and safety are never lost, never deprioritized, and never quietly forgotten because the decay function decided Tuesday was a good day to forget someone's insulin dosage.

For the full deep dive on how YMYL works, edge cases, and limitations, see YMYL.md.

python
config = MemoryConfig(
    ymyl=YMYLConfig(
        enabled=True,
        categories=["health", "medical", "financial", "legal", "safety", "insurance", "tax", "pharmaceutical"],
        min_importance=8.0,          # Floor importance for strong YMYL facts
        decay_immune=True,           # Strong YMYL facts don't decay over time
        force_active_retrieval=True, # Force contradiction detection for strong YMYL facts
    ),
)

Two-Stage Semantic Classification

Not every mention of "bank" means someone's talking about their finances. And "my chest has been hurting for three days" is a health concern even though it contains no medical keyword. widemem uses a two-stage pipeline to handle both cases:

StageHow it worksExample
1. Regex (fast)Multi-word strong patterns fire immediately"blood pressure" -> health, "401k" -> financial
2. LLM (semantic)LLM classifies during fact extraction (zero extra API calls)"my chest hurts" -> health, "bank of the river" -> null

Strong regex matches get immediate YMYL protection. For everything else, the LLM decides based on context. This catches implied YMYL content ("I stopped taking my pills" -> medical) and rejects false positives ("The Doctor is a great TV show" -> not medical).

For the full breakdown with accuracy data and examples, see Your AI Memory Can't Tell a River Bank from a Savings Account.

ClassificationImportanceDecay immunityActive retrieval
YMYL (regex or LLM)Floor at 8.0YesForced
Not YMYLUnchangedNoNo

YMYL Categories

8 categories, each with strong (unambiguous) and weak (context-dependent) patterns:

CategoryStrong PatternsWeak Patterns
healthblood pressure, diabetes diagnosis, mental healthdoctor, hospital, medication, anxiety
medicallab results, medical condition, treatment planclinic, vaccine, MRI, scan
financialbank account, savings account, credit score, 401kbank, loan, debt, salary
legalpower of attorney, child custody, court orderlawyer, contract, divorce
safetyemergency contact, blood type, epipen, DNR orderevacuation, flood
insuranceinsurance policy, insurance premiuminsurance, coverage, claim
taxtax return, W-2, 1099, IRS auditdeduction, filing
pharmaceuticalside effect, drug interactiondrug, dosage, prescription

You can enable a subset if you only care about some categories:

python
YMYLConfig(enabled=True, categories=["health", "medical", "financial"])

Topic Weights (related)

Boost or suppress specific topics during retrieval as a multiplier on final_score:

python
config = MemoryConfig(
    topics=TopicConfig(
        weights={"python": 2.0, "cooking": 0.5},
        custom_topics=["python", "machine learning"],  # Extraction hints
    ),
)

Matching is case-insensitive substring. Values above 1.0 boost, below 1.0 suppress. custom_topics are passed to the LLM during extraction as a hint.


Hierarchical Memory

Three-tier memory system. Facts are great, but sometimes you need the big picture.

python
config = MemoryConfig(enable_hierarchy=True)
memory = WideMemory(config)

# Add many facts
for msg in conversation_history:
    memory.add(msg, user_id="alice")

# Trigger summarization (groups related facts, creates summaries and themes)
memory.summarize(user_id="alice")

# Broad queries return themes, specific queries return facts
results = memory.search("tell me about alice")        # Returns themes
results = memory.search("where does alice live")      # Returns facts

# Filter by tier
from widemem.core.types import MemoryTier
results = memory.search("alice", tier=MemoryTier.SUMMARY)

Tiers

TierDescriptionQuery Type
factIndividual extracted factsSpecific questions ("what is X?")
summaryGroups of related facts summarizedModerate scope ("alice's work")
themeHigh-level themes across summariesBroad questions ("tell me about alice")

Query routing uses keyword heuristics (no extra LLM call) with a fallback chain. If the preferred tier has no results, it falls back to the next tier. No results left behind.


Active Retrieval

Your AI shouldn't silently overwrite "lives in San Francisco" with "lives in Boston" without at least raising an eyebrow. Active retrieval detects contradictions and ambiguities, then asks clarifying questions via callbacks. Read more ↗

python
config = MemoryConfig(
    enable_active_retrieval=True,
    active_retrieval_threshold=0.6,  # Similarity threshold for conflict detection
)
memory = WideMemory(config)

def handle_clarification(clarifications):
    for c in clarifications:
        print(f"Conflict: {c.question}")
        print(f"  Old: {c.existing_memory}")
        print(f"  New: {c.new_fact}")
    # Return None to abort the add, or a list of answers to proceed
    return ["User moved to Boston"]

result = memory.add(
    "I just moved to Boston",
    user_id="alice",
    on_clarification=handle_clarification,
)

if result.has_clarifications:
    print(f"Resolved {len(result.clarifications)} conflicts")

Callback behavior

  • on_clarification receives a list of Clarification objects
  • Return None to abort the add entirely (the nuclear option)
  • Return a list of strings (answers) to proceed with the add
  • If no callback is provided, the add proceeds and clarifications are returned in AddResult.clarifications for you to deal with later. Or never. We won't judge.

Temporal Search

Filter and rank memories by time. Because sometimes you only care about what happened recently.

python
from datetime import datetime, timedelta

now = datetime.utcnow()

# Only memories from the last week
results = memory.search(
    "what happened recently",
    user_id="alice",
    time_after=now - timedelta(days=7),
)

# Only memories before January 2026
results = memory.search(
    "old preferences",
    user_id="alice",
    time_before=datetime(2026, 1, 1),
)

# Combined range
results = memory.search(
    "december events",
    user_id="alice",
    time_after=datetime(2025, 12, 1),
    time_before=datetime(2025, 12, 31),
)

Uncertainty & Confidence

Every retrieval returns a RetrievalConfidence level (HIGH, MODERATE, LOW, NONE) based on how relevant the top results are. Your agent can use this to abstain on low-confidence queries instead of guessing from irrelevant memories. Three response modes (strict, helpful, creative) let you tune the abstention behavior to the use case. Read more ↗

Every search returns a confidence level:

python
response = mem.search("What's Alice's favorite movie?", user_id="alice")

response.confidence     # RetrievalConfidence.NONE: nothing relevant found
response.has_relevant   # False

# But it still works like a list (backward compatible):
for r in response:
    print(r.memory.content)

Three uncertainty modes

python
# Strict: refuses to answer if unsure
mem = WideMemory(config=MemoryConfig(uncertainty_mode="strict"))

# Helpful (default): "I don't have that, but here's what I do know..."
mem = WideMemory(config=MemoryConfig(uncertainty_mode="helpful"))

# Creative: "I can guess if you want, fair warning, it might be wrong"
mem = WideMemory(config=MemoryConfig(uncertainty_mode="creative"))

Pin important memories

When a user explicitly tells you something important, pin it so it sticks:

python
# Normal add: importance decided by LLM (might be 3-6)
mem.add("I had pasta for lunch", user_id="alice")

# Pin: stored with importance 9, resistant to decay
mem.pin("My blood type is O negative", user_id="alice")

Frustration recovery

When users say "I told you this!", widemem detects the frustration, extracts the fact, and offers to pin it:

python
from widemem.retrieval.uncertainty import build_frustration_response

response = build_frustration_response(
    "I told you my blood type is O negative!",
    confidence=RetrievalConfidence.NONE,
    mode=UncertaintyMode.HELPFUL,
)
# response = {
#     "action": "recover_and_pin",
#     "message": "Sorry about that. I'm saving this now with high importance.",
#     "pin_fact": "my blood type is O negative",
#     "pin_importance": 9.0,
# }

Retrieval Modes

Not every query needs the same depth. A casual chatbot doesn't need 50 retrieved memories. A medical assistant does. widemem lets you choose:

python
from widemem import WideMemory, MemoryConfig, RetrievalMode

# Set at config level (default for all queries)
mem = WideMemory(config=MemoryConfig(retrieval_mode="balanced"))

# Override per query when needed
results = mem.search("critical question", mode=RetrievalMode.DEEP)
ModeMemories retrieved~TokensBest for
fast10~150Chatbots, casual assistants
balanced (default)25~500Most production apps
deep50~1,500Healthcare, legal, enterprise

Each mode also adjusts the internal candidate pool size and similarity boost strength. balanced is the sweet spot for most use cases. Enough context for good answers without burning tokens.


History & Audit Trail

Every write to a stored memory is logged to SQLite: adds, updates, deletes, imports, and the importance change behind pin(). Each entry carries the action, a UTC timestamp, and the content on both sides, so a record can be reconstructed from the log after the memory itself is gone.

python
history = memory.get_history(memory_id)
for entry in history:
    print(f"{entry.timestamp}: {entry.action.value}")
    if entry.old_content:
        print(f"  From: {entry.old_content}")
    if entry.new_content:
        print(f"  To: {entry.new_content}")

What the log covers today is what changed and when. Entries are not attributed to a caller, so it answers "what happened to this memory" and not "who did it". Reads and searches are not recorded, only writes. Retention is purge_expired(); ttl_days hides old memories from search and leaves them on disk.


Batch Conflict Resolution

When new facts are added, widemem finds related existing memories and sends everything to the LLM in a single call. The LLM decides for each fact whether to ADD (new), UPDATE (modify existing), DELETE (contradicted), or NONE (duplicate).

This is the main architectural improvement over per-fact approaches. One call instead of N. The LLM sees the full context and can make better decisions. Your API bill sees fewer line items.


Prompt-Injection Sanitizer

Memory content gets fed back into LLM prompts at extraction, conflict resolution, summarization, and answer time. Hostile content stored once can poison every later call. widemem strips well-known prompt-injection patterns before content reaches the LLM:

  • Direct instruction overrides (ignore previous instructions, disregard the rules, forget what I said)
  • System-prompt tags (<system>, <|im_start|>, [system])
  • Role markers at line start (system:, assistant:)
  • Common jailbreak vocabulary (DAN mode, developer mode)
  • Memory-targeted destructive actions (delete all memories)

Conservative by design: only the most well-established attack patterns are matched, so legitimate clinical or operational content like "ignore all previous medications" or "the patient often forgets everything by morning" passes through untouched.

python
from widemem.security import detect_injection, sanitize

cats = detect_injection("Please ignore all previous instructions.")
# ["instruction-override"]

sanitized, found = sanitize("<system>do harmful stuff</system>")
# sanitized = "[REDACTED]do harmful stuff[REDACTED]"
# found = ["system-tag", "system-tag"]

The sanitizer runs automatically inside LLMExtractor.extract(). This is a baseline defense, not a complete solution: defense-in-depth still requires output validation, structured prompts that distinguish data from instruction, and provider-side guardrails.


Self-Supervised Extraction

widemem can collect extraction training pairs (collect_extractions=True in MemoryConfig) and let you distill a small local model from them, falling back to the LLM when the small model's confidence is low. Code in widemem/extraction/collector.py. Training scripts under scripts/.

Collection is off by default and opt-in, because it persists raw, pre-sanitization input text (a PII risk). ExtractionCollector stays disabled unless you pass enabled=True or set WIDEMEM_COLLECT_EXTRACTIONS=1; while disabled it opens no database and every operation is a no-op.


API Reference

Full method signatures, parameters, and return types: docs/api.md.

The most-used surface area:

MethodDescription
add(text, user_id, ...)Extract and store memories. Returns AddResult.
search(query, user_id, top_k, mode, ...)Search memories. Returns SearchResult (list-compatible, with .confidence).
pin(text, user_id, importance=9.0)Store memory with elevated importance.
get(memory_id)Get a single memory by ID.
delete(memory_id)Delete a memory by ID.
summarize(user_id, force)Trigger hierarchical summarization.

Claude Code Skill

Try widemem directly in Claude Code with the official memory skill.

Install

bash
pip install widemem-ai[mcp,sentence-transformers]

Available commands

CommandDescription
/mem search <query>Semantic search across all memories
/mem add <text>Store a fact (with quality gates)
/mem pin <text>Pin critical fact with high importance
/mem statsMemory count and health check
/mem exportExport all memories as JSON
/mem reflectFull memory audit (duplicates, contradictions, staleness)

Skill repo

Full setup instructions and source: widemem-skill.


MCP Server

widemem ships an MCP server for Claude Desktop, Cursor, or any MCP-compatible client.

bash
pip install widemem-ai[mcp]
python -m widemem.mcp_server

Tools exposed: widemem_add, widemem_search, widemem_delete, widemem_count, widemem_health. Configure providers via WIDEMEM_LLM_PROVIDER, WIDEMEM_EMBEDDING_PROVIDER, etc.

Full setup, env vars, and Claude Desktop config: docs/mcp.md.


Development

bash
git clone https://github.com/remete618/widemem-ai
cd widemem-ai
pip install -e ".[dev,faiss]"
pytest

600+ tests. They all pass. We checked.


Benchmarks

Measured on the full 1,540-question LoCoMo benchmark, v1.5.0:

MetricResult
Overall accuracy55.15% (independent GPT-4o judge; 56.32% self-graded)
Context per query~213 tokens (vs ~26k for full-context stuffing)

Mid-pack accuracy at a fraction of the token cost: reference systems spend 1,700 to 26,000 tokens per query. Per-category labels published before 2026-07-06 had single-hop and multi-hop transposed; the multi-hop leadership claim is retracted and the correction is logged in docs/HISTORY.md. Full methodology, per-category breakdowns, and reference-system comparisons: widemem.ai/benchmarks.

To re-run it: the harness (benchmark/run_ws1.py, val.py, honest_core.py) and the question split (benchmark/locomo_split.json) are in this repo. The LoCoMo dataset itself is not vendored here, so fetch it from snap-research/locomo into benchmark/locomo-data/ first. Published result files are not committed.


Roadmap

Tracked publicly as GitHub issues. Vote with reactions to prioritize. Issues tagged good first issue are ideal entry points for new contributors. Each carries a scope, a quality bar, and a 48-hour review SLA in the body.

Audit-grade core

Framework integrations

In flight

What we are explicitly not building: 20-provider integration matrix, additional vector store backends beyond FAISS and Qdrant, hosted multi-tenant service, web UI for memory management, GraphQL API, command-line interface. The 80/20 is the audit-grade core for regulated deployments. Everything else is application code.


Disclaimer & intended use

widemem is developer infrastructure, provided under the Apache License 2.0, as is and without warranty of any kind. It is not medical, legal, tax, or financial advice, not a medical device, and not a substitute for a qualified professional. Its YMYL handling (regex plus LLM classification) is a best-effort safety net, not a guarantee. Keep a human in the loop and verify outputs before relying on them in any high-stakes decision.

You are responsible for your own deployment, the data you store, and meeting the regulatory obligations that apply to you. When you self-host, your data stays in your environment and we receive nothing.

Export note: the software may be subject to export-control and sanctions laws (including the US EAR and OFAC lists). Do not download, use, or re-export it in violation of those laws.

The Apache 2.0 license in LICENSE governs your use of the code. Terms for the hosted service and website are at widemem.ai/terms. LLM provider terms apply to provider API calls.


Contact

Bug reports, feature requests, and unsolicited opinions are all welcome at the GitHub issues page.


License

Apache 2.0. See LICENSE for the full text that nobody reads.


Dùng MCP widemem.ai với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối widemem.ai, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm widemem.ai làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của widemem.ai.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "widemem-ai": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của widemem.ai, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của widemem.ai.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng widemem.ai giúp tôi làm việc này không?
widemem.ai
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng widemem.ai.

Câu hỏi thường gặp

Máy chủ MCP widemem.ai dùng để làm gì?

widemem.ai là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP widemem.ai với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng widemem.ai với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP widemem.ai với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối widemem.ai, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP widemem.ai với TypingMind?

widemem.ai hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP widemem.ai cung cấp những công cụ nào trong TypingMind?

widemem.ai cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP widemem.ai không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu widemem.ai yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇