Service twin · API only
Google Workspace
Test agents across Google People, Workspace Events, Apps Script, and Pub/Sub without calling production APIs.
$ uv tool install blobfish-cli
$ blobfish twin login
$ blobfish twin-runs create --twins googleworkspace --ttl 60 --waitWhat’s inside
A deterministic, seeded, resettable replica: every operation below executes real state transitions against the twin’s own SQLite state — reads are hash-invariant, writes produce inspectable diffs, and reset restores the seed baseline.
Seeded entities
| Entity | Table | Fields | About |
|---|---|---|---|
| contact | contacts | 8 | People API person record with its primary contact-group membership. |
| contact_group | contact_groups | 6 | People API contactGroup used to segment the contact list. |
| event_subscription | event_subscriptions | 7 | Workspace Events subscription that streams events for one target resource to a Pub/Sub topic. |
| script_project | script_projects | 6 | Apps Script project as returned by script.googleapis.com projects.get. |
| script_deployment | script_deployments | 7 | Versioned deployment of an Apps Script project (web app, API executable, or add-on). |
| topic | topics | 6 | Pub/Sub topic that fans event messages out to subscriptions. |
| pubsub_subscription | pubsub_subscriptions | 7 | Pub/Sub subscription that delivers a topic's messages to a worker or push endpoint. |
Guarded lifecycles
These state machines are enforced, not decorative: an action whose fromstate doesn’t match is rejected the way the production service rejects it.
event_subscription.state
suspend: active → suspendedreactivate: suspended → activedelete: active|suspended → deleted
Three surfaces, one state
Mount Google Workspace in a twin environment and the same seeded state serves vendor-shaped REST operations, an MCP endpoint for tool calling, and a generated bf-twin CLI — with copy-on-write sessions per rollout and a one-call reset to the seed baseline. Prefer raw HTTP? The same create works with curl:
$ curl -sS -X POST https://blobfish.ai/api/v1/twin/environments \
-H "X-API-Key: $BLOBFISH_API_KEY" -H "Content-Type: application/json" \
-d '{"services":["googleworkspace"],"ttl_minutes":60}'Known limitations
- transcribed from https://developers.google.com/people/api/rest, https://developers.google.com/workspace/events/reference/rest, https://developers.google.com/apps-script/api/reference/rest, and https://cloud.google.com/pubsub/docs/reference/rest; parameter and response schemas simplified
- four Google APIs mounted behind one base URL: Pub/Sub resources under /v1/pubsub/*, Apps Script deployments flattened to /v1/deployments addressed by script_project_id, custom :verb methods modeled as verb sub-paths, project-qualified resource names shortened to plain ids; Workspace Events deletion modeled as a soft-delete action that parks the subscription in the deleted state
- synthetic seeded values