โ† Open Source

Deepractice/AgentX on GitHub: TypeScript, AI Engineering, Build agent workflow (SDK), Agent-ready APIs, Automation, Client integration, Tool use.

AI EngineeringBuild agent workflow (SDK)TypeScript
Momentum
+0stars in 24 hours0.0%
85
Stars
10
Forks
+0
This week
17
Contributors
Created 2025-10-28 ยท Updated 2026-11-27 ยท #26642 today
Top developers
README

AgentX

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

ไธ‹ไธ€ไปฃๅผ€ๆบ AI ๆ™บ่ƒฝไฝ“ๅผ€ๅ‘ๆก†ๆžถไธŽ่ฟ่กŒๆ—ถๅนณๅฐ

Event-driven Runtime ยท Multi-provider LLM ยท RoleX Integration ยท TypeScript First

English | ็ฎ€ไฝ“ไธญๆ–‡


๐Ÿš€ Quick Start

Local Mode (Embedded)

Build an AI agent in a few lines of TypeScript:

import { createAgentX } from "agentxjs";
import { nodePlatform } from "@agentxjs/node-platform";
import { createMonoDriver } from "@agentxjs/mono-driver";

const createDriver = (config) => createMonoDriver({
  ...config,
  apiKey: process.env.ANTHROPIC_API_KEY,
  provider: "anthropic",
});

const platform = await nodePlatform({ createDriver }).resolve();
const ax = createAgentX({ platform, createDriver });

// Create a conversation and chat
const agent = await ax.chat.create({
  name: "My Assistant",
  systemPrompt: "You are a helpful assistant.",
});

ax.on("text_delta", (e) => process.stdout.write(e.data.text));
await agent.send("Hello!");

Server Mode

Expose your agent as a WebSocket server:

const ax = createAgentX({ platform, createDriver });
const server = await ax.serve({ port: 5200 });

Remote Mode (WebSocket Client)

Connect to a running AgentX server:

import { createAgentX } from "agentxjs";

const ax = createAgentX();
const client = await ax.connect("ws://localhost:5200");

// Same API as local mode
const agent = await client.chat.create({ name: "My Assistant" });
await agent.send("Hello!");

CLI

Interactive terminal chat:

cd apps/cli
cp .env.example .env.local  # Set DEEPRACTICE_API_KEY
bun run dev

๐Ÿงฉ Core Concepts

AgentX uses a layered concept model inspired by container runtimes:

Prototype (template)  โ†’  Image (persistent)  โ†’  Agent (runtime)
       โ†“                       โ†“                      โ†“
  Reusable definition     Stored in DB          Running in memory
  Registered once         Has session           Has lifecycle
  Like Dockerfile         Like Docker image     Like container
  • Image โ€” persistent agent record with flat config (model, systemPrompt, mcpServers, etc.)
  • Chat โ€” a conversation backed by an Image, accessed via AgentHandle
  • AgentContext โ€” merged runtime configuration passed from Runtime to Driver
  • SendOptions โ€” per-request overrides (model, thinking, providerOptions)

API Architecture

ax.chat.*           // Conversation management (create, list, get โ†’ AgentHandle)
ax.provider.*       // LLM provider configuration
ax.runtime.*        // Low-level subsystems (image, session, container)

Per-Request Overrides with SendOptions

Override model, thinking, or provider options on each send:

// Create with default config
const agent = await ax.chat.create({
  name: "Code Reviewer",
  model: "claude-sonnet-4-6",
  systemPrompt: "You are a code review assistant.",
});

// Override per-request
await agent.send("Review this PR...", { thinking: "high" });
await agent.send("Quick question", { model: "claude-haiku-4-5" });

๐Ÿ› ๏ธ Packages

Package Description
agentxjs Client SDK โ€” local, remote, and server modes
@agentxjs/core Core abstractions โ€” Container, Image, Session, Driver
@agentxjs/node-platform Node.js platform โ€” SQLite persistence, WebSocket
@agentxjs/mono-driver Multi-provider LLM driver (Anthropic, OpenAI, Google, etc.)
@agentxjs/claude-driver Claude-specific driver with extended features
@agentxjs/devtools BDD testing tools โ€” MockDriver, RecordingDriver, Fixtures

Multi-Provider Support

MonoDriver supports multiple LLM providers via Vercel AI SDK:

  • Anthropic (Claude) โ€” provider: "anthropic"
  • OpenAI (GPT) โ€” provider: "openai"
  • Google (Gemini) โ€” provider: "google"
  • DeepSeek โ€” provider: "deepseek"
  • Mistral โ€” provider: "mistral"
  • xAI (Grok) โ€” provider: "xai"
  • OpenAI-compatible โ€” provider: "openai-compatible"

RoleX Integration

MonoDriver integrates with RoleX for AI role management โ€” identity, goals, knowledge, and cognitive growth cycles:

import { localPlatform } from "@rolexjs/local-platform";

const driver = createMonoDriver({
  ...config,
  rolex: {
    platform: localPlatform(),
    roleId: "my-role",
  },
});

๐Ÿ—๏ธ 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 โ†’ LLM Driver
  โ† Output: Driver โ†’ BUS โ†’ AgentEngine โ†’ BUS โ†’ Client

๐Ÿ’ฌ About

AgentX is in active development. We welcome your ideas, feedback, and contributions!

๐ŸŒ Ecosystem

Part of the Deepractice AI infrastructure:

  • RoleX โ€” AI role management system (identity, cognition, growth)
  • ResourceX โ€” Unified resource manager
  • IssueX โ€” Structured issue tracking for AI collaboration

๐Ÿ“ž Connect

Connect with the Founder

๐Ÿ“ง sean@deepractice.ai

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


Built with โค๏ธ by Deepractice

Nearby in the ranking
Similar items

AI Rank for iPhone

Follow AI model rankings

Download on the App Store