Skip to main content
Glama
keshrath

agent-knowledge

by keshrath

agent-knowledge

License: MIT Node >= 20 Tests: 563 passing MCP Tools: 6 LongMemEval R@5: 98.8%

AI 코딩 어시스턴트를 위한 세션 간 메모리 및 회상 -- Claude Code, Cursor, OpenCode, Cline, Continue.dev, Aider와 즉시 호환됩니다. Git 동기화 지식 베이스, 하이브리드 의미론적+TF-IDF 검색, 비밀 정보 스크러빙을 포함한 자동 증류 기능을 제공합니다.

벤치마크: longmemeval_s에서 R@5 = 97.2% (sparse) / 98.8% (hybrid), 더 어려운 longmemeval_m 분할에서 86.0% (sparse) / 88.4% (hybrid) -- 공개 LongMemEval 학술 벤치마크(Wu et al. 2024, ICLR 2025), 분할당 전체 500개 질문, LLM 없음, API 키 없음, 완전히 오프라인으로 실행됩니다. 논문의 공식 flat-bm25 기준선 대비 +8.6pp ~ +13.2pp R@5 향상(동등한 조건 재현 기준). 전체 카테고리별 표, 재현 지침, 논문 비교 세부 사항은 bench/README.md에 있습니다.

왜 필요한가

AI 코딩 세션은 일시적입니다. 세션이 끝나면 세션이 배운 모든 것(아키텍처 결정, 디버깅 통찰, 프로젝트 컨텍스트)이 사라집니다. 다음 세션은 처음부터 다시 시작합니다.

agent-knowledge는 두 가지 상호 보완적인 시스템으로 이 문제를 해결합니다:

  1. 지식 베이스 -- 세션과 머신을 넘어 지속되는 구조화된 항목(결정, 워크플로우, 프로젝트 컨텍스트)의 Git 동기화 마크다운 저장소.

  2. 세션 검색 -- 모든 코딩 도구의 세션 기록 전체에 대한 TF-IDF 순위 전체 텍스트 검색으로, 에이전트가 어떤 도구를 사용했는지와 관계없이 이전에 무슨 일이 있었는지 회상할 수 있습니다.

Related MCP server: Memory-MCP

지원 도구

모든 주요 AI 코딩 어시스턴트의 세션이 자동으로 검색됩니다. 도구가 설치되어 있으면 해당 세션이 자동으로 나타납니다.

도구

형식

자동 감지 경로

Claude Code

JSONL

~/.claude/projects/

Cursor

JSONL

~/.cursor/projects/*/agent-transcripts/

Codex CLI

JSONL

~/.codex/projects/

Aider

Markdown/JSONL

프로젝트 디렉토리의 .aider.chat.history.md / .aider.llm.history

Continue.dev

JSON

~/.continue/projects/

Cline

JSON

VS Code globalStorage saoudrizwan.claude-dev/tasks/

OpenCode

SQLite

~/.local/share/opencode/opencode.db (또는 $OPENCODE_DATA_DIR)

구성 불필요. 추가 세션 루트는 AGENT_KNOWLEDGE_EXTRA_SESSION_ROOTS 환경 변수(쉼표로 구분된 경로)를 통해 추가할 수 있습니다.

기능

  • 호스트 독립적 세션 검색 -- 모든 주요 AI 코딩 어시스턴트(Claude Code, Cursor, Codex CLI, Aider, Continue.dev, Cline, OpenCode)에 걸친 통합 검색. 호스트 이름이 구성에 고정되지 않습니다. 어댑터 레지스트리는 시작 시 설치된 호스트 루트를 프로브합니다.

  • 하이브리드 검색 -- 의미론적 벡터 유사도와 TF-IDF 키워드 순위의 혼합

  • Git 동기화 지식 베이스 -- YAML frontmatter가 있는 마크다운 저장소, 쓰기 시 자동 커밋 및 푸시

  • 자동 오래됨 감지 -- knowledge_analyze(action: "stale_by_code_activity")는 각 항목 본문에 언급된 파일 경로를 최근 세션 요약의 filesModified와 교차 참조합니다. 항목이 인용한 식별자(인라인 백틱 + 펜스 블록)가 수정된 파일에 존재하는지 확인하는 기호 존재 정밀도 레이어와 함께 작동합니다. 여전히 존재하면 신뢰도 가중치가 ×0.3으로 감소합니다. evergreen: true 항목은 면제됩니다.

  • 검색 공백 추적 -- knowledge_analyze(action: "search_gaps")는 지난 since_days 동안 결과가 없는 쿼리를 토큰-Jaccard 유사도로 그룹화하여 표시합니다. "다음에 어떤 항목을 작성해야 할까?"에 대한 가장 명확한 신호입니다.

  • 섹션 우선순위 컨텍스트 패커 -- knowledge(action: "wakeup")는 토큰 예산(기본 800, token_budget 또는 AGENT_KNOWLEDGE_WAKEUP_BUDGET으로 재정의) 내에서 다중 섹션 번들(identity → active_tasks → recent_decisions → known_gotchas → last_session_summary → top_weighted → semantic_fallback)을 조립합니다. 사용되지 않은 섹션 예산은 이후 섹션에 재분배됩니다.

  • 점수화 + 게이트 프로모터 -- 세션 통찰은 6-신호 가중 점수기와 세 가지 독립 게이트(minScore, minRecallCount, minUniqueQueries)를 통해 승격됩니다. 백그라운드에서 자동 실행, knowledge_admin(action: "promote")로 요청 시 실행, 또는 npm run bench:promote로 오프라인 벤치마킹 가능. 실행마다 감사 가능한 .dreams/YYYY-MM-DD.md 일기를 생성합니다.

  • 플러그형 어댑터 시스템 -- SessionAdapter 인터페이스를 구현하여 새 도구 지원 추가

  • 임베딩 -- 로컬(Hugging Face), OpenAI, Claude/Voyage, 또는 Gemini 제공자

  • 퍼지 매칭 -- Levenshtein 거리를 사용한 오타 허용 검색

  • 6가지 검색 범위 -- 오류, 계획, 구성, 도구, 파일, 결정

  • 6가지 MCP 도구 -- 통합된 작업 기반 인터페이스(knowledge, knowledge_search, knowledge_session, knowledge_graph, knowledge_analyze, knowledge_admin)

  • Evergreen 항목 -- frontmatter의 evergreen: true는 순위에서 항목의 감쇠를 면제하고 승격 시 추가 전용으로 만듭니다. 대시보드는 이러한 카드에 압정 배지를 렌더링합니다.

  • 작성자 속성 -- 선택적 author: <string> frontmatter는 각 카드에 흐린 칩으로 표시됩니다.

  • 코드 그래프 해석 -- 코드 구조를 위한 calls, imports, inherits 엣지 유형; 방향성 BFS 순회(outbound/inbound/both); 효율적인 수집을 위한 bulk_link; 재수집 전에 오래된 코드 엣지를 지우는 unlink_by_origin; code: 접두사가 붙은 노드 ID는 코드와 지식을 구분합니다.

  • 시간적 지식 그래프 -- 엣지는 valid_from / valid_to 유효 기간을 지원합니다. as_of 쿼리는 특정 시점 스냅샷을 반환합니다. invalidate 작업은 사실을 삭제하지 않고 종료된 것으로 표시합니다.

  • 하이브리드 점수 부스트 -- TF-IDF + 의미론적 혼합 위에 고유 명사 및 시간적 근접성 부스트, 최대 +66.7%로 제한, 신호가 없으면 단락.

  • 카테고리를 필터가 아닌 부스트로 -- category_mode: "boost"를 선택하면 잘못된 카테고리 추측이 올바른 답을 버리는 대신 순위를 낮춥니다.

  • 축어적 세션 인덱싱 -- 메시지별 청크(≥30자)가 벡터 저장소에 임베딩되어 원시 대화를 검색할 수 있습니다. AGENT_KNOWLEDGE_INDEX_VERBATIM=false로 전환 가능.

  • 구성 가능한 Git URL -- 런타임 설정을 위한 knowledge_admin(action: "config"), XDG/AppData 위치에 저장.

  • 크로스 머신 지속성 -- 지식은 git을 통해 동기화되고, 세션은 각 도구의 로컬 저장소에서 읽습니다.

  • 실시간 대시보드 -- localhost:3423에서 탐색, 검색, 관리.

  • 비밀 정보 스크러빙 -- API 키, 토큰, 비밀번호, 개인 키가 git 푸시 전에 자동으로 삭제됩니다.

  • 지식 그래프 -- 항목 간 관계 엣지(related_to, supersedes, depends_on, contradicts, specializes, part_of, alternative_to, builds_on) 및 BFS 순회.

  • 신뢰도/감쇠 점수 -- 항목은 접근 빈도와 최신성으로 점수가 매겨집니다. 후보에서 확립, 검증으로 자동 승격.

  • 메모리 통합 -- 쓰기 시 TF-IDF 중복 감지(유사 항목 경고) 및 일괄 중복 스캔을 위한 knowledge_analyze(action: "consolidate").

  • 반성 주기 -- knowledge_analyze(action: "reflect")는 연결되지 않은 항목을 표시하고 에이전트가 새 그래프 연결을 식별하도록 구조화된 프롬프트를 생성합니다.

  • 쓰기 시 자동 연결 -- 새 항목은 코사인 유사도 > 0.7일 때 상위 3개 유사 기존 항목에 자동으로 연결됩니다.

  • 신뢰도 메타데이터 — 항목은 extracted(사용자 작성) 또는 inferred(자동 증류, 0.85× 검색 순위 승수)로 태그됩니다. confidence_score 필드는 모델의 확신도 0-1을 담습니다.

  • 지식 분석 -- knowledge_analyze 작업 god_nodes(가장 많이 연결된 항목), bridges(카테고리 간 연결자), gaps(고립된 항목).

  • 지식 브리핑 -- knowledge_analyze(action: "brief")는 세션 시작 방향 설정을 위해 캐시된 ~200 토큰 요약(핵심 개념, 활성 프로젝트, 최근 결정, 오래된 항목 및 공백 수)을 반환합니다.

  • 엣지 출처 -- 그래프 엣지는 origin(manual, auto-link, distill, reflect)을 추적하여 분석이 사용자 판단과 자동화된 휴리스틱을 구분할 수 있게 합니다.

  • 증류의 결정적 사전 추출 -- 세션 요약에는 이제 bash/도구 출력에서 정규식으로 추출된 git 커밋, 오류 패턴, 접근한 URL, 변경된 패키지가 포함됩니다(LLM 비용 없음).

  • 모든 검색 결과의 신선도 메타데이터 -- 모든 지식 결과는 freshness: { body_age_days, last_accessed, access_count, verified_at, verification_age_days, evergreen }를 담습니다. 에이전트는 신뢰 신호를 읽고 결정합니다. 우리는 정책적 순위 하향을 부과하지 않습니다.

  • 카테고리별 감쇠 기간 -- "Unused" 필터와 bytype 차트는 카테고리별 임계값(프로젝트 180일, 사람 365일, 결정 90일, 워크플로우 60일, 메모 30일)을 존중하므로 정체성 관련 콘텐츠가 매주 다시 읽히지 않는다고 해서 오래된 것처럼 보이지 않습니다.

  • 수명 주기 훅 -- SessionStart 자동 웨이크업 + 수집 신선도 검사, UserPromptSubmit 첫 프롬프트 타겟 주입, PreCompact 메모리 플러시 알림 + 증류, SessionEnd 증류. 총 6개의 훅 스크립트, 모두 실패 시 열림, 각각 AGENT_KNOWLEDGE_* 환경 변수로 전환 가능. docs/HOOKS.md 참조.

  • 호스트 자동 메모리 대체 -- 세션별 메모리 시스템이 있는 호스트(Claude Code의 ~/.claude/projects/*/memory/, 다른 IDE에서도 유사)에서 지속적인 사용자 사실과 피드백을 agent-knowledge로 라우팅합니다. 자동 메모리는 머신 로컬이며 다른 머신에 보이지 않습니다. agent-knowledge는 git 동기화, 크로스 머신, 검색 가능하며 웨이크업에 표시됩니다. Claude Code 통합 참고 사항은 docs/USER-MANUAL.md를 참조하세요.

코드베이스 수집

knowledge-ingest 스킬은 코드베이스 디렉토리에서 지식 베이스를 채우거나 업데이트합니다. tree-sitter를 사용하여 토큰 없는 구조적 추출(클래스, 함수, 가져오기, 호출 그래프, 근거 주석)을 수행한 다음 파일을 하위 시스템으로 클러스터링하고 기존 MCP 도구를 통해 지식 항목 + 그래프 엣지를 생성합니다. 이후 실행은 증분적입니다. 변경된 파일만 다시 처리됩니다.

/knowledge-ingest ./my-project

Agent Skills 표준을 사용합니다. Claude Code, OpenCode, Cursor, Codex CLI, Gemini CLI와 호환됩니다. 자세한 내용은 수집 가이드를 참조하세요.

지원 언어: TypeScript, JavaScript, Python, Go, Rust, Java, C, C++.

빠른 시작

npm에서 설치

npm install -g agent-knowledge

또는 소스에서 클론

git clone https://github.com/keshrath/agent-knowledge.git
cd agent-knowledge
npm install && npm run build

옵션 1: MCP 서버 (AI 에이전트용)

MCP 클라이언트 구성(Claude Code, Cline 등)에 추가:

{
  "mcpServers": {
    "agent-knowledge": {
      "command": "npx",
      "args": ["agent-knowledge"]
    }
  }
}

대시보드는 첫 MCP 연결 시 http://localhost:3423에서 자동으로 시작됩니다.

클라이언트별 지침(Claude Code, Cursor, Windsurf, OpenCode)은 설정 가이드를 참조하세요.

옵션 2: 독립형 서버 (REST/WebSocket 클라이언트용)

node dist/server.js --port 3423

MCP 도구 (6)

지식 베이스

도구

동작

설명

매개변수

knowledge

list

카테고리 및/또는 태그별 항목 나열

category?, tag?

read

특정 항목 읽기

path (필수)

write

항목 생성/업데이트 (자동 git 동기화)

category, filename, content (모두 필수)

delete

항목 삭제 (자동 git 동기화)

path (필수)

sync

수동 git pull + push

--

wakeup

L0 정체성 + L1 상위 가중치 항목 반환 (토큰 예산 기반)

token_budget?, category?

검색

도구

설명

매개변수

knowledge_search

일반 하이브리드 TF-IDF + 의미론적 검색 (scope 없음)

query, project?, role?, max_results?, ranked?, semantic?, category?, category_mode?, mmr?, mmr_lambda?, explain?

범위 제한 세션 전용 회상 (scope 설정 시)

query, scope, project?, max_results?

응답 형태: {mode: "general" | "scoped", sessions, knowledge}. 범위 모드는 설계상 knowledge: []를 반환합니다.

범위: errors, plans, configs, tools, files, decisions, all.

검색 조정 옵션:

  • mmr: true는 MMR(Maximal Marginal Relevance) 재순위화를 적용합니다(상위 K에서 거의 중복된 클러스터 제거). mmr_lambda 0-1, 기본값 0.7.

  • category_mode: "boost"(기본값)는 일치하지 않는 항목을 제외하는 대신 일치하는 카테고리 항목에 1.25배 점수 배율을 적용합니다. 하드 필터 동작을 원하면 "filter"를 전달하세요.

  • explain: true는 모든 지식 검색 결과에 score_components: {bm25, decay, maturity, confidence, category_boost, mmr_penalty}를 첨부합니다.

세션

도구

동작

설명

매개변수

knowledge_session

list

메타데이터와 함께 세션 나열

project?

get

전체 세션 대화 검색

session_id, project?, include_tools?, tail?

summary

세션 요약 (주제, 도구, 파일)

session_id, project?

지식 그래프

도구

동작

설명

매개변수

knowledge_graph

link

항목 간 엣지 생성/업데이트

source, target, rel_type, strength?

unlink

항목 간 엣지 제거

source, target, rel_type?

invalidate

엣지를 만료로 표시 (valid_to 설정)

source, target, rel_type?, valid_to?

list

엣지 나열

entry?, rel_type?, as_of?

traverse

항목에서 방향성 BFS 탐색

entry, depth?, direction?, rel_type?, as_of?

bulk_link

엣지 일괄 생성 (코드 그래프 수집)

edges ({source, target, rel_type, strength?, origin?} 배열)

unlink_by_origin

origin별 모든 엣지 삭제

origin

지식 유형: related_to, supersedes, depends_on, contradicts, specializes, part_of, alternative_to, builds_on 코드 구조 유형: calls, imports, inherits

탐색 방향: outbound (source→target), inbound (target→source), both (기본값, 무방향)

분석

도구

동작

설명

매개변수

knowledge_analyze

consolidate

거의 중복된 항목 찾기

category?, threshold?

reflect

연결이 없는 항목 찾아 링크 제안

category?, max_entries?

god_nodes

가장 많이 연결된 항목 (차수 중심성)

top_n?

bridges

카테고리 간 연결자 (매개 중심성)

top_n?

gaps

고립된 항목 (0-1 엣지) 성숙도별

max_entries?

brief

캐시된 ~200 토큰 지식 베이스 요약

--

관리

도구

동작

설명

매개변수

knowledge_admin

status

벡터 저장소 통계

--

config

구성 보기 또는 업데이트

git_url?, memory_dir?, auto_distill?

rebuild_embeddings

모든 지식 항목 재임베딩 (공급자 전환 시 유용)

--

prune_orphans

디스크에 더 이상 없는 세션의 임베딩 삭제

vacuum?, force_vacuum?

vacuum

벡터 저장소에서 여유 페이지 회수

--

promote

점수 기반 + 게이트 적용 승격기

promote_mode? (apply|explain), min_score?, min_recall_count?, min_unique_queries?

점수 기반 승격기

모든 프로젝트 수준 후보는 여섯 가지 신호(관련성 0.30, 빈도 0.24, 쿼리 다양성 0.15, 최신성 0.15, 통합 0.10, 개념적 풍부성 0.06)로 점수가 매겨지며 minScore ≥ 0.5, minRecallCount ≥ 2, minUniqueQueries ≥ 2 게이트가 적용됩니다. 세 게이트 모두 통과해야 합니다. 백그라운드 자동 승격은 동일한 auto_distill 구성 플래그로 제어되며, knowledge_admin(action: "promote")로 필요 시 호출할 수 있습니다.

  • promote_mode: "explain"(기본값) — 후보 점수 산정 + 게이트 적용, 일기 작성, KB는 변경하지 않음.

  • promote_mode: "apply" — 통과한 후보 승격, 일기 작성, git 커밋.

  • 실행할 때마다 ~/agent-knowledge/.dreams/YYYY-MM-DD.md에 후보별 신호 분석과 게이트 결과를 기록합니다. . 접두사 디렉터리는 git 추적되지만 목록/검색에서 제외됩니다.

  • 근거 기반 재수화: 소스 세션 파일이 디스크에 더 이상 없으면 후보를 건너뜁니다(삭제된 콘텐츠 승격 방지).

  • evergreen: true 프론트매터가 있는 항목은 승격으로 덮어쓰지 않으며, 활동이 추가됩니다.

쓰기 벤치 하네스: npm run bench:promote — "이후 세션에서 참조됨" 자동 라벨링을 통한 오프라인 재생. 게이트 적용 승격기를 단순 "모두 배포" 기준선과 비교하여 정밀도/재현율/F1을 보고합니다. 신호 가중치나 임계값 변경을 배포하기 전에 이를 사용하여 검증하세요.

REST API

메서드

엔드포인트

설명

GET

/api/knowledge

지식 항목 나열

GET

/api/knowledge/search?q=

지식 베이스 검색

GET

/api/knowledge/:path

특정 항목 읽기

GET

/api/knowledge/god-nodes?top_n=

가장 많이 연결된 항목

GET

/api/knowledge/bridges?top_n=

카테고리 간 연결자

GET

/api/knowledge/gaps?max_entries=

고립된 항목

GET

/api/knowledge/brief

지식 베이스 요약

GET

/api/sessions

세션 나열

GET

/api/sessions/search?q=&role=&ranked=

세션 검색 (TF-IDF)

GET

/api/sessions/recall?scope=&q=

범위 제한 회상

GET

/api/sessions/:id

세션 읽기

GET

/api/sessions/:id/summary

세션 요약

POST

/api/knowledge

항목 쓰기 (HTTP 클라이언트)

GET

/health

상태 확인

아키텍처

graph LR
    subgraph Storage
        KB[(Knowledge Base<br/>~/agent-knowledge<br/>Git Repository)]
    end

    subgraph Session Sources
        CC[(Claude Code<br/>JSONL)]
        CU[(Cursor<br/>JSONL)]
        OC[(OpenCode<br/>SQLite)]
        CL[(Cline<br/>JSON)]
        CD[(Continue.dev<br/>JSON)]
        AI[(Aider<br/>MD / JSONL)]
    end

    subgraph agent-knowledge
        KM[Knowledge Module<br/>store / search / git]
        AD[Session Adapters<br/>auto-discovery]
        SE[Search Engine<br/>TF-IDF + Fuzzy]
        DS[Dashboard<br/>:3423]
        MCP[MCP Server<br/>stdio]
    end

    subgraph Clients
        AG[Agent Sessions]
        WB[Web Browser]
    end

    KB <-->|git pull/push| KM
    CC --> AD
    CU --> AD
    OC --> AD
    CL --> AD
    CD --> AD
    AI --> AD
    AD --> SE
    KM --> MCP
    SE --> MCP
    KM --> DS
    SE --> DS
    MCP --> AG
    DS --> WB

지식 그래프

항목과 코드 심볼은 전용 edges SQLite 테이블에 저장된 유형 지정, 가중치 적용 엣지를 통해 연결될 수 있습니다. 11가지 관계 유형이 지원됩니다 — 지식 엣지용 8개와 코드 구조용 3개:

지식: related_to, supersedes, depends_on, contradicts, specializes, part_of, alternative_to, builds_on 코드 구조: calls, imports, inherits

  • knowledge_graph(action: "link") 엣지 생성 또는 업데이트 (선택적 strength 0-1)

  • knowledge_graph(action: "unlink") 엣지 제거 (유형별 선택 필터링)

  • knowledge_graph(action: "list") 항목 또는 관계 유형별 엣지 나열

  • knowledge_graph(action: "traverse") 시작 항목에서 방향성 BFS 탐색 수행. direction (outbound, inbound, both) 및 rel_type 필터 지원

  • knowledge_graph(action: "bulk_link") 단일 트랜잭션에서 엣지 일괄 생성 (코드 그래프 수집용)

  • knowledge_graph(action: "unlink_by_origin") 특정 origin을 가진 모든 엣지 삭제 (재수집 전 오래된 코드 엣지 정리용)

코드 그래프

코드 구조 엣지는 코드베이스 수집 중 knowledge-ingest 스킬에 의해 생성됩니다. code: 접두사 노드 ID를 사용합니다:

code:src/auth/middleware.ts                    # file node
code:src/auth/middleware.ts::validateToken      # symbol node

쿼리 예시:

# Who calls validateToken?
knowledge_graph({ action: "traverse", entry: "code:src/auth.ts::validateToken", direction: "inbound", rel_type: "calls", depth: 3 })

# What breaks if I change this function?
knowledge_graph({ action: "traverse", entry: "code:src/auth.ts::validateToken", direction: "inbound", rel_type: "calls", depth: 5 })

# Combined: callers + knowledge context (decisions, design rationale)
knowledge_graph({ action: "traverse", entry: "code:src/auth.ts::validateToken", depth: 2 })

자동 링크

knowledge의 action: "write"가 항목을 생성하거나 업데이트할 때, 코사인 유사도를 통해 기존 항목 중 상위 3개의 가장 유사한 항목을 자동으로 찾고 0.7 이상의 점수를 받은 모든 쌍에 대해 related_to 엣지를 생성합니다.

신뢰도 및 감쇠 점수

각 지식 항목은 entry_scores SQLite 테이블에 추적되는 신뢰도 점수를 가집니다. 검색 결과는 다음을 사용하여 순위가 매겨집니다:

finalScore = baseRelevance * 0.5^(daysSinceLastAccess / 90) * maturityMultiplier

항목은 접근 횟수에 따라 자동으로 성숙합니다:

단계

접근 횟수

배수

candidate

< 5

0.5x

established

5-19

1.0x

proven

20+

1.5x

자주 접근되는 항목은 검색 순위가 올라가고, 오래된 항목은 시간이 지나면서 가치가 감소합니다.

검색 기능

TF-IDF 랭킹 -- 결과는 단어 빈도-역문서 빈도(term frequency-inverse document frequency)로 점수가 매겨집니다. 희귀한 용어일수록 관련성이 높아집니다. 전역 인덱스는 60초 동안 캐시됩니다.

퍼지 매칭 -- 슬라이딩 윈도우를 사용한 Levenshtein 편집 거리. 임계값을 구성할 수 있습니다(기본값 0.7).

범위 지정 검색 -- knowledge_search의 scope 매개변수를 통해 제공됩니다:

범위

일치 항목

errors

스택 트레이스, 예외, 실패한 명령

plans

아키텍처, TODO, 구현 단계

configs

설정, 환경 변수, 구성 파일

tools

MCP 도구 호출, CLI 명령

files

파일 경로, 수정 사항

decisions

트레이드오프, 근거, 선택

통합

REST 쓰기 엔드포인트

POST /api/knowledge는 { category, filename, content }를 받아 전체 쓰기 파이프라인을 실행합니다: git pull → 파일 쓰기 → 임베딩 인덱스 → 자동 링크 → git push → 중복 확인. 상태 코드 201과 함께 { path, autoLinks?, duplicateWarnings?, git }를 반환합니다.

이를 통해 MCP 연결 없이도 다른 서비스에서 HTTP 기반 쓰기가 가능합니다.

agent-tasks KnowledgeBridge

agent-tasks에는 작업 완료 시 learning 및 decision 아티팩트를 agent-knowledge로 자동 푸시하는 내장 KnowledgeBridge가 있습니다. 항목은 frontmatter 태그(agent-tasks, 프로젝트 이름, 아티팩트 유형)와 함께 decisions/에 저장되고, 임베딩으로 자동 인덱싱되며 유사한 항목에 자동 링크됩니다. 구성이 필요 없습니다 — agent-knowledge가 localhost:3423에서 실행 중이면 작동합니다.

테스트

npm test              # 563 tests across 35 files
npm run test:watch    # Watch mode
npm run lint          # ESLint on src/ and tests/
npm run typecheck     # tsc --noEmit
npm run check         # typecheck + lint + format + test

환경 변수

모든 환경 변수는 AGENT_KNOWLEDGE_* 접두사 아래에 있습니다. 호스트 이름이 하드코딩되어 있지 않습니다 — 어댑터 레지스트리는 구성 없이 설치된 AI 코딩 호스트(.claude, .cursor, .codex, .aider, .continue, OpenCode)를 자동 감지합니다.

핵심

변수

기본값

설명

AGENT_KNOWLEDGE_MEMORY_DIR

~/agent-knowledge

Git 동기화된 지식 베이스 디렉터리

AGENT_KNOWLEDGE_GIT_URL

--

Git 원격 URL(디렉터리가 없으면 자동 클론)

AGENT_KNOWLEDGE_AUTO_DISTILL

true

세션 인사이트를 지식 베이스로 자동 증류

AGENT_KNOWLEDGE_INDEX_VERBATIM

true

원시 세션 메시지 청크를 벡터 저장소에 인덱싱하여 대화를 나중에 검색할 수 있게 합니다. 대규모에서 디스크를 절약하려면 false로 설정하세요.

AGENT_KNOWLEDGE_DATA_DIR

(플랫폼 구성)

기본 호스트 데이터 루트를 재정의합니다. 일반적인 경우에는 설정하지 않은 채로 두세요 — 어댑터가 ~/ 아래의 모든 잘 알려진 호스트 루트를 자동 감지합니다.

AGENT_KNOWLEDGE_EXTRA_SESSION_ROOTS

--

추가 세션 디렉터리, 쉼표로 구분. 자동 감지로 찾은 항목에 추가됩니다.

AGENT_KNOWLEDGE_PORT

3423

대시보드 HTTP/WebSocket 포트

임베딩

변수

기본값

설명

AGENT_KNOWLEDGE_EMBEDDING_PROVIDER

local

local | openai | claude | gemini

AGENT_KNOWLEDGE_EMBEDDING_ALPHA

0.3

TF-IDF 대 의미론적 혼합 가중치(0 = 순수 의미론적, 1 = 순수 TF-IDF)

AGENT_KNOWLEDGE_EMBEDDING_MODEL

--

공급자 기본 모델 재정의

AGENT_KNOWLEDGE_EMBEDDING_IDLE_TIMEOUT

60

로컬 모델을 언로드하기 전 대기 시간(초)(0 = 계속 로드 유지)

AGENT_KNOWLEDGE_EMBEDDING_THREADS

(자동)

로컬 공급자의 ONNX / OMP 스레드 수

API 키

프로젝트 범위 재정의가 표준 키보다 우선합니다. 둘 중 하나를 설정하세요. 범위 지정 형식을 사용하면 나머지 환경과 다른 키로 agent-knowledge를 실행할 수 있습니다.

변수

폴백

설명

AGENT_KNOWLEDGE_OPENAI_API_KEY

OPENAI_API_KEY

OpenAI 임베딩

AGENT_KNOWLEDGE_ANTHROPIC_API_KEY

ANTHROPIC_API_KEY

Claude / Voyage 임베딩

AGENT_KNOWLEDGE_GEMINI_API_KEY

GEMINI_API_KEY

Gemini 임베딩

훅

변수

기본값

설명

AGENT_KNOWLEDGE_AUTOWAKE

1

SessionStart에 knowledge(action: wakeup) 번들을 자동 주입합니다. 비활성화하려면 0으로 설정하세요.

AGENT_KNOWLEDGE_WAKEUP_BUDGET

800

웨이크업 번들의 토큰 수

AGENT_KNOWLEDGE_FIRSTPROMPT_INJECT

1

첫 번째 사용자 프롬프트에서 대상 knowledge_search를 실행하고 상위 결과를 주입합니다. 비활성화하려면 0 / false / off로 설정하세요.

AGENT_KNOWLEDGE_FIRSTPROMPT_BUDGET

600

첫 프롬프트 주입의 토큰 수(클램프 [100, 8000])

AGENT_KNOWLEDGE_FIRSTPROMPT_MAX_HITS

4

첫 프롬프트에 첨부되는 최대 지식 히트 수(클램프 [1, 20])

AGENT_KNOWLEDGE_PRECOMPACT_NUDGE

1

사전 압축 전에 knowledge(action: write)를 통해 에이전트가 컨텍스트를 저장하도록 유도합니다. 0은 유도를 비활성화하고, off는 유도와 디스크 덤프를 모두 억제합니다.

외부 도구 재정의

변수

기본값

설명

OPENCODE_DATA_DIR

~/.local/share/opencode

OpenCode의 세션 DB 위치를 재정의합니다(OpenCode 자체 환경 변수, 우리 어댑터가 존중함)

문서

라이선스

MIT

Available Tools

6 tools
knowledgeA

Knowledge base CRUD, sync, and session-start hydration. Actions: "list" (browse entries), "read" (get entry content), "write" (create/update entry, auto git sync), "delete" (remove entry, auto git sync), "sync" (manual git pull + push), "wakeup" (return token-budgeted section-priority context bundle — identity, active_tasks, recent_decisions, known_gotchas, last_session_summary, top_weighted, semantic_fallback — call once at session start).

ParametersJSON Schema
NameRequiredDescriptionDefault
tagNoFilter by tag (action=list)
pathNoRelative path to the entry, e.g. 'projects/my-project.md' (action=read, delete)
actionYesAction to perform
contentNoFull markdown content for the entry (action=write)
categoryNoCategory (action=list: filter; action=write: target directory). One of: projects, people, decisions, workflows, notes
filenameNoFilename with or without .md extension (action=write), e.g. 'my-project.md'
sectionsNo[wakeup] Comma-separated, ordered section list. Valid: identity, active_tasks, recent_decisions, known_gotchas, last_session_summary, top_weighted, semantic_fallback. Default: all seven in that order. Omit to preserve v1.8.0 behaviour.
token_budgetNo[wakeup] Max tokens to render (chars/4 estimate, default 800)
section_budgetsNo[wakeup] Per-section token-budget overrides, e.g. {"identity": 200, "top_weighted": 400}. Unspecified sections split the remainder evenly. Unused budget redistributes to later sections.

TDQS

A3.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden — and it does disclose meaningful side effects: write/delete trigger auto git sync, sync is a manual git pull+push, and wakeup returns a token-budgeted section-priority bundle. This is solid disclosure for a mutation-capable tool; it only omits reversibility (e.g., whether delete is recoverable from git history) and confirmation behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and the content is dense and informative, but it is presented as one long run-on sentence without line breaks or structural separation, making the six actions and their caveats harder to parse at a glance. Fewer words could be used; the parentheticals are useful but poorly delimited.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a high-complexity tool (9 params, 6 actions, enums, nested objects) with no output schema, the description explains wakeup's return bundle but not the return values for the other five actions (e.g., what list returns, what read returns on success/failure). The schema covers parameter semantics well, but the absence of output descriptions for the remaining actions leaves gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the input schema already documents all nine parameters with action-scoped descriptions. The description adds value on top by explaining wakeup semantics — section ordering, defaults, budget behavior — but does not substantially enrich the other parameters beyond what the schema states. A baseline of 3 is appropriate given the high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear purpose ('Knowledge base CRUD, sync, and session-start hydration') and enumerates six concrete actions with brief one-line definitions. It implicitly distinguishes from siblings (search, graph, analyze) by being the CRUD/sync/wakeup orchestrator, though it never names the siblings or their differing responsibilities explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is conveyed per-action ('call once at session start' for wakeup, 'auto git sync' for write/delete) and the verb definitions imply when each is appropriate. However, with five siblings present, there is no explicit when-to-use-versus-alternative guidance (e.g., when to prefer knowledge_search over this tool's list action), and no exclusions are stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

knowledge_adminB

Admin operations: view vector store stats, view/update configuration, rebuild embeddings, prune orphan session embeddings, or VACUUM the database. Use action "status" for index stats, "config" to view or update settings, "rebuild_embeddings" to re-embed all knowledge entries (useful when switching providers), "prune_orphans" to delete embeddings for sessions no longer present on disk, "vacuum" to reclaim free pages.

ParametersJSON Schema
NameRequiredDescriptionDefault
actionYesAction: status (vector store stats), config (view/update settings), rebuild_embeddings (re-embed all entries), prune_orphans (delete embeddings for missing sessions), vacuum (reclaim free pages), promote (run the scored promoter — see promote_mode)
vacuumNoRun VACUUM after pruning (action=prune_orphans, default true)
git_urlNoGit remote URL (action=config). Set to empty string to remove.
min_scoreNo[promote] Minimum composite score to promote (default: 0.5).
memory_dirNoLocal knowledge base directory (action=config). Empty to reset.
auto_distillNoEnable/disable scheduled promotion (action=config)
force_vacuumNoRun VACUUM even if no orphans were pruned (action=prune_orphans)
promote_modeNoaction=promote mode (default: explain). "explain" returns score breakdowns without writing; "apply" promotes candidates that pass all gates.
min_recall_countNo[promote] Minimum recall count gate (default: 2).
min_unique_queriesNo[promote] Minimum unique-query gate (default: 2).

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure, and it does disclose destructive effects for prune_orphans ('delete embeddings') and vacuum ('reclaim free pages'). However, it understates rebuild_embeddings' destructive rewriting of existing embeddings, and it completely omits the 'promote' action's behavior (apply vs explain modes, write behavior vs read-only). For a tool with several destructive operations, the disclosure is partial.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core operations are front-loaded in the opening sentence, with each action's purpose expanded in a single subsequent sentence. The structure is efficient and scannable. Minor deduction for the slightly run-on single-sentence expansion and for leaving out promote, which makes the list feel incomplete rather than intentionally concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex admin tool with 10 parameters, 6 actions, no output schema, and no annotations, the description should be comprehensive — but it covers only 5 of 6 actions and omits the entire promote workflow with its 4 dedicated parameters (promote_mode, min_score, min_recall_count, min_unique_queries). An agent reading only the description would never learn a whole callable mode exists, which is a significant completeness gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents all 10 parameters, giving a baseline of 3. The description adds marginal value by linking rebuild_embeddings to the provider-switching use case, but it adds no semantics beyond the schema for the config params (git_url, memory_dir, auto_distill) and leaves the promote-related parameters entirely unexplained in prose despite them being a substantial cluster of the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear purpose — administrative operations on the knowledge/vector store — and enumerates five concrete actions (status, config, rebuild_embeddings, prune_orphans, vacuum) with their effects. It clearly distinguishes itself from the read/search siblings. However, it silently omits the 'promote' action that exists in the schema enum, and the umbrella phrase 'Admin operations' is vague until the action list clarifies it.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives actionable when-to-use context for rebuild_embeddings ('useful when switching providers') and explains what each action accomplishes, which implicitly routes the agent to the right action. But it provides no guidance for the 'promote' action (its dedicated params min_score, min_recall_count, min_unique_queries, promote_mode are never narrated), and it never states when NOT to use the tool or how it differs from siblings beyond 'admin' framing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

knowledge_analyzeA

Analysis tools: find duplicates, unconnected entries, most-connected concepts (god nodes), bridge entries, knowledge gaps, zero-result search queries, stale-by-code-activity entries, or generate a compact knowledge brief. Actions: consolidate, reflect, god_nodes, bridges, gaps, brief, search_gaps, stale_by_code_activity.

ParametersJSON Schema
NameRequiredDescriptionDefault
top_nNoNumber of results (action=god_nodes default: 10, action=bridges default: 5)
actionYesAction: consolidate (find duplicates), reflect (find unconnected entries), god_nodes (most-connected entries), bridges (cross-cluster connectors), gaps (entries with 0-1 edges), brief (compact knowledge base summary), search_gaps (zero-result knowledge_search queries grouped by similarity — the single best signal for "what entries should I write next?"), stale_by_code_activity (entries whose referenced file paths were modified in recent sessions after the entry body was last edited — automatic staleness signal, v1.8.1).
categoryNoScan only this category (omit for all)
min_countNo[search_gaps] Minimum occurrence count per merged group (default: 1). Raise to surface only repeated misses.
thresholdNoSimilarity threshold 0-1 (action=consolidate, default: 0.5)
since_daysNo[search_gaps] Lookback window in days (default: 30). Only queries logged within this window are considered.
max_entriesNoMax unconnected entries to include (action=reflect, default: 20)
group_similarityNo[search_gaps] Jaccard token similarity threshold for merging near-duplicate queries (default: 0.35, range 0-1). Low because short queries yield low Jaccard even when topically related.
min_touching_sessionsNo[stale_by_code_activity] Minimum distinct sessions that must have modified one of the entry's referenced files for it to be flagged (default: 1).

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description bears the full disclosure burden, yet it is internally contradictory on the consolidate action: the verb implies merging/mutation while the gloss '(find duplicates)' implies read-only discovery. There is no statement about whether any action mutates entries, what output shape results, or performance implications — a real gap for a multi-action analysis tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in the first sentence and the whole description runs roughly 60 words with no filler. The trailing 'Actions:' enumeration is partially redundant with the schema enum but serves as a useful name→semantic mapping, earning its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a complex tool — 9 parameters, 8 actions, no output schema, no annotations. All action semantics are enumerated, but the description is silent on per-action return formats and on whether any action (notably consolidate) has side effects, both material for an analysis surface of this breadth.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema's parameter descriptions are unusually rich (per-action defaults, the Jaccard rationale for group_similarity, min_count semantics). The tool description adds little beyond re-listing action names, so the schema-carrying baseline of 3 is correct.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description enumerates eight distinct analyses with denotative glosses (duplicates, unconnected entries, god nodes, bridges, gaps, zero-result queries, stale-by-code-activity, brief), clearly binding the tool to knowledge-base entry analysis. This differentiates it from siblings like knowledge_search (querying) and knowledge_admin (admin actions) without needing to open a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Each action carries clear context, e.g., 'gaps (entries with 0-1 edges)', 'bridges (cross-cluster connectors)', and search_gaps is explicitly framed as 'the single best signal for what entries should I write next?'. Missing, however, are explicit when-not or alternative statements that route selection against sibling tools at the tool level.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

knowledge_graphB

Knowledge graph operations with temporal validity and code structure support. Create/remove edges, traverse via directed BFS, bulk-import code graph edges. Relationship types: related_to, supersedes, depends_on, contradicts, specializes, part_of, alternative_to, builds_on, calls, imports, inherits. Code structure types (calls/imports/inherits) are created by knowledge-ingest and use "code:" prefixed node IDs.

ParametersJSON Schema
NameRequiredDescriptionDefault
as_ofNoISO date — only return edges valid at this date (action=list/traverse, optional)
depthNoMax traversal depth in hops (action=traverse, default: 2)
edgesNoArray of edges to create (action=bulk_link). Each: { source, target, rel_type, strength?, origin? }
entryNoEntry path for filtering (action=list) or BFS start (action=traverse)
actionYesAction: link (create edge), unlink (remove edge), invalidate (set valid_to), list (list edges), traverse (directed BFS), bulk_link (batch-create edges), unlink_by_origin (delete all edges from a specific origin)
originNoEdge origin to delete (action=unlink_by_origin). E.g. "tree-sitter" to clear code graph before re-ingest.
sourceNoSource entry path (action=link/unlink/invalidate), e.g. 'projects/my-project.md'
targetNoTarget entry path (action=link/unlink/invalidate), e.g. 'decisions/architecture.md'
rel_typeNoRelationship type (required for link, optional filter for unlink/invalidate/list)
strengthNoEdge strength 0-1 (action=link, default: 0.5)
valid_toNoISO date the fact stopped being true (action=link/invalidate). For invalidate, defaults to today.
directionNoTraversal direction (action=traverse, default: both). outbound: follow source→target (what does X call?). inbound: follow target→source (who calls X?). both: undirected (default, preserves legacy behavior).
valid_fromNoISO date the fact became true (action=link, optional). Null/omitted = unbounded.

TDQS

B3.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden. It discloses temporal validity and that code structure edges are created by knowledge-ingest, which is useful. However, it does not warn about destructive side effects of unlink/invalidate or the scope of bulk operations, leaving behavioral uncertainty.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is reasonably concise, using three sentences to cover operations, relationship types, and code structure nuance. It could tighten by omitting the redundant relationship list from the enum, but it remains front-loaded and readable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema is present, and the description does not describe return values for actions like list or traverse. It also omits details about state mutations (e.g., irreversibility of unlink). Given the tool's complexity and no annotations, this is a significant gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description adds minimal value: it re-lists relationship types (already in the enum) and notes the 'code:' prefix for node IDs. It does not explain parameter interactions beyond what the schema already states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool performs knowledge graph operations: create/remove edges, traverse via BFS, bulk-import code edges. It also lists relationship types and code structure specifics. However, it does not explicitly contrast with sibling tools like knowledge_search or knowledge_analyze, so differentiation relies on the implicit 'graph' focus.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus siblings. It does not mention when not to use it, nor does it reference alternative tools. The code structure note implies a use case, but there is no clear routing or exclusion.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

knowledge_sessionA

Session operations: list sessions, get a full conversation, or get a summary. Use action "list" to browse sessions, "get" to retrieve messages, "summary" for a quick overview.

ParametersJSON Schema
NameRequiredDescriptionDefault
tailNoOnly return the last N messages (action=get)
limitNoMax sessions to return (action=list, default: 20, max: 500)
actionYesAction to perform
offsetNoSkip first N sessions (action=list, default: 0)
projectNoFilter by project name (substring match)
session_idNoSession UUID (required for get, summary)
include_toolsNoInclude tool_use and tool_result messages (action=get, default: false)

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full responsibility for behavioral disclosure. It states the actions but does not mention whether operations are read-only, side effects, required permissions, error behavior (e.g., invalid session_id), or any rate limits. For a tool with three read-like actions, this is a notable gap; the agent is left to infer safety and failure modes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two short sentences with zero waste. It front-loads the core concept 'Session operations' and immediately explains the three actions. Every sentence contributes to understanding the tool, making it highly efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description provides enough to invoke the tool correctly for the three actions, but it omits the response format entirely. Since there is no output schema, the agent is unaware of what each action returns (e.g., list returns an array, get returns messages). For a multi-action tool, this is a moderate gap, though the actions are simple enough that an agent might infer typical behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All seven parameters are fully described in the schema (100% coverage), so the schema carries the heavy lifting. The description adds context for how the action parameter drives behavior (list vs get vs summary) and clarifies the purpose of some parameters indirectly (e.g., tail for get, limit for list), but it does not add new semantic detail beyond the schema. This aligns with the coverage baseline of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Session operations: list sessions, get a full conversation, or get a summary.' It identifies three distinct actions (list, get, summary) and explicitly differentiates from sibling tools by focusing on session operations, which none of the sibling names (knowledge, knowledge_search, knowledge_admin, knowledge_graph, knowledge_analyze) cover.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides per-action guidance: 'Use action list to browse sessions, get to retrieve messages, summary for a quick overview.' This clarifies when to use each action, but it does not mention when to favor this tool over siblings such as knowledge_search or knowledge_analyze. There is no explicit exclusion or alternative routing at the tool level, though the action-level guidance is useful.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 6 tool updatesv1.9.7
    • First observedknowledge
    • First observedknowledge_admin
    • First observedknowledge_analyze
    • First observedknowledge_graph
    • First observedknowledge_search
    • First observedknowledge_session

TDQS

A3.9/5.0

Scored across 6 tools

Disambiguation5/5

Each tool targets a distinct functional domain: CRUD operations, cross-source search, session management, admin/maintenance, graph relationships, and analysis/insights. The action-based sub-operations are clearly scoped, and there is no meaningful overlap between tools.

Naming Consistency5/5

All tool names follow the consistent pattern `knowledge_<verb_noun>` using snake_case throughout. The naming convention is uniform, with descriptive suffixes (search, session, admin, graph, analyze) that clearly differentiate purposes.

Tool Count5/5

Six tools is an ideal count for a knowledge-management server. Each tool encapsulates a distinct set of related operations (CRUD, search, sessions, admin, graph, analysis), providing comprehensive functionality without overwhelming the agent.

Completeness5/5

The toolset covers the full lifecycle of a knowledge base: creating/reading/updating/deleting entries, searching across sessions and entries, managing session history, performing administrative tasks (embeddings, vacuum), maintaining knowledge graph relationships, and deriving analytical insights. No obvious gaps exist; even advanced features like bulk graph import and orphan pruning are included.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides persistent memory for AI coding assistants, storing and retrieving architectural decisions, patterns, and solutions across sessions using semantic search, while also offering git integration for commit messages and code expertise mapping.
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Provides persistent memory for AI agents using hybrid search (vector embeddings + BM25) with neural reranking, enabling storage and retrieval of insights, debugging solutions, and patterns across coding sessions.
    8
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides AI coding assistants with persistent, context-rich memory of a codebase, including documentation and git history, enabling recall across sessions.
    105
    Apache 2.0
  • A
    license
    Not graded
    quality
    B
    maintenance
    Provides persistent, searchable memory and knowledge capture for AI-assisted development, enabling agents to retain decisions, bugs, and patterns across sessions and projects.
    MIT