Agent workflows
Keep state and work outside a single agent session so another session or worker can continue.
Resume a project in another session
Store a small JSON record containing completed steps, source references, result file IDs, and the next action. Update it using the current revision. A later agent reads the same record using its dataset key. Keys do not expire automatically; revocation, rotation, and dataset deletion remain explicit.
Share work across agents
Put tasks in Queue directly or through a Notify subscription. Each worker claims one item and receives a reservation key. It can extend that reservation, return the task, or acknowledge completion. Unfinished reservations become available again or fail after their attempt limit.
A task may be delivered more than once. Use stable operation IDs before producing external side effects. Queue acknowledgment records a worker's report of completion, not an independent proof that the result is correct.
// MCP tools/call arguments: claim work
{"name":"queue","arguments":{
"dataset_id":"QUEUE_ID","access_key":"YOUR_QUEUE_KEY",
"action":"queue.claim","data":{"lease_seconds":120}
}}
// A task delivered by Notify contains an event envelope:
// item.payload.type -> "task.requested"
// item.payload.payload -> your task data
// item.reservation_key -> required when acknowledgingAsk a person before acting
The approver creates an Approve dataset and keeps its dataset-scoped decision key, with management authority stored separately. The agent receives only the proposal write key, submits an exact action, and shares the review link. A changed action needs a new proposal. The executing component checks the hash and consumes the approval before acting.
An agent holding the decision key can approve itself. Keep that key with the approver. A stored approval cannot prevent an uncooperative program from acting outside this workflow.
Pass files between workers
Save a CSV, document, or report in Artifact. Put its dataset ID, file ID, and SHA256 checksum in the task or project record. Another worker downloads and verifies the bytes. Set an explicit expiry when the file is temporary. File expiry does not expire the dataset key.
Watch for changes
Schedule a stored event or bounded public HTTP check. An agent polls the schedule's event cursor, checks changes with Diff when needed, saves current state, and publishes a Notify event. Registered webhooks can call a running agent host; queue subscriptions can preserve follow-up work until workers are available.
Bay Farm does not launch an agent runtime, wake a closed chat by itself, or execute arbitrary code.
Coordinate without a permanent user account
Each workspace or task can have its own dataset keys. Share only the keys needed for that work. Free data is publicly readable and indexed, so use public inputs and outputs. Secret credentials belong in protected configuration, not public payloads or request URLs.
The public interface creates only free public datasets. Private sign-in and checkout are not available yet. Existing operator-provisioned private API datasets retain their original key requirements.
MCP and HTTP
Connect an MCP client to https://bay.farm/mcp. Tool discovery needs no account. Each operation supplies the management or scoped dataset key required by that operation, through access_key or an Authorization bearer header. The MCP tools use the same validation, transactions, and limits as HTTP clients.
Use notify_subscriptions to manage webhook, topic, and queue registrations. Use browser_origins when connecting a separately hosted web interface. For raw HTTP clients, send a descriptive User-Agent: an existing Cloudflare rule rejects Python's default urllib user agent.
Read the service guide or try the browser-and-worker example.
Try the complete examples
Scheduled data · Event forwarding · Research and approval · Event monitor · CSV reconciliation. See their diagrams and inspect running and finished work.
Management and access
A public management ID groups datasets and usage. Its secret management key administers keys and datasets. Give applications dataset writer or reader keys. Names and descriptions are optional and can repeat.
Management API, browser sessions, limits, and existing-key migration · Manage datasets and jobs