How MemoryPanel Enables Team Management in TencentDB Agent Memory

The MemoryPanel serves as a stateless management console that provides centralized REST endpoints and a React-based UI for creating teams, orchestrating agents, and governing memory assets across the TencentDB Agent Memory ecosystem.

The TencentDB Agent Memory repository by TencentCloud introduces a sophisticated control plane called the MemoryPanel to simplify team management in AI-assisted workflows. This component acts as a stateless gateway that abstracts the complexity of the underlying Memory Gateway and Knowledge Service. By exposing unified administrative interfaces, MemoryPanel enables organizations to provision teams, manage API keys, and orchestrate agent tasks without maintaining local session state.

Stateless Architecture for Scalable Team Management

Configuration-Driven Deployment

At startup, the panel reads config/metadata-instances.json (mounted read-only) to discover external service URLs and privileged internal credentials. This design eliminates the need for a local database or session store, allowing the panel to run behind any load balancer. As implemented in src/panel/startup/ensure-knowledge-llm-binding.ts, all persistence is delegated to the backing services, making horizontal scaling trivial.

Authentication and Identity Mapping

Every incoming request must carry a user_key header containing a per-user API key. The validation logic in src/panel/config/panel-config.ts verifies these keys and maps them to team-level identities (x-team-id, x-agent-id, x-task-id). Because keys are validated on every request and never persisted server-side, the system maintains strict statelessness while enforcing security boundaries.

Administrative Control and Asset Orchestration

Team and User Lifecycle Management

The panel exposes REST endpoints under /api/v1/meta/* for provisioning teams and managing membership. The route handlers in src/panel/http/routes/meta/instances.ts implement CRUD operations for team definitions, user assignments, and API key issuance. These endpoints allow administrators to create isolated organizational units and assign granular permissions without modifying underlying infrastructure.

Centralized Asset Registration

Through kernel adapters like those found in src/panel/kernel/adapters/http-knowledge-client.ts and src/panel/kernel/adapters/fetch-meta-kernel-adapter.ts, the panel translates generic API calls into specific Memory Gateway or Knowledge Service requests. It exposes unified routes for Skill, Wiki, Code-Graph, and Chat-Memory assets (/api/v1/skill/*, /api/v1/knowledge/*, /api/v1/chat-memory/*), enabling teams to register and bind resources to specific agents and tasks.

Governance and Policy Enforcement

Domain-Level Validation Logic

The src/panel/domain/chat-memory-governance.ts file contains the core logic for enforcing team-level policies, such as restricting task access to owned assets and limiting chat-memory snapshot sizes. This domain layer operates independently of transport concerns, ensuring consistent policy application whether requests originate from the React frontend or direct API calls.

Observability and Health Monitoring

Operational visibility comes through structured logging in src/panel/infra/logger.ts and a dedicated health endpoint (GET /health). These mechanisms support CI/CD pipelines and production monitoring, providing teams with real-time insights into panel performance and service connectivity.

Practical Implementation Examples

Creating Teams and Agents via REST API

To provision a new team, operators send an authenticated POST request to the metadata endpoint:

curl -X POST http://localhost:8123/api/v1/meta/teams \
  -H "Authorization: Bearer <USER_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
        "name": "Demo Team",
        "description": "Team for testing the Memory Panel"
      }'

After team creation, register an agent using the Node SDK:

import { MemoryCoreClient } from '@tencentdb/memory-core';

const client = new MemoryCoreClient({
  baseURL: 'http://localhost:8123/api/v1',
  headers: { Authorization: `Bearer ${USER_KEY}` },
});

await client.post('/agent', {
  teamId: '<TEAM_ID>',
  name: 'demo-agent',
  description: 'Agent used for demo tasks',
});

Binding Skills and Retrieving Overviews

Teams can bind Skills to Tasks through the frontend or API. The React frontend in web/src/pages/workbench/WorkbenchPage/index.tsx manages these relationships via internal stores:

import { useTaskStore } from '@/services/task-store';

const bindSkill = async (skillId: string, taskId: string) => {
  await useTaskStore().addSkill(taskId, skillId);
};

To retrieve aggregated agent metadata across all asset types:

import axios from 'axios';

async function getAgentOverview(agentId: string) {
  const res = await axios.get(
    `http://localhost:8123/api/v1/agent-overview/${agentId}`,
    { headers: { Authorization: `Bearer ${USER_KEY}` } }
  );
  return res.data; // contains agent metadata, linked skills, wiki, chat-memory stats
}

Critical Source Files for Team Management

The following files define the core functionality that enables MemoryPanel's team management capabilities:

Summary

  • MemoryPanel provides a stateless control plane for TencentDB Agent Memory, eliminating session affinity concerns and enabling horizontal scaling.
  • Team management features include user provisioning, API key issuance, and agent/task orchestration through REST endpoints in src/panel/http/routes/meta/instances.ts.
  • The kernel adapter pattern abstracts underlying services, presenting a unified interface for Skill, Wiki, Code-Graph, and Chat-Memory asset management.
  • Domain-level governance in src/panel/domain/chat-memory-governance.ts enforces team isolation and resource limits without coupling to transport layers.
  • Configuration-driven deployment via metadata-instances.json ensures that no local state persists, allowing seamless replication and load-balanced deployments.

Frequently Asked Questions

What is the primary function of MemoryPanel in TencentDB Agent Memory?

The MemoryPanel serves as the administrative control layer that sits between operators and the core memory services. It provides both a REST API and a React-based UI for creating teams, managing users, and orchestrating AI agents while remaining completely stateless to support scalable deployments.

How does MemoryPanel authenticate requests without maintaining session state?

The panel validates a user_key header on every incoming request using logic defined in src/panel/config/panel-config.ts. It maps these keys to team and agent identities without persisting session data server-side, relying instead on external service validation and header-based identity propagation.

Can multiple instances of MemoryPanel run simultaneously for high availability?

Yes. Because the panel stores no local user sessions or databases—all persistence is delegated to external services via metadata-instances.json configuration—you can deploy any number of replicas behind a load balancer without configuring sticky sessions or shared state between instances.

How does the system prevent teams from accessing each other's assets?

Policy enforcement occurs in the domain layer, specifically within src/panel/domain/chat-memory-governance.ts. This module validates that tasks can only access assets owned by their respective teams and enforces size limits on chat-memory snapshots, ensuring strict isolation between organizational units.

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:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →