
Security News
/Research
Fake Corepack Site Distributes Infostealer and Proxyware to Developers
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.
@agentxjs/portagent
Advanced tools

Portagent is a multi-user AI Agent gateway powered by AgentX. It provides a web-based interface for interacting with Claude AI agents, with built-in user authentication and session management.
One-liner to start, requires Node.js 20+:
LLM_PROVIDER_KEY=sk-ant-xxxxx \
LLM_PROVIDER_URL=https://api.anthropic.com \
npx @agentxjs/portagent
Then open http://localhost:5200 in your browser.
docker run -d \
--name portagent \
-p 5200:5200 \
-e LLM_PROVIDER_KEY=sk-ant-xxxxx \
-e LLM_PROVIDER_URL=https://api.anthropic.com \
-v ./data:/home/node/.agentx \
deepracticexs/portagent:latest
Then open http://localhost:5200 in your browser.
Create a .env file:
LLM_PROVIDER_KEY=sk-ant-xxxxx
JWT_SECRET=your-secure-random-secret
Create docker-compose.yml:
services:
portagent:
image: deepracticexs/portagent:latest
container_name: portagent
restart: unless-stopped
ports:
- "5200:5200"
environment:
- LLM_PROVIDER_KEY=${LLM_PROVIDER_KEY}
- LLM_PROVIDER_URL=${LLM_PROVIDER_URL:-https://api.anthropic.com}
- LLM_PROVIDER_MODEL=${LLM_PROVIDER_MODEL:-claude-sonnet-4-20250514}
- JWT_SECRET=${JWT_SECRET}
- INVITE_CODE_REQUIRED=${INVITE_CODE_REQUIRED:-false}
- LOG_LEVEL=${LOG_LEVEL:-info}
volumes:
- ./data:/home/node/.agentx
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:5200/health"]
interval: 30s
timeout: 10s
start_period: 5s
retries: 3
Run:
docker compose up -d
# Install globally
npm install -g @agentxjs/portagent
# Run with required environment variables
export LLM_PROVIDER_KEY=sk-ant-xxxxx
export LLM_PROVIDER_URL=https://api.anthropic.com
portagent
| Variable | Required | Default | Description |
|---|---|---|---|
LLM_PROVIDER_KEY | Yes | - | Anthropic API key (starts with sk-ant-) |
LLM_PROVIDER_URL | No | https://api.anthropic.com | API base URL |
LLM_PROVIDER_MODEL | No | claude-sonnet-4-20250514 | Claude model to use |
PORT | No | 5200 | Server port |
AGENTX_DIR | No | ~/.agentx | AgentX data directory path |
JWT_SECRET | No | Auto-generated | Secret for JWT token signing |
INVITE_CODE_REQUIRED | No | false | Require invite code for registration |
LOG_LEVEL | No | info | Log level: debug, info, warn, error |
NODE_ENV | No | production | Environment mode |
portagent [options]
Options:
-p, --port <port> Port to listen on (default: 5200)
-d, --data-dir <path> Data directory (default: ~/.agentx)
-e, --env-file <path> Path to environment file
--jwt-secret <secret> JWT secret for token signing
--api-key <key> LLM provider API key
--api-url <url> LLM provider base URL
--model <model> LLM model name
-h, --help Display help
-V, --version Display version
~/.agentx/ # Default data directory (configurable via AGENTX_DIR)
├── data/ # Database files
│ ├── agentx.db # AgentX data (containers, images, sessions)
│ └── portagent.db # User authentication data
└── logs/ # Log files
└── portagent.log
Portagent uses a daily rotating invite code for registration security. The invite code is the Unix timestamp (in seconds) of today's 00:00:01 in the server's timezone.
Linux/macOS:
# For server's local timezone
date -d "today 00:00:01" +%s
# For UTC (Docker default)
TZ=UTC date -d "today 00:00:01" +%s
# macOS syntax
date -j -f "%Y-%m-%d %H:%M:%S" "$(date +%Y-%m-%d) 00:00:01" "+%s"
JavaScript:
// Server's local timezone
const now = new Date();
const todayStart = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 1);
const inviteCode = Math.floor(todayStart.getTime() / 1000);
console.log(inviteCode);
Note: Docker containers typically run in UTC timezone. Make sure to calculate the invite code for the correct timezone.
Set INVITE_CODE_REQUIRED=true to require invite codes for registration:
docker run -e INVITE_CODE_REQUIRED=true ...
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /health | No | Health check |
| GET | /api/auth/config | No | Get auth configuration |
| POST | /api/auth/register | No | Register new user |
| POST | /api/auth/login | No | Login |
| GET | /api/auth/verify | Yes | Verify token |
| POST | /api/auth/logout | No | Logout (client-side) |
| GET | /agentx/info | Yes | Get platform info |
| WS | /ws | Yes | WebSocket connection |
All protected endpoints require a JWT token in the Authorization header:
Authorization: Bearer <token>
For WebSocket connections (which don't support headers), pass the token as a query parameter:
ws://localhost:5200/ws?token=<token>
curl -X POST http://localhost:5200/api/auth/register \
-H "Content-Type: application/json" \
-d '{
"username": "john",
"password": "secret123",
"inviteCode": "1765152001",
"email": "john@example.com",
"displayName": "John Doe"
}'
curl -X POST http://localhost:5200/api/auth/login \
-H "Content-Type: application/json" \
-d '{
"usernameOrEmail": "john",
"password": "secret123"
}'
Pre-built images are available on Docker Hub:
# Latest version
docker pull deepracticexs/portagent:latest
# Specific version
docker pull deepracticexs/portagent:0.1.9
# Available architectures: linux/amd64, linux/arm64
# From repository root
docker build -t portagent:local -f apps/portagent/Dockerfile .
# Run local build
docker run -d \
--name portagent \
-p 5200:5200 \
-e LLM_PROVIDER_KEY=sk-ant-xxxxx \
portagent:local
services:
portagent:
image: deepracticexs/portagent:0.1.9 # Pin to specific version
restart: unless-stopped
environment:
- LLM_PROVIDER_KEY=${LLM_PROVIDER_KEY}
- JWT_SECRET=${JWT_SECRET} # Use a strong, persistent secret
- INVITE_CODE_REQUIRED=true # Enable for production
- LOG_LEVEL=info
volumes:
- ./data:/home/node/.agentx # Persist data
ports:
- "5200:5200"
LLM_PROVIDER_KEY in client-side code or logsnodeserver {
listen 443 ssl;
server_name portagent.example.com;
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
location / {
proxy_pass http://localhost:5200;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
LLM_PROVIDER_KEY environment variable is set-e LLM_PROVIDER_KEY=xxx or environment: in composeINVITE_CODE_REQUIRED=false to disablenodesudo chown -R $(id -u):$(id -g) ./data
# Docker logs
docker logs portagent
# Follow logs
docker logs -f portagent
# Log files inside container
docker exec portagent cat /home/node/.agentx/logs/portagent.log
# Clone repository
git clone https://github.com/Deepractice/AgentX.git
cd AgentX
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Start development server
cd apps/portagent
pnpm dev
MIT License - see LICENSE for details.
FAQs
Portagent - AgentX Portal Application
The npm package @agentxjs/portagent receives a total of 43 weekly downloads. As such, @agentxjs/portagent popularity was classified as not popular.
We found that @agentxjs/portagent demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
/Research
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.

Research
/Security News
A large-scale campaign abused GitHub Actions in compromised repositories to exploit CVE-2026-41940 in cPanel and WHM and steal server credentials.

Security News
Five frontier LLMs generated the same nonexistent package names, leaving 53 available for potential slopsquatting across PyPI and npm.