TencentDB Agent Memory Architecture: Ports and Functions of MemoryCore, MemoryHub, and MemoryProxy
TencentDB Agent Memory uses three specialized services—MemoryCore (port 8420), MemoryHub (ports 8123/8125), and MemoryProxy (port 8096)—to provide a complete memory layer for AI agents, handling data persistence, team asset management, and LLM traffic forwarding respectively.
The TencentDB Agent Memory project provides a production-grade memory infrastructure for AI coding assistants and conversational agents. The architecture separates concerns into three distinct services that can run together as a full stack or deploy independently based on operational requirements.
MemoryCore: The Data Plane on Port 8420
MemoryCore operates as the memory data plane of the TencentDB Agent Memory system. It persists and retrieves conversation history, chat memory, structured skills, wiki documentation, and code-graph assets.
Core Functions and API Surface
According to the source implementation in MemoryCore/v3-api-memorycore-doc.md, this component exposes the complete v3 API that powers agent interactions. The API surface includes endpoints for conversation management, skill retrieval, metadata operations, and RAG (Retrieval-Augmented Generation) processing pipelines.
The service performs authentication and ACL checks before serving requests, ensuring that agents only access authorized memory assets. It also hosts the skill/RAG processing pipeline that transforms raw stored data into contextually relevant prompts for LLMs.
Configuration and Deployment
The default port configuration is defined in MemoryCore/tdai-gateway.yaml, where the TDAI_GATEWAY_PORT environment variable defaults to 8420:
# Query conversation history from MemoryCore
curl -s "http://127.0.0.1:8420/v3/conversation/query?session_id=demo-session" \
-H "Authorization: Bearer <your-api-key>"
This gateway service handles all inbound traffic to the data plane and routes requests to the appropriate internal handlers based on the v3 API path structure.
MemoryHub: Team Control Panel and Knowledge Service
MemoryHub runs as a combined container hosting two distinct services that manage team-level configurations and asset distribution. Unlike MemoryCore's single-port architecture, MemoryHub utilizes two separate ports to isolate administrative functions from data delivery.
Port 8123: Team Memory Control Panel
Port 8123 serves the Team Memory Control Panel, a web-based UI where engineering teams create organizational structures (Teams and Agents) and manage memory lifecycle operations. Through this interface, users can:
- Create and configure Team and Agent entities
- Upload and version assets (Skills, Wikis, CodeGraphs)
- Review asset sharing permissions
- Configure Fixed Binding relationships
Access this panel by navigating to http://localhost:8123/ in a web browser.
Port 8125: Knowledge Service API
Port 8125 exposes the Knowledge Service (KS), which serves static asset data directly to agents. This endpoint provides the /v3 REST API that agents query to retrieve skill files, wiki pages, and code-graph definitions during conversation context assembly.
# List available skills for a specific team
curl -s "http://127.0.0.1:8125/v3/skill/list?team_id=<team-id>" \
-H "Authorization: Bearer <your-api-key>"
Asset Management and ACL
MemoryHub implements Fixed Binding + ACL (Access Control List) logic to determine asset visibility. The permission hierarchy follows a strict chain: Team → User → Agent → Visibility. This ensures that agents only receive contextually appropriate and authorized memory fragments. The Hub also provides entry points for asset-import scripts that allow agents to submit local conversation history back to the system.
The deployment configuration is documented in deploy/panel-knowledge-combined/README.md, which details how the combined container initializes both services simultaneously.
MemoryProxy: LLM Forwarding Proxy on Port 8096
MemoryProxy functions as a forwarding proxy for Large Language Model endpoints, specifically designed to bridge agent SDKs with external AI providers like Anthropic Claude.
Proxy Functionality and Use Cases
Running on port 8096, this service intercepts LLM API calls from agents and forwards them to the actual model endpoints. According to MemoryProxy/v3-api-memoryproxy-doc.md, the proxy optionally injects the required x-tdai-service-id header and handles authentication token management on behalf of the requesting agents.
This architecture supports "proxy-only" deployments where local development tools (Claude-Code, CodeBuddy, etc.) communicate with the proxy rather than connecting directly to model APIs. This pattern proves valuable when models sit behind corporate firewalls or when centralized logging and token management are required.
API Compatibility
MemoryProxy exports an OpenAI-compatible REST API on port 8096, allowing agents using standard OpenAI SDKs to route through the TencentDB infrastructure without code modifications:
# Forward a completion request through MemoryProxy
curl -s "http://127.0.0.1:8096/v1/completions" \
-H "Content-Type: application/json" \
-H "x-tdai-service-id: default" \
-d '{
"model": "claude-2.1",
"prompt": "Explain the three-component architecture of TencentDB Agent Memory."
}'
The service forwards the request to the configured Anthropic endpoint and returns the model's completion to the caller. Technical operations documentation in docs/tdai-v2-technical-ops.md references this container as tdai-proxy and confirms the default port binding.
Deploying the Three-Component Stack
While the TencentDB Agent Memory components can operate independently, production deployments typically run the full three-in-one stack. Understanding the port mappings enables proper container networking and firewall configuration:
- MemoryCore (8420): Data persistence and retrieval
- MemoryHub (8123/8125): Team management and asset serving
- MemoryProxy (8096): LLM traffic forwarding
Each service validates authentication tokens via the Authorization: Bearer header pattern shown in the examples above, maintaining consistent security posture across the architecture.
Summary
- MemoryCore operates on port 8420 as the primary data plane, storing conversation history and serving the v3 API for memory retrieval and RAG processing.
- MemoryHub utilizes two ports: 8123 for the Team Memory Control Panel UI and 8125 for the Knowledge Service API that delivers assets to agents with ACL enforcement.
- MemoryProxy listens on port 8096 to forward LLM requests to providers like Anthropic, supporting OpenAI-compatible SDKs while injecting required tenant headers.
- Each component is defined in configuration files such as
MemoryCore/tdai-gateway.yamlanddeploy/panel-knowledge-combined/README.md, allowing independent scaling and deployment.
Frequently Asked Questions
What is the default port for MemoryCore in TencentDB Agent Memory?
MemoryCore defaults to port 8420 as configured in MemoryCore/tdai-gateway.yaml via the TDAI_GATEWAY_PORT environment variable. This port exposes the full v3 API for conversation querying, skill retrieval, and metadata management.
How does MemoryHub manage access control for memory assets?
MemoryHub implements Fixed Binding plus ACL checks that enforce a hierarchical permission chain: Team → User → Agent → Visibility. This ensures agents only retrieve skills, wikis, and code-graph assets explicitly authorized for their specific identity and team context.
Can MemoryProxy be used with models other than Anthropic Claude?
Yes. While the reference documentation highlights Anthropic Claude integration, MemoryProxy exposes a standard OpenAI-compatible REST API on port 8096. Any model endpoint compatible with OpenAI's API specification can receive forwarded requests, making the proxy agnostic to the underlying LLM provider.
Are the three TencentDB Agent Memory components required to run together?
No. The services are architected for flexible deployment. You can run MemoryCore independently for pure data persistence, deploy MemoryHub alone for team asset management, or use MemoryProxy in isolation for LLM traffic forwarding. However, full functionality requires all three services to communicate via their respective ports (8420, 8123/8125, and 8096).
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 →