🚀 Quick Start

Create your first agent-based simulation in minutes:

npm install agentjs-core p5
import { BaseAgent, ContinuousSpace, AgentManager } from 'agentjs-core'; class RandomWalker extends BaseAgent { step(): void { const angle = Math.random() * Math.PI * 2; this.move(Math.cos(angle) * 2, Math.sin(angle) * 2); } } const environment = new ContinuousSpace(800, 600); const manager = new AgentManager(environment); manager.addAgent(new RandomWalker(), { x: 400, y: 300 });

🎯 TypeScript-First

Built with TypeScript for type safety, autocomplete, and modern development experience. Comprehensive type definitions for all APIs.

🎨 Visual Excellence

Integrated p5.js visualization with customizable rendering, interactive controls, heat maps, and trail effects.

⚙️ JSON Configuration

Define complete simulations using JSON configs. No coding required for standard models. Perfect for researchers and educators.

🧠 ML Integration

Built-in TensorFlow.js support for reinforcement learning, behavior cloning, and neural network-driven agent behaviors.

📊 Data Collection

Comprehensive data collection with CSV/JSON export, statistical analysis, and Chart.js integration for real-time plotting.

🌐 Multi-Environment

Support for continuous spaces, discrete grids, and network topologies. Spatial indexing for high-performance simulations.

🎓 Educational Focus

Designed for teaching and learning ABM concepts. Extensive examples, tutorials, and classroom-ready materials.

🔧 Research Ready

Parameter sweeps, optimization algorithms, reproducible experiments with seeded randomness, and publication-quality output.

🎮 Example Demos

🐦 Starling Murmuration

Research-accurate flocking with topological neighbors. Compare ML-enhanced vs rule-based flocking behaviors.

🔗 Link to Demo

🧠 ML vs Rule-Based Agents

Interactive comparison of machine learning and traditional rule-based agent behaviors with pathfinding and obstacle avoidance.

🔗 Link to Demo

🎮 Interactive Demo Hub

Central hub showcasing all AgentJS demos with configurable parameters and real-time visualization controls.

🔗 Link to Demo

⚡ Advanced Visualization

Comprehensive demo showcasing particle effects, heat maps, trails, and performance optimization features.

🔗 Link to Demo