# tencentcloud/tencentdb-agent-memory — AlpLab Radar Static Code Audit

- Ring: `trial`
- Category: `agents`
- Overall score: `3.6/5`
- Implementation check: `verified`
- Maturity: `active`
- Audited commit: `3eb5b04fcf6a` (read-only; nothing from the repository was executed)
- Reviewed at: 2026-12-02T05:51:29Z
- Repository: https://github.com/tencentcloud/tencentdb-agent-memory
- Radar entry: https://radar.alplab.co/#repo/tencentcloud/tencentdb-agent-memory
- License: `NOASSERTION`
- CI workflows: `.github/workflows`
- Tags: `agent-memory`, `llm-proxy`, `skills`, `vector-search`, `codegraph`, `typescript`

## Summary

Self-hosted TypeScript monorepo implementing a four-layer (L0-L3) agent memory platform: an OpenClaw/Hermes memory plugin with SQLite/sqlite-vec + FTS5 storage, a protocol-preserving LLM proxy that binds Claude Code/Codex/CodeBuddy/dsh/OpenCode/WorkBuddy sessions to team/agent/task identities, a Wiki/CodeGraph knowledge service, and an admin panel.

## Implementation Check

README claims are backed by working code — four-layer pipeline in MemoryCore/src/core/ (tdai-core.ts, sqlite VectorStore with vec0 + jieba FTS5), multi-agent proxy routes in MemoryProxy/src/server.ts createApp, wiki/code-graph service in MemoryKnowledge/src/server.ts — with only the PersonaMem 48%->76% benchmark unverifiable statically.

## When to Use

Use it when a team wants shared, ACL-controlled long-term memory (chat memory, skills, wiki, code graph) across multiple coding agents on their own infrastructure. Not for lightweight single-user setups unwilling to run three services plus a panel, or for deployments where strict TLS verification is non-negotiable until the SDK's default-off cert validation is fixed.

## Sub-scores

| Dimension | Score |
|---|---|
| quality | 4.5/5 |
| usability | 3.5/5 |
| reliability | 2.5/5 |
| security | 3.0/5 |
| integration | 4.5/5 |

## Code Evidence

MemoryCore/index.ts register() wires tools tdai_memory_search/tdai_conversation_search/tdai_read_file plus before_prompt_build/agent_end hooks with TTL+cap caches onto TdaiCore; MemoryCore/src/core/store/sqlite/memory-store.ts initSchema builds l1_records/l0_conversations with vec0 cosine tables, FTS5 jieba tokenization, embedding_meta reindex detection, and team/user/agent isolation columns with prepared statements; MemoryProxy/src/server.ts createApp registers Anthropic /v1/messages, OpenAI chat/completions, Codex/WorkBuddy Responses, and dsh routes plus skill-bridge/memory-bridge; MemoryProxy/src/skill/skill-bridge.ts createSkillBridgeHandler uses a tight ALLOWED_SUBPATHS allowlist, stamps session identity into outbound bodies, and fail-closes team search via filterTeamSearchResponse; MemoryProxy/src/accessKeys.ts uses sha256+timingSafeEqual key comparison with mtime-based reload; MemoryKnowledge/src/source-fetcher/git-fetcher.ts validate enforces an https/ssh protocol allowlist and PRIVATE_ADDR_RE SSRF blacklist; MemoryKnowledge/src/ssh-key/store.ts runs ssh-keygen via spawn args (no shell) with 0600 perms; MemoryCore/src/core/skill/ implements versioned skill extraction with worker pool and CI isolation guard (scripts/ci/check-skill-queue-isolation.sh).

## Issues Found

sdk/memory-core/typescript/src/http.ts HttpTransport defaults rejectUnauthorized to false and its fallback sets process.env.NODE_TLS_REJECT_UNAUTHORIZED="0", disabling TLS verification process-wide; MemoryCore/src/offload/backend-client.ts post() hardcodes rejectUnauthorized:false for all HTTPS calls to the offload backend with no option to enable validation; .github/workflows/pr-ci.yml contains no test job (only pack/manifest/size/isolation checks) and all 12 action uses are floating major-version tags (e.g. actions/checkout@v4) rather than SHA pins.

## Key Risks

Requires Node v22.x (MemoryProxy/src/index.ts hard-exits otherwise) and running 3 services + panel for the full stack; MongoDB backend is experimental; Wiki/CodeGraph ingest is asynchronous and LLM-dependent; substantial test infrastructure is referenced (vitest configs, standalone e2e scripts, contract test harnesses in __contract__/) but the maturity collector reports tests:false and CI never executes a suite, so nothing about test pass rates could be verified; the PersonaMem benchmark number could not be verified from code.

## Reviewed Files

- `README.md`
- `LICENSE`
- `.github/workflows/pr-ci.yml`
- `MemoryCore/package.json`
- `MemoryCore/index.ts`
- `MemoryCore/src/core/store/sqlite/memory-store.ts`
- `MemoryCore/openclaw-plugin/index.ts`
- `MemoryCore/src/offload/backend-client.ts`
- `MemoryProxy/src/server.ts`
- `MemoryProxy/src/index.ts`
- `MemoryProxy/src/auth.ts`
- `MemoryProxy/src/accessKeys.ts`
- `MemoryProxy/src/skill/skill-bridge.ts`
- `MemoryProxy/src/pipeline/stages/auth.ts`
- `MemoryProxy/src/pipeline/stages/forward.ts`
- `MemoryProxy/src/session/codebuddy/init.ts`
- `MemoryKnowledge/src/server.ts`
- `MemoryKnowledge/src/callback.ts`
- `MemoryKnowledge/src/middleware/auth.ts`
- `MemoryKnowledge/src/ssh-key/store.ts`
- `MemoryKnowledge/src/source-fetcher/git-fetcher.ts`
- `agents/asset-import.ts`
- `sdk/memory-core/typescript/src/http.ts`
