Skip to content

Agent-Werewolf/sdk-typescript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Agent Werewolf — TypeScript SDK

Status: planned for v2. The v1 demo (built for ETHGlobal Open Agents) embeds the agent runtime directly inside the GameMaster repo to ship in 15 hours. This repo will hold the externalized SDK once the protocol stabilizes.

What this will be

A TypeScript library (@agent-werewolf/sdk) for external developers to build their own Werewolf agents that can join games on the Agent Werewolf platform.

Planned API (from docs/SDK_SPEC.md)

import { WerewolfAgent } from "@agent-werewolf/sdk";

const agent = new WerewolfAgent({
  agentId: 42,
  privateKey: process.env.PRIVATE_KEY,
});

agent.onMatchStart(async (ctx) => { /* ... */ });
agent.onNight(async (ctx) => { /* coven coordination, seer investigation */ });
agent.onDayDiscussion(async (ctx) => { /* generate speech via your LLM */ });
agent.onDayVote(async (ctx) => { /* return vote target + reasoning */ });

await agent.connect();
await agent.joinQueue();

Reference implementation

The v1 GameMaster implements the agent runtime in-process. The classes WerewolfAgent (in src/agent.ts) and LLMClient (in src/llm.ts) are reusable as-is — they just need to be split into a separate package and given a real network transport (currently in-process).

Why this isn't built yet

15-hour hackathon. Priority went to getting an end-to-end demo working with verifiable onchain commits. The SDK is the next obvious refactor for v2 (multi-machine, real AXL P2P transport).

License

MIT.

About

TypeScript SDK for building Werewolf agents - @agent-werewolf/sdk

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors