moo.agent.agent_tools
Stage-2 PydanticAI tools — one async function per MOO command an agent can issue.
Each tool follows the same shape:
Build the command string (translate logic, ported verbatim from the old
tools.pyToolSpec.translatecallables).await ctx.deps.limiter.wait()to respect the per-agent rate cap.await ctx.deps.connection.request(cmd, async_wait_s=..., async_pattern=...)per the spec table indocs/specs/pydantic-ai-stage-2.md.ctx.deps.on_window_append(f"> {cmd}")so the brain’s rolling window reflects what was sent.Return the resulting MOO output string to the model.
Side-effecting tools (respond, done, teleport, page) follow
slightly different shapes — see each function’s docstring.
The async-wait patterns for Celery-backed verbs live here as module-level
re.Pattern constants. Their meanings are documented in the spec.
Functions
|
Add an alias name to an object so players can refer to it by that name. |
|
Atomic bidirectional dig: creates a forward exit to a new room, moves you into it, and wires the return exit automatically (opposite direction). |
|
Clear The Dispatch Board and Survey Book entries for a specific topic. |
|
Close a container or door. |
|
Create a new object in the current room. |
|
Set the description of an object or room. |
|
Create a new exit from the current room to a new destination room. |
|
Consult the aether for random world objects. |
|
Signal that the current goal is fully complete. |
|
Drop an item from inventory into the current room. |
|
Show the exits for a room. |
|
Move through an exit in the given direction. |
|
Look at the current room or a specific object. |
|
Look up source material for a real-world character by name (e.g. a Simpsons character). |
|
Look up source material for a real-world place by name (e.g. a Simpsons location). |
|
Move an object to a different room or container (changes its location). |
|
Mark an object as obvious so it appears in room descriptions. |
|
Open a container or door. |
|
Send a page (private message) to another player. |
|
Set a spatial relationship between an object and a target in the same room. |
|
Post a room ID list to The Dispatch Board for a specific topic. |
|
Put an item inside a container (moves it into the container). |
|
Send a raw MOO command verbatim. |
|
Read the room ID list from The Dispatch Board for a specific topic. |
|
Read entries from The Survey Book for a specific topic. |
|
Say something without acting on the environment. |
|
List every room instance in the world as a flat #N/name list. |
|
Build the agent's tool list from a per-agent whitelist. |
|
Inspect an object or the current room in full detail — exits, contents, properties, verbs, IDs. |
|
Lightweight room inspector. |
|
Record which krustylu source(s) an object was derived from, as the list property 'krustylu_sources' (e.g. ['location:moe-tavern'] or ['character:moe-szyslak']). |
|
Take an item from the room into your inventory. |
|
Teleport directly to a room by #N or name, without following exit chains. |
|
Add a return exit from the current room back to an origin room. |
|
Write an entry to The Survey Book for a specific room and topic. |
|
Create or overwrite a verb on an object. |