What Are Skills in TencentDB Agent Memory and How Are They Shared?
Skills in TencentDB Agent Memory are versioned, reusable knowledge assets that encapsulate agent workflow expertise, shared through team-based ACL controls and visibility settings.
The TencentDB-Agent-Memory repository treats Skills as first-class assets rather than static prompts, enabling agents to capture, version, and distribute procedural knowledge across organizational boundaries. Each Skill contains metadata, resource files, execution steps, and validation rules that define reusable expertise extracted from agent workflows.
Core Architecture of Skills
API Definition Layer
The foundation of the Skill system resides in sdk/memory-core/typescript/src/v3/skill-types.ts. This file defines TypeScript interfaces including SkillSummary, SkillDetail, and SkillVersionSummary, along with pagination schemas, SkillSearchMode types (BM25, embedding, or hybrid), and conversation-extraction data structures that govern how Skills are structured and transmitted across the system.
Client Wrapper Implementation
The skill-client.ts file provides a thin wrapper around fifteen /v3/skill/* HTTP endpoints. It implements methods for CRUD operations, resource file I/O, versioning, and conversation-driven extraction, handling request construction, default validation, and error mapping for the entire Skill lifecycle.
MemoryCore Gateway
The central service layer located in /MemoryCore/src/core/ stores Skill data and executes RAG (retrieval-augmented generation) for Skill search. This gateway processes conversation slices to automatically extract new Skills when workflow patterns match defined trigger boundaries, as described in the MemoryCore service implementation.
Proxy Integration Layer
According to MemoryProxy/README.md, the MemoryProxy enables agents to invoke Skills without direct knowledge of the backend architecture. It forwards /v3/skill/* calls and injects <cloud_skills> summaries and <skill_tools> invocation blocks directly into LLM system prompts, bridging the gap between agent reasoning and Skill execution.
Asset-Level ACL Framework
Skills are stored as Memory Assets with ownership models spanning User, Team, and Agent levels. The asset metadata model in MemoryCore/README.md defines visibility states and permission bits that determine who can read, write, or invoke a Skill, enforcing strict data governance through fixed binding and ACL evaluation.
Skill Lifecycle Management
Creation and Initialization
Agents or human operators initiate Skills via SkillCreateRequest through the TypeScript SDK. The request includes mandatory identifiers (user_id, team_id, agent_id) and optional resource files—such as markdown documentation or configuration scripts—that provide contextual grounding for execution.
Immutable Versioning
Each modification creates a new SkillVersionSummary while preserving previous versions as immutable records. This enables rollback capabilities and maintains audit trails, ensuring that proven workflow versions remain accessible even as Skills evolve through manual updates or automatic extraction.
Conversation-Driven Extraction
After human-agent interactions, the proxy posts conversation slices to /v3/skill/conversation/add. When the underlying workflow matches defined trigger boundaries, the system automatically archives a new Skill version via SkillConversationAddRequest, capturing emergent expertise without manual intervention.
Search and Retrieval
Skills are searchable via SkillSearchMode configurations supporting BM25 keyword matching, semantic embedding search, or hybrid approaches. Retrieval returns SkillSearchHit objects containing concise summaries suitable for prompt injection, enabling dynamic Skill discovery based on conversation context.
Runtime Invocation
Agents receive Skills within their system prompts as <cloud_skills> blocks containing summaries and <skill_tools> blocks with curl-style HTTP snippets. The skillRuntime.allowLlmWrite permission flag controls whether the model may modify Skill content during execution or remains restricted to read-only invocation.
Sharing Mechanism and Access Control
Ownership and Visibility States
By default, Skills are private to their creator. Administrators can transition Skills to team or public visibility states through the update API, promoting personal assets to shared resources. This visibility metadata is stored in the asset's ACL record alongside ownership information.
ACL Evaluation Pipeline
When agents request Skills, the Memory Hub applies a hierarchical filter: Team → User → Agent → Visibility. Only assets satisfying these fixed binding and ACL constraints are returned, ensuring that sensitive workflows remain accessible only to authorized entities as implemented in the TencentCloud/TencentDB-Agent-Memory access control layer.
Cross-Agent Reuse
Once shared at the team level, any agent belonging to that team can import the Skill into its context. This enables standardized workflows to propagate across different agent instances while maintaining centralized version control and consistent execution semantics.
Working with the Skill SDK
Creating a New Skill
import { SkillClient } from '@tencentdb/memory-core';
const client = new SkillClient({ baseURL: 'http://localhost:8420', serviceToken: 'YOUR_TOKEN' });
await client.create({
user_id: 'u123',
team_id: 't456',
agent_id: 'a789',
name: 'Release Checklist',
description: 'Standard steps for releasing a product',
resources: [
{ path: 'checklist.md', encoding: 'utf-8', content: '# Release Checklist\n...' }
],
});
Searching Existing Skills
const result = await client.search({
user_id: 'u123',
team_id: 't456',
query: 'how to release a new version',
mode: 'hybrid',
});
console.log(result.items.map(s => s.name));
Runtime Invocation via MemoryProxy
When processing a conversation, MemoryProxy expands Skill references into executable commands:
{
"role": "assistant",
"content": "Here is the release checklist:\n<skill_tools name=\"Release Checklist\"/>"
}
This generates a curl-style invocation that the LLM can execute:
curl -X POST http://localhost:8420/v3/skill/run \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"skill_id":"skill-xyz","input":{}}'
Updating Visibility for Sharing
await client.update({
user_id: 'admin',
team_id: 't456',
skill_id: 'skill-xyz',
visibility: 'team',
});
Summary
- Skills are first-class, versioned knowledge assets containing metadata, resources, validation rules, and execution steps
- Architecture spans
skill-types.ts,skill-client.ts, MemoryCore Gateway, and MemoryProxy layers - Lifecycle includes creation via
SkillCreateRequest, immutable versioning, conversation-driven extraction, and RAG-based search - Sharing relies on asset-level ACLs with hierarchical evaluation (Team → User → Agent → Visibility)
- Runtime injection uses
<cloud_skills>summaries and<skill_tools>blocks, controlled byskillRuntime.allowLlmWritepermissions
Frequently Asked Questions
What defines a Skill in TencentDB Agent Memory?
A Skill is a first-class, versioned knowledge asset that encapsulates reusable expertise extracted from an agent's workflow. Unlike static prompts, it contains metadata, version history, resource files, trigger boundaries, execution steps, and validation rules, enabling sophisticated procedural knowledge reuse across the agent ecosystem.
How does Skill versioning work?
Each edit creates a new SkillVersionSummary while preserving older versions as immutable records. This occurs through manual SDK updates or automatic extraction via SkillConversationAddRequest when conversations match trigger boundaries. The system maintains complete audit trails and supports rollback to any previous version.
How are Skills shared between agents?
Skills transition from private to team or public visibility through administrative review of the visibility field. The Memory Hub evaluates Team → User → Agent → ACL hierarchies to filter accessible assets. Once shared at the team level, any team agent can import the Skill using SkillConversationAddRequest, enabling cross-agent workflow standardization.
What controls whether an LLM can modify a Skill?
The skillRuntime.allowLlmWrite permission flag governs runtime write capabilities. When disabled, the LLM receives read-only <cloud_skills> blocks. When enabled, the model can trigger updates to Skill content through the API, though all writes remain subject to the underlying asset-level ACL constraints defined in MemoryCore/README.md.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →