Skip to content

AgentX · Next-generation open-source AI agent development framework and runtime platform | 下一代 AI 智能体开发框架和运行时平台

License

Notifications You must be signed in to change notification settings

Deepractice/AgentX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AgentX

Next-generation open-source AI agent development framework and runtime platform

下一代开源 AI 智能体开发框架与运行时平台

Event-driven Runtime · Simple Framework · Minimal UI · Ready-to-use Portal

事件驱动 · 简易开发 · 界面简约 · 开箱即用

Stars Views License npm Docker

English | 简体中文


🚀 Quick Start

Run your AI Agent gateway in one command:

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/agentx/.agentx \
  deepracticexs/portagent:latest

Open http://localhost:5200 and start chatting!

Portagent Demo

What You Get

  • Multi-User Support - User registration (invite code optional)
  • Session Persistence - Resume conversations anytime
  • Real-time Streaming - WebSocket-based communication
  • Docker Ready - Production-ready with health checks

Tip: Add -e INVITE_CODE_REQUIRED=true to enable invite code protection.

👉 Full Portagent Documentation - Configuration, deployment, API reference


🛠️ Build with AgentX

AgentX is a TypeScript framework for building AI Agent applications with event-driven architecture.

Server-side (Node.js)

import { createAgentX } from "agentxjs";

// Create AgentX instance with WebSocket server
const agentx = await createAgentX({
  llm: {
    apiKey: process.env.ANTHROPIC_API_KEY,
    baseUrl: process.env.ANTHROPIC_BASE_URL,
  },
  storage: { driver: "fs", path: "./data" },
});

// Create container for agents
await agentx.request("container_create_request", {
  containerId: "default",
});

// Start WebSocket server
await agentx.listen(5200);
console.log("✓ Server running on ws://localhost:5200");

Client-side (Browser/React)

import { useAgentX } from "@agentxjs/ui";

function ChatApp() {
  const agentx = useAgentX("ws://localhost:5200");

  if (!agentx) return <div>Connecting...</div>;

  return <Studio agentx={agentx} />;
}

UI Components

npm install @agentxjs/ui

Production-ready React components with Tailwind CSS:

  • <Studio> - Complete chat workspace (AgentList + Chat)
  • <Chat> - Chat interface with message history
  • <AgentList> - Agent/session list with search
  • useAgentX() - React hook for server connection

👉 Full AgentX Documentation - Architecture, API reference, guides, and examples


🏗️ Architecture

Event-driven architecture with layered design:

SERVER SIDE                      SYSTEMBUS                   CLIENT SIDE
═══════════════════════════════════════════════════════════════════════════

                                     ║
┌─────────────────┐                  ║
│  Environment    │                  ║
│  • LLMProvider  │      emit        ║
│  • Sandbox      │─────────────────>║
└─────────────────┘                  ║
                                     ║
                                     ║
┌─────────────────┐    subscribe     ║
│  Agent Layer    │<─────────────────║
│  • AgentEngine  │                  ║
│  • Agent        │      emit        ║
│                 │─────────────────>║         ┌─────────────────┐
│  4-Layer Events │                  ║         │                 │
│  • Stream       │                  ║ broadcast │  WebSocket   │
│  • State        │                  ║════════>│ (Event Stream)  │
│  • Message      │                  ║<════════│                 │
│  • Turn         │                  ║  input  │  AgentX API     │
└─────────────────┘                  ║         └─────────────────┘
                                     ║
                                     ║
┌─────────────────┐                  ║
│  Runtime Layer  │                  ║
│                 │      emit        ║
│  • Persistence  │─────────────────>║
│  • Container    │                  ║
│  • WebSocket    │<─────────────────╫
│                 │─────────────────>║
└─────────────────┘                  ║
                                     ║
                              [ Event Bus ]
                             [ RxJS Pub/Sub ]

Event Flow:
  → Input:  Client → WebSocket → BUS → Claude SDK
  ← Output: SDK → BUS → AgentEngine → BUS → Client

💬 About

AgentX is in early development. We welcome your ideas, feedback, and feature requests!

🌐 Ecosystem

Part of the Deepractice AI development ecosystem:

  • PromptX - Prompt engineering and management framework
  • DPML - Deepractice Markup Language for AI workflows
  • DARP - Deepractice Agent Runtime Protocol
  • Lucid-UI - AI-powered UI component library

📞 Connect

Connect with the Founder

📧 sean@deepractice.ai

WeChat QR Code

Scan to connect with Sean (Founder & CEO) on WeChat


Built with ❤️ by Deepractice

About

AgentX · Next-generation open-source AI agent development framework and runtime platform | 下一代 AI 智能体开发框架和运行时平台

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published