# Automation Host agent guide

Automation Host stores reusable instructions, questions, replies, and reported results. Use the user's authorized Automation Host connector to access their workspace. Reading this guide does not authorize account creation, a run, a write, or a schedule.

## 1. Request access and sign in

1. Ask whether the user already has an approved Automation Host account. If they are unsure, show them the [sign-in page](https://automationhost.com/login).
2. If they need access, open [Request access](https://automationhost.com/request-access). Explain that Automation Host is in private beta and a person reviews each request. Ask the user to submit the form with the email they want to use. A submitted request does not create an account or send an invitation.
3. Once the user knows they are approved, have them [sign in](https://automationhost.com/login) with the same email. Ask them to enter the one-time code or open the sign-in link directly. Keep codes, links, and credentials out of the chat.

## 2. Connect this tool

1. Check whether the Automation Host connector is available in your current session. If it is missing, ask the user to open [Tools](https://automationhost.com/connections), choose their tool, and follow its connection steps. Automation Host supports Claude, ChatGPT, Gemini, and Muse. The user approves access in the connection flow.
2. After connecting, verify access when the user asks by calling `list_automations`. A successful empty result means there are no automations visible to this tool. Ask the user to share an automation with this tool if they expect it to appear.
3. If the connector is unavailable, report that you cannot access the workspace. If the connection only supports reading, explain what you can retrieve. Confirm writes only after the tool reports success.

## 3. Find and run an automation

1. When the user asks you to use a workflow, try `search_automations` with a few relevant keywords. Try simpler keywords or `list_automations` if needed, and follow `nextOffset` for additional results. Ask the user which one to use if several match.
2. Call `get_automation` with the selected ID before each run, including on an existing schedule. Use the current instructions and revision. Check remembered answers and use `list_runs` if earlier results matter. For a scheduled run, identify the original chat where the scheduled task or automation started so the user can return to it.
3. Carry out the work in the connected tool within the user's authorization. If an automation is unavailable, ask the user to enable it for this tool in Automation Host.

## 4. Ask for input and continue

1. Check `list_input_requests` for an existing question or a reply for this run before asking the user for input. Reuse relevant replies. Only answers marked as remembered carry forward to unrelated runs.
2. If you still need input, call `request_input` with the automation ID, a clear question, and a unique `externalId`. Reuse it on retries. Include choices when useful. For scheduled runs, include the original chat’s direct URL as `sourceUrl` whenever the connector supports conversation links and you can access the URL. Inbox uses it to reopen the chat after a reply. Omit the field if the URL is unavailable or unsupported.
3. Tell the user to answer in [Inbox](https://automationhost.com/inbox). If an automatic reply listener is configured, its subscribed or scheduled session handles continuation; do not promise that this ordinary chat resumes. Otherwise, ask them to return here to continue. Wait for their answer. Read `get_input_request` before using a saved reply.

## 5. Report the result

1. After an automation run completes or fails, call `record_run` with its automation ID, the `instructionRevision` used, actual run timestamp as `date`, input, output, status, and a unique `externalId` reused on retries. For a scheduled run, include the same original chat URL as `sourceUrl` when available and supported. Save the full result. If you only have a recap, set `outputKind` to `summary`.
2. Check the tool response before confirming that the result was saved. The reported run appears in [Activity](https://automationhost.com/activity) and updates Last used and Last used by. If the report fails, tell the user what could not be saved.

## 6. Share or update reusable instructions

1. When the user asks, save reusable instructions with `save_automation`. Include a clear name, a short description, and the full reusable instructions. Ask the user to supply any instructions you cannot access. Keep credentials and unrelated private content out of the saved copy.
2. Search for an existing copy. Before replacing one, get the user's approval, call `get_automation`, and use its ID and current revision as `expectedRevision` when saving.
3. Include confirmed schedule details when sharing a scheduled workflow. When saving its full instructions, include the actual chat URL where the schedule was set up as `sourceUrl` if the tool can reliably identify it. Save timing information as metadata. The schedule runs in the original tool. If only the next occurrence changed, call `update_next_run` with the automation ID, current `expectedRevision`, and confirmed `nextRunAt` with its time zone offset. Leave the value alone if the next occurrence is unknown.
4. After confirming the save, point the user to [Automations](https://automationhost.com/app). They can use **Sync automations** to refresh the list.

## Automatic Inbox replies

Automation Host coordinates replies; the connected AI tool does the work. A connection alone does not wake an AI chat. Do not use model API keys, start an Automation Host worker, or fabricate a schedule to enable this feature.

### ChatGPT

Use the existing `inbox.reply_saved` subscription in a cloud Work chat. The subscribed Work chat continues matching replies; it is not necessarily the chat that originally asked the question. Fetch `get_input_request` for the delivered request ID and the current `get_automation`. Check `list_runs` before repeating work. Report the actual result with `inputRequestId` and a stable request-specific `externalId`. Accepted notification delivery is not proof that ChatGPT executed the work.

### Claude, Gemini, and Muse

Use the tool's own native scheduled task as the listener. New connector tools must be present before setup. Do not claim these tools support push subscriptions just because ChatGPT does.

1. Obtain the user's authorization for automatic continuation of new replies and the checking interval. The requested default is **every five minutes**. Verify that native scheduling can use the Automation Host connector at that interval in this account. Claude needs a suitable scheduled task context; Gemini needs a Task, not a legacy chat scheduled action. Capabilities vary by plan and rollout. If the interval or scheduled connector access is unavailable, report the limitation and ask before choosing a different interval. Do not register a listener or claim success.
2. Call `get_reply_listener`. Reuse an existing matching native task; do not create duplicate listeners. If it is offline, inspect the existing task and connection first.
3. Create one native recurring task named “Automation Host Inbox replies”, with the checking instructions below. Verify that the native scheduler actually saved it and that the task can call this connector. Set the native approval scope only to actions the user authorized; preserve all other permission requirements.
4. Only after the task exists, call `configure_reply_listener` with its actual `scheduleName` and `intervalMinutes`. This registers coordination metadata; it does not create the task. It covers only **new replies after setup** for this tool's available automations, not historical resolved answers.
5. Run a test check from the native task context. Call `check_reply_listener`, even if no replies are pending. Then call `get_reply_listener` to confirm a check was received. Registered means waiting for the first check; active means a recent connector check, not independently verified native scheduling. Never fabricate a successful test.
6. Explain where the continuation will happen: the native scheduled task/session. It does not inject a message into an arbitrary existing consumer chat. The result appears in Automation Host Activity after it is reported. Gemini/Muse connectors do not currently support conversation links; do not invent one.

Native task checking instructions:

> Use only the Automation Host connector and the scope I authorized for automatic Inbox replies. Read get_reply_listener; if it is off, do not recreate it. Call check_reply_listener once. If there are no pending replies, stop quietly. For at most three pending replies in this check, call claim_reply with the input_request_id as id and a unique claimId for this attempt, reused on retries. Continue only if status is claimed; reported or unavailable means skip it. Keep claim_token private. Call get_input_request and verify it is resolved, belongs to the returned automation, and is for this tool. Fetch get_automation for current instructions and remembered answers. Read list_runs to avoid work already reported under the returned external_id. Continue only the original work using this specific reply; an unremembered answer is not permission for unrelated future work. If missing information remains, ask a new question with request_input and stop that work until its new reply arrives. After real completion or failure, call record_run with the returned external_id, inputRequestId, replyClaimToken from claim_token, the exact instructionRevision used, actual timestamp, input, full output, and truthful status. Reuse the report and claim IDs on retries. Never report a preview or fabricated outcome. Never claim again after a thirty-minute claim times out: the outcome may be ambiguous. Report the problem for attention. Preserve the tool's normal approvals for purchases, messages, publishing, and other actions requiring permission.

To stop automatic replies, call `stop_reply_listener` and cancel or pause the native task too. These are separate actions: stopping coordination does not cancel a provider's schedule. Revoking the connector also disables pickup. Already-started work may still report a late result; no replacement claim is issued automatically.

## Shared automations

An automation shared with this account has its own account-local ID. Always use that ID for `get_automation`, `record_run`, and Inbox requests. The current instructions stay synchronized with the owner's automation. Read the `sharing` permission returned by `get_automation`: viewers may use instructions; editors may update instructions with the current `expectedRevision`, and those changes apply to everyone. Only the owner manages sharing and the name. Each account can save its own schedule reference; never reuse the owner’s schedule or chat URL.

Use `list_runs` to reference prior results. Owner history is included only when the owner granted this recipient access; another recipient's runs, Inbox replies, remembered answers, and credentials remain private. Report this user's work under their account-local automation ID. Do not copy or reuse the owner's chat URL or schedule. If access is removed or the owner archives the automation, stop using it.
