npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@main12/agent-office-plugin

v0.1.3

Published

Payload CMS plugin for AI agent virtual office visualization — PixiJS canvas, multi-floor, multi-agent, WebSocket-ready

Readme

🏢 @main12/agent-office-plugin

Payload CMS plugin for AI agent virtual office visualization. Built with PixiJS, WebSocket, and the official Payload plugin architecture.

Overview

Renders a 2D/isometric virtual office where AI agents from different departments interact graphically — think "AI Town meets corporate office." Agents walk between departments, chat in real-time, and execute tasks while you monitor everything in a PixiJS canvas.

Business model: Plugin is open-source (MIT). Agent server SaaS is paid.

Quick Start

# In your Payload project:
pnpm add @main12/agent-office-plugin
// payload.config.ts
import { agentOfficePlugin } from '@main12/agent-office-plugin'

export default buildConfig({
  plugins: [
    agentOfficePlugin({ enabled: true })
  ]
})
// Any page/dashboard ('use client'):
import { AgentOffice } from '@main12/agent-office-plugin/client'

<AgentOffice officeSlug="acme-hq" theme="pixel" />

Plugin Options

agentOfficePlugin({
  enabled: true,                  // enable the plugin
  defaultWsEndpoint: 'wss://...', // default WebSocket endpoint for offices
  maxFloorsPerOffice: 10,         // floor limit per office (default: 10)
  maxAgentsPerFloor: 50,          // agent limit per floor (default: 50)
  collections: { ... }            // selectively enable collections
})

Features

  • 🎮 PixiJS engine — isometric + flat tilemap renderers, animated agent sprites (LPC layered sprites), A* pathfinding, agent routines, chat bubbles
  • 🏢 Multi-floor — scale vertically with floors instead of infinite single plane, floor selector UI
  • 🗺️ Map Editor — design floor plans with predesigned office blocks, rotation support, save directly to Payload floors
  • 🪑 Furniture system — furniture sets, styles registry, set editor and layout preview tools
  • 📦 Asset pack uploads — upload agent sprite packs (ZIP) and furniture packs (ZIP/.nitro/.ps1) straight into Payload collections
  • 🔀 Workflow channelspublic | department | direct message visibility, channel-scoped communication
  • 🔗 Cross-floor events — agents can escalate between floors
  • 🎨 Three themespixel, corporate, minimal
  • 🔌 AG-UI compatible WebSocket protocol — JSON over WSS with snapshot/spawn/move/message/action/tool-call events
  • 📦 Zero template changes — install and use, no template modifications
  • 👥 Multi-tenant ready — separate office per client

Collections Added

| Collection | Slug | Purpose | |------------|------|---------| | Offices | agent-offices | Office configs (floors, wsEndpoint, theme) | | Floors | agent-floors | Floor plans / tilemaps | | Departments | agent-departments | Department zones with colors | | Agents | agent-agents | Agent definitions (sprites, LPC layers) | | Agent Providers | agent-providers | WS/REST agent runtime providers | | Furniture | agent-furniture | Furniture sprites/items | | Furniture Sets | agent-furniture-sets | Furniture bundles | | Global | agent-office-settings | Plugin settings |

Exports

Server (.)

  • agentOfficePlugin — plugin entry
  • AgentOfficePluginOptions — plugin option types

Client (./client)

  • Components: AgentOffice, MapEditor, MapViewer, SetEditor, FloorMapEditorUI, SetEditorAdminUI, AgentAvatarPreviewUI, FurniturePreviewUI, FurnitureBulkUploadUI, ConfigDrawer, PlacedItemsDrawer, FurnitureStylesModal, AgentSprite (Pixi)
  • Presentation blocks: PREDESIGNED_BLOCKS, FLOOR_BLOCKS, rotateOfficeBlock, isWithinBlockBounds
  • Mappers/adapters: OfficeMapper, FloorMapper, AgentMapper, FurnitureMapper, FurnitureSetMapper
  • Types: AgentOfficeComponentProps, AgentState, AgentEvent, OfficeConfig, FloorPlan, OfficeBlock

WebSocket Protocol

See specs/PROTOCOL.md — Agent Office Protocol (AOP) v0.2.0-draft:

  • JSON over WebSocket (WSS), orchestrator/broker pattern — the Main12 Agent Server routes events; clients own agents and API keys
  • Provider types: hermes-agent, claude-api, openai-api, ollama, crewai, langgraph, autogen, custom-ws, main12-managed
  • Lifecycle: SUBSCRIBE {officeId, token, channels, floor}OFFICE_SNAPSHOT + AGENT_SPAWN events
  • Agent states: idle | busy | thinking | waiting | error
  • Events: AGENT_MOVE (tween path or local A*), AGENT_MESSAGE, AGENT_BROADCAST, AGENT_ACTION_START/COMPLETE, AGENT_TOOL_CALL — all AG-UI compatible

Architecture

┌──────────────┐     REST      ┌──────────────────┐
│   Payload    │◄─────────────►│   Agent Server   │
│   (config)   │               │   (Docker / DO)   │
└──────────────┘               └────────┬─────────┘
       │                                 │
       │ Payload API                     │ WebSocket (AOP)
       │                                 │
       ▼                                 ▼
┌─────────────────────────────────────────────────┐
│              <AgentOffice />                     │
│         (PixiJS + React, A* pathfinding)         │
└─────────────────────────────────────────────────┘

Project Structure

src/
├── index.ts              → Plugin entry (server)
├── exports/
│   ├── client.ts         → 'use client' exports
│   └── rsc.ts            → RSC exports
├── collections/          → Offices, Floors, Departments, Agents,
│                           AgentProviders, Furniture, FurnitureSets
├── globals/
│   └── AgentOfficeSettings.ts
└── shared/
    ├── domain/           → Types, protocol, tile model (0=empty,1=floor,2=wall,3=desk,4=meeting_room)
    ├── infrastructure/   → Pixi engine (OfficeCanvas, AgentSprite, IsoTilemapRenderer,
    │                       Pathfinding, AgentRoutines, ChatBubble, isometric helpers)
    ├── interface/        → Hooks (useAgentWebSocket), handlers
    └── presentation/     → Editor UI components

Development

pnpm install
pnpm dev          # Start dev server with test project (Next + Payload, turbo)
pnpm test:int     # Run integration tests (vitest)
pnpm test:e2e     # Run E2E tests (playwright)
pnpm build        # Build dist/ (copyfiles + tsc types + swc)

Dev app routes: office-demo (full AgentOffice demo), map-editor, set-editor, set-preview, agent-preview, furniture-preview.

Dependencies

| Required | Optional (enhanced UX) | |----------|----------------------| | payload ^3.86 | @heroui/react | | react ^19 | framer-motion | | next ^16 | lucide-react | | pixi.js ^8 | | | tailwindcss ^4 | |

Node ≥ 24.15, pnpm 9–11.

Roadmap

  • [x] Phase 1: Data model + Payload collections
  • [x] Phase 3: PixiJS engine (sprites, tilemaps, pathfinding, animations)
  • [x] Map editor, set editor, asset pack uploaders
  • [ ] WebSocket agent server implementation (protocol spec done)
  • [ ] Agent detail panel
  • [ ] Agent server (Docker + CrewAI ref)
  • [ ] Playground / Demo hosting
  • [ ] RSC exports

License

MIT — Main 12 Technologies