# TencentDB Agent Memory Ports: Complete Guide to Core Service Networking

> Discover the TencentDB Agent Memory ports for core services: 8420, 8096, 8421, 8123, 5173, and 6379. Understand your TencentDB Agent Memory networking.

- Repository: [Tencent Cloud/TencentDB-Agent-Memory](https://github.com/TencentCloud/TencentDB-Agent-Memory)
- Tags: how-to-guide
- Published: 2026-09-02

---

**TencentDB Agent Memory uses six default ports: 8420 (Memory Core gateway), 8096 (Memory Proxy), 8421 (Memory Knowledge), 8123 (Memory Panel API), 5173 (Vite dev server), and 6379 (Redis cache).**

All port assignments are defined in YAML and TypeScript configuration files across the repository and can be overridden via environment variables. This guide maps each service to its default port, shows where to verify assignments in the source code, and provides ready-to-run commands for testing connectivity.

## Memory Core Gateway: Port 8420

The **Memory Core** serves as the central gateway that routes requests to the memory engine and skill module. Its default HTTP port is **8420**.

This value is hard-coded in [`MemoryCore/tdai-gateway.yaml`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/MemoryCore/tdai-gateway.yaml):

```yaml
server:
  port: 8420

```

Verify the gateway is running:

```bash
curl -s http://127.0.0.1:8420/health | jq

```

The gateway binds to `127.0.0.1` by default. Production deployments typically override this through environment-specific YAML files.

## Memory Proxy: Port 8096

The **Memory Proxy** layer adds authentication, rate-limiting, and optional Redis-backed session storage. It listens on **8096** by default.

The port is defined in [`MemoryProxy/src/config.ts`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/MemoryProxy/src/config.ts):

```typescript
port: envInt('PORT', 8096),

```

An example configuration in [`MemoryProxy/config.example.yaml`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/MemoryProxy/config.example.yaml) mirrors this default.

Test the proxy endpoint:

```bash
curl -X POST http://127.0.0.1:8096/v3/skill/list \
     -H "x-tdai-service-id: default" \
     -H "Content-Type: application/json" \
     -d '{"team_id":"smoke-team"}' | jq

```

Unlike the core gateway, the proxy typically binds to `0.0.0.0` to accept external connections.

## Memory Knowledge: Port 8421

The **Memory Knowledge** service stores and serves knowledge-base (wiki) assets on port **8421**.

Configuration in [`MemoryKnowledge/src/config.ts`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/MemoryKnowledge/src/config.ts):

```typescript
port: envInt("PORT", 8421)

```

Query the knowledge service:

```bash
curl -s http://127.0.0.1:8421/v3/wiki/list \
     -H "Content-Type: application/json" \
     -d '{"team_id":"my-team"}' | jq

```

## Memory Panel: Ports 8123 and 5173

The **Memory Panel** exposes two distinct ports depending on the deployment mode.

### Production API: Port 8123

The panel back-end HTTP API uses **8123** as defined in [`MemoryPanel/src/panel/config/panel-config.ts`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/MemoryPanel/src/panel/config/panel-config.ts):

```typescript
envInt('PORT', 8123)

```

### Development Server: Port 5173

The Vite-powered front-end development server runs on **5173**, configured in [`MemoryPanel/web/vite.config.ts`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/MemoryPanel/web/vite.config.ts):

```typescript
export default defineConfig({
  server: {
    port: 5173,
  },
})

```

Start local development:

```bash
cd MemoryPanel/web
npm run dev   # → http://localhost:5173

```

## Redis Cache: Port 6379

Multiple services share a **Redis** instance for caching, session storage, and queues. The default **6379** appears in several configuration files:

- [`MemoryProxy/src/config.ts`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/MemoryProxy/src/config.ts): `redis.port: 6379`
- [`MemoryCore/src/config.ts`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/MemoryCore/src/config.ts): `redis.port: 6379`

Each service can override this via the `REDIS_PORT` environment variable or its respective config file.

## Port Configuration Reference Table

| Service | Default Port | Config File | Environment Variable |
|---------|-------------|-------------|----------------------|
| Memory Core Gateway | 8420 | [`MemoryCore/tdai-gateway.yaml`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/MemoryCore/tdai-gateway.yaml) | — |
| Memory Proxy | 8096 | [`MemoryProxy/src/config.ts`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/MemoryProxy/src/config.ts) | `PORT` |
| Memory Knowledge | 8421 | [`MemoryKnowledge/src/config.ts`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/MemoryKnowledge/src/config.ts) | `PORT` |
| Memory Panel API | 8123 | [`MemoryPanel/src/panel/config/panel-config.ts`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/MemoryPanel/src/panel/config/panel-config.ts) | `PORT` |
| Vite Dev Server | 5173 | [`MemoryPanel/web/vite.config.ts`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/MemoryPanel/web/vite.config.ts) | — |
| Redis | 6379 | [`MemoryProxy/src/config.ts`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/MemoryProxy/src/config.ts), [`MemoryCore/src/config.ts`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/MemoryCore/src/config.ts) | `REDIS_PORT` |

## How to Override Default Ports

All TypeScript-based services use a common `envInt()` helper pattern. To change any port:

```bash

# Start Memory Knowledge on custom port

PORT=9000 npm run start

# Start Memory Proxy with custom Redis

PORT=9001 REDIS_PORT=6380 npm run start

```

YAML-based configurations in `MemoryCore/` typically require file edits or volume mounts in containerized deployments.

## Network Security Considerations

- **Bind addresses**: Core services default to `127.0.0.1` (localhost-only). The proxy uses `0.0.0.0` for external accessibility.
- **Port conflicts**: The 84xx range (8420, 8421) is reserved for TencentDB Agent Memory internal services. Avoid colliding with these in co-located deployments.
- **Firewall rules**: Production deployments should restrict 8096 (proxy) and 8123 (panel API) to trusted LB/reverse proxy hosts.

## Summary

- **TencentDB Agent Memory ports** span 8420, 8096, 8421, 8123, 5173, and 6379 for core gateway, proxy, knowledge, panel API, dev server, and Redis respectively.
- **Configuration sources** are split between YAML (`MemoryCore/`) and TypeScript ([`src/config.ts`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/src/config.ts)) files across service directories.
- **Environment variables** (`PORT`, `REDIS_PORT`) enable runtime overrides without code changes.
- **Health checks** use simple `curl` commands against `/health` or versioned API endpoints.

## Frequently Asked Questions

### How do I check which ports are actively listening on my TencentDB Agent Memory host?

Run `netstat -tlnp` or `ss -tlnp` on Linux to verify listening ports. Cross-reference PIDs with `ps aux | grep node` to map processes to services. Each service logs its startup port in console output (e.g., `Server listening on 8420`).

### Can I run multiple TencentDB Agent Memory services on the same machine?

Yes, but assign unique ports to avoid conflicts. Use environment variables: `PORT=8420` for core, `PORT=8096` for proxy, etc. The services communicate via HTTP, so they can be distributed across hosts using the same default ports.

### Why does the Vite dev server use port 5173 instead of matching the panel API port?

Port **5173** is Vite's default development server port, hard-coded in [`vite.config.ts`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/vite.config.ts). This separation lets front-end developers run hot-reloading independently from the production API backend (8123). Build for production with `npm run build` to serve static files through the 8123 API.

### Where is Redis port 6379 configured if I want to change it?

Check [`MemoryProxy/src/config.ts`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/MemoryProxy/src/config.ts) and [`MemoryCore/src/config.ts`](https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/main/MemoryCore/src/config.ts). Both contain `redis: { port: envInt('REDIS_PORT', 6379) }`. Set `REDIS_PORT` environment variable or modify the fallback value in both files for consistency.