Deterministic mock app APIs for large-scale agent task evaluation. Everything runs in-process with a single ToolRegistry entry point, a logical Clock (no real sleeps), snapshot-capable InMemoryStateStore, and tools for contacts, messaging, memo access, and admin controls.
- Python 3.11+
- No network calls; all state is local and JSON-serializable.
python -m pip install -e .python examples/message_sending.py
python examples/message_memo.pymessage_sending.pysends "Let us meet up at 3 pm today" to Anders, advances the logical clock by 500ms, and reads back the delivered message.message_memo.pysearches for the "Decision" memo, reads its content, and texts it to Anders.
ToolRegistry.call(tool_name, args, ctx) -> ToolResult: single entry point with uniform error handling.ToolContext:user_id,trace_id,now_ms(via the logicalClock), plus sharedInMemoryStateStorefor session isolation.Clock:now_ms()andadvance(ms); advancing triggers scheduled events (e.g., message delivery).InMemoryStateStore: per-session state withsnapshot()andrestore()using deep copies.- Seed data: contact
Anders(contact_id="anders",e164="+15550001111"); memo "Decision";admin.resetrestores seeds per session. - Tools:
contacts.search,contacts.getmessaging.send_text,messaging.get_message,messaging.list_messagesmemo.list_memos,memo.search,memo.get_memoadmin.reset,admin.set_delivery,admin.set_rule(reserved for fault injection)
The memo mock is content-agnostic; all interpretation is performed by the agent.
Tests use pytest:
python -m pip install -e ".[dev]"
python -m pytest