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

@agent-os-lab/agent-game-sdk

v0.1.9

Published

Embeddable agent game views and runtime clients.

Readme

Agent Game SDK

Embeddable agent game views and runtime clients.

For the full integration guide, see USAGE.md.

Office View

Framework-neutral mount API:

import { AgentGameRuntimeBrowserClient } from "@agent-os-lab/agent-game-sdk";
import { mountAgentGameOffice } from "@agent-os-lab/agent-game-sdk/office";

const client = new AgentGameRuntimeBrowserClient({
  baseUrl: "",
  accessToken: async () => getScopedToken(),
});

const view = await mountAgentGameOffice(container, {
  renderer: "three",
  office: {
    rooms: [
      { type: "office" },
      { type: "auditorium", capacity: 40 },
      { type: "gym" },
    ],
  },
  source: {
    type: "runtime",
    client,
  },
});

view.focusAgent("agent-1");
view.refreshAgents();
view.destroy();

React wrapper:

import { useState } from "react";
import { AgentGameRuntimeBrowserClient } from "@agent-os-lab/agent-game-sdk";
import type { AgentGameOfficeController } from "@agent-os-lab/agent-game-sdk/office";
import { AgentGameOfficeView } from "@agent-os-lab/agent-game-sdk/office/react";

const client = new AgentGameRuntimeBrowserClient({
  baseUrl: "",
});

export function Office() {
  const [view, setView] = useState<AgentGameOfficeController | null>(null);

  return (
    <>
      <button type="button" onClick={() => view?.refreshAgents()}>
        Refresh agents
      </button>
      <AgentGameOfficeView
        renderer="three"
        office={{
          rooms: [
            { type: "office" },
            { type: "auditorium" },
            { type: "gym" },
          ],
        }}
        source={{ type: "runtime", client }}
        style={{ height: 640 }}
        onReady={setView}
        onDestroy={() => setView(null)}
      />
    </>
  );
}

agent-game-sdk/office is renderer and framework neutral. agent-game-sdk/office/react is the React-only entrypoint.

Runtime Agent List

Use subscribeAgentPresenceList when an app needs the live Agent roster and status outside the 3D office view:

import {
  AgentGameRuntimeBrowserClient,
  formatAgentPresenceStatus,
  subscribeAgentPresenceList,
} from "@agent-os-lab/agent-game-sdk";

const client = new AgentGameRuntimeBrowserClient({
  baseUrl: "",
});

const subscription = await subscribeAgentPresenceList(client, {
  onAgentsChange: (agents) => {
    renderAgentList(agents.map((agent) => ({
      id: agent.agentId,
      name: agent.displayName,
      status: formatAgentPresenceStatus(agent.status),
      activity: agent.activity?.summary,
    })));
  },
});

const currentAgents = subscription.getAgents();
subscription.close();

The helper applies runtime snapshot messages as the full roster and patch messages as incremental updates, so consumers always receive a complete sorted Agent list.

The built-in 3D renderer supports semantic room configuration. If office is omitted, the SDK renders the default office + auditorium + gym layout. To choose visible rooms, pass office.rooms in the order you want them assembled:

office: {
  rooms: [
    { type: "office" },
    { type: "gym" },
  ],
}

Built-in room types are office, auditorium, and gym. capacity is optional and affects generated agent placement anchors; desks, walls, meeting rooms, gym equipment, windows, and raw coordinates stay internal to the SDK.

Runtime statuses stay unchanged. The SDK locally distributes idle and resting agents across ambient areas such as lounge, pantry, gym, and reading/bookcase anchors so inactive agents do not all gather at the sofa.

Browser clients should call an application BFF endpoint. By default the browser client requests /api/agent-game-runtime-token on the same origin. Configure tokenPath only if your application exposes that BFF route at a different path.

Keep the AgentOS service API key on the server; the SDK server client forwards it to Agent Game Runtime. The runtime token endpoint path is SDK-managed and defaults to Agent Game Runtime's /api/v1/game-runtime-token, so application code only needs baseUrl and apiKey:

import { AgentGameRuntimeServerClient } from "@agent-os-lab/agent-game-sdk";

const client = new AgentGameRuntimeServerClient({
  baseUrl: process.env.AGENT_GAME_RUNTIME_BASE_URL!,
  apiKey: process.env.AGENTOS_API_KEY!,
});

export async function GET() {
  return Response.json(await client.createRuntimeToken());
}

Local Demo

Run the SDK office view demo:

AGENT_GAME_RUNTIME_BASE_URL=http://localhost:3107 AGENTOS_API_KEY=... bun run demo

Open http://localhost:7357. Set PORT=7358 or another value to change the port.

Publish

Publishing is controlled from this SDK package directory. The script bumps the package version, builds the package, runs npm pack --dry-run, and then publishes to npm:

bun run sdk:publish

The default release is patch. Use --minor or --major when needed:

bun run sdk:publish -- --minor

Use --dry-run to validate the next version and package contents without publishing. The script restores the previous version after a dry run.

If npm requires two-factor authentication, pass the one-time password with --otp:

bun run sdk:publish -- --otp 123456