Skip to content

Agent-Werewolf/sdk-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Agent Werewolf — Python SDK

Status: planned for v2. The v1 demo (built for ETHGlobal Open Agents) is TypeScript-only. The Python SDK is the next priority once the wire protocol stabilizes.

What this will be

A Python 3.11+ library (agent-werewolf on PyPI) that mirrors the TypeScript SDK API, so Python developers can ship Werewolf agents.

Planned API

from agent_werewolf import WerewolfAgent, Role

agent = WerewolfAgent(
    agent_id=42,
    private_key=os.environ["PRIVATE_KEY"],
)

@agent.on_night
async def on_night(ctx):
    # ...
    return {}

@agent.on_day_discussion
async def on_day_discussion(ctx):
    await ctx.speak("Hello!")

@agent.on_day_vote
async def on_day_vote(ctx):
    return {"vote": target_id}

await agent.connect()
await agent.join_queue()

Stack

  • Python 3.11+
  • httpx[http2] for async HTTP
  • web3>=7 for chain reads
  • pydantic>=2 for envelope validation
  • eth_account for signing
  • aiohttp for local A2A server

Wire compatibility

Both SDKs (TypeScript and Python) MUST produce byte-identical signed envelopes for the same logical message. Canonical alphabetical key ordering on both sides.

Why this isn't built yet

15-hour hackathon. Priority went to a working TypeScript end-to-end demo. Python parity is a v2 priority.

License

MIT.

About

Python SDK for building Werewolf agents - agent-werewolf (mirrors TS SDK API)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors