Lagsmith
v1.0.1Let AI agents slow down, break or mock one app's network on a Mac, including iOS Simulator apps.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_targets
List running simulators and the apps installed on them, running Mac apps, the presets, and the current rules.
status
Show every rule, what it's doing, and whether Lagsmith's proxy is running.
set_network
Slow down or break one app's network, and only that app's. Creates the rule if needed and turns it on. Combine a preset with exact values or a failure mode.
| Parameter | Type | Description |
|---|---|---|
app * | string | The app: a bundle ID like com.me.MyApp, an app name, or * for every app in a simulator. |
after | number | For drop: seconds before a connection is cut. |
down | number | Download bandwidth in kilobits per second. |
failure | string | airplane: every connection fails at once. refuse: refuse a percent of new connections. timeout: connections never answer. drop: cut connections after some seconds. outages: go offline and back repeate… |
hosts | string | Comma-separated hosts to limit the rule to, like api.me.com,*.cdn.me.com. |
hosts_mode | string | only (default): just those hosts; except: everything but them. |
jitter | number | Latency variation in milliseconds. |
latency | number | Added latency in milliseconds. |
loss | number | Packet loss percent, 0 to 100. |
offline | number | For outages: seconds offline. |
online | number | For outages: seconds online. |
percent | number | For refuse: the percent of connections refused. |
preset | string | No Throttling, Edge, 3G, DSL, LTE, WiFi, Very Bad Network, 100% Loss, or a saved preset. |
simulator | string | For iOS Simulator apps: booted, any, a device name or a UDID. Leave out for a Mac app. |
up | number | Upload bandwidth in kilobits per second. |
reset_network
Put an app back to full speed with no failures, host limits or endpoint rules. It stays watched, so its requests still show.
| Parameter | Type | Description |
|---|---|---|
app * | string | The app: a bundle ID like com.me.MyApp, an app name, or * for every app in a simulator. |
simulator | string | For iOS Simulator apps: booted, any, a device name or a UDID. Leave out for a Mac app. |
stop_watching
Turn off an app's rule. Its traffic goes back to normal and stops being watched.
| Parameter | Type | Description |
|---|---|---|
app * | string | The app: a bundle ID like com.me.MyApp, an app name, or * for every app in a simulator. |
simulator | string | For iOS Simulator apps: booted, any, a device name or a UDID. Leave out for a Mac app. |
relaunch_app
Quit and reopen a simulator app with request monitoring, so every connection it makes goes through its rule and its requests are recorded. Do this after the first set_network for an app that was already running.
| Parameter | Type | Description |
|---|---|---|
app * | string | The app: a bundle ID like com.me.MyApp, an app name, or * for every app in a simulator. |
simulator * | string | For iOS Simulator apps: booted, any, a device name or a UDID. Leave out for a Mac app. |
get_requests
A simulator app's recent HTTP requests, newest first: method, URL, status, errors, time, and optionally bodies. Needs the app to have been launched with request monitoring (relaunch_app).
| Parameter | Type | Description |
|---|---|---|
app * | string | The app: a bundle ID like com.me.MyApp, an app name, or * for every app in a simulator. |
simulator * | string | For iOS Simulator apps: booted, any, a device name or a UDID. Leave out for a Mac app. |
filter | string | A search: words, or filters like status:4xx, method:POST, host:api, path:/v1, is:failed, -host:cdn. |
include_bodies | boolean | Include request and response bodies (up to 4,000 characters each). |
limit | integer | How many, 1 to 500. Default 50. |
fail_endpoint
Make requests to one endpoint fail inside a simulator app while the rest of the app works.
| Parameter | Type | Description |
|---|---|---|
app * | string | The app: a bundle ID like com.me.MyApp, an app name, or * for every app in a simulator. |
kind * | string | offline: fails as no internet. timeout: times out. status: answers with an HTTP status. delay: sent after a wait. |
pattern * | string | Requests whose URL contains this, like api.me.com/v1/feed. Use * for any text. |
simulator * | string | For iOS Simulator apps: booted, any, a device name or a UDID. Leave out for a Mac app. |
value | number | For status: the HTTP status (default 500). For delay: seconds (default 3). For timeout: at most this many seconds. |
mock_endpoint
Answer requests to one endpoint in a simulator app with a made-up response, without reaching the server.
| Parameter | Type | Description |
|---|---|---|
app * | string | The app: a bundle ID like com.me.MyApp, an app name, or * for every app in a simulator. |
pattern * | string | Requests whose URL contains this, like api.me.com/v1/user. Use * for any text. |
simulator * | string | For iOS Simulator apps: booted, any, a device name or a UDID. Leave out for a Mac app. |
body | string | The response body, usually JSON. |
content_type | string | Default application/json. |
delay | number | Seconds to wait before answering. |
status | integer | HTTP status. Default 200. |
clear_endpoints
Remove an app's endpoint failures and mocks: all of them, or those for one pattern.
| Parameter | Type | Description |
|---|---|---|
app * | string | The app: a bundle ID like com.me.MyApp, an app name, or * for every app in a simulator. |
pattern | string | Only remove rules for this pattern. |
simulator | string | For iOS Simulator apps: booted, any, a device name or a UDID. Leave out for a Mac app. |