---
title: "Use an agent with a Study"
summary: "Share a retained Project deliberately, run saved-input research and inspect attributed evidence."
url: https://hookeui.org/docs/agent-studies/
status: Development docs
publication_status: development-preview
implementation_status: merged-development
availability: Merged development source. The retained research and Part 2.1 additions described here are not included in published Stable 0.5.2 or Beta 0.6.0. Packaged owner interaction, complete two-agent Study qualification and scientific validation remain separate.
source_repository: https://github.com/wpulier/HookeUI
source_revision: 225fd52fc264f977887d626a83e2c82fa51e9b8a
reviewed_date: 2026-10-28
source_paths: ["apps/studio/src/agent-project-access.ts","apps/studio/src/agent-connections.ts","packaging/macos/HookeUI/main.swift","packaging/macos/hooke/main.swift","services/orchestrator/door/AGENTS.md","services/orchestrator/door/api.py","services/orchestrator/door/projects.py","services/orchestrator/door/project_actions.py","services/orchestrator/door/studies.py","services/orchestrator/research/studies.py",".agents/skills/hooke/SKILL.md","docs/adr/0026-outside-agents-connect-through-one-door.md"]
---

# Use an agent with a Study

Share a retained Project deliberately, run saved-input research and inspect attributed evidence.

Merged development source. The retained research and Part 2.1 additions described here are not included in published Stable 0.5.2 or Beta 0.6.0. Packaged owner interaction, complete two-agent Study qualification and scientific validation remain separate.

These guides follow development; your installed Stable or Beta may differ.

Use an outside agent you already run with Hooke's retained Project evidence. Connect it through the [bundled command](/docs/connected-agents/) first. Its model/provider terms still apply; Hooke's local app needs no Hooke account. Knowing a Project ID or using the same agent name does not grant access.


**Check the build before starting**

These instructions follow **225fd52**, merged into development after named connections and owner-confirmed Project grants. **Beta 0.6.0** includes only the older basic agent interface; **Stable 0.5.2** has no agent connection. Neither includes this research path. Native signing and transport checks are separate from the still-unqualified packaged grant interaction and complete two-agent Study journey. Launching subscribed agent CLIs from Hooke is deferred.


## Create a retained Project [#create-a-retained-project]

Run `hooke tools --json` with the intended agent and connection selectors. In a compatible build, it lists `project.create`, `project.list`, `project.read`, `project.import` and `artifact.read`, with their actual schemas. Here `hooke` means the full bundled path plus those selectors. Use a new key for each new operation.

```text
hooke run project.create '{"name":"Image analysis study"}' --key <new-request-key>
hooke run project.list '{}' --key <another-new-request-key>
hooke run project.read '{}' --project <returned-project-id> --key <another-new-request-key>
```

The bracketed values are placeholders, not commands to paste unchanged. Creation retains a local-only Project without changing the active Project, live image or resume preference. `project.list` lists only this connection's own or explicitly shared Projects. `project.read` lists exact retained artifacts and any unreadable records; that index is not the artifacts' full contents.

For a chosen local file, use the discovered `project.import` schema with an absolute file path and `--project`. Hooke streams and retains the input, its content identity and importer attribution. It refuses a changing file. A successful import does not prove a scientific reader, matrix runtime or method is ready. The older `hooke open` command instead opens an image/video on the live stage in its creator's Project.

## Share a Project in Hooke [#share-a-project-in-hooke]

### Connect the intended collaborator [#connect-the-intended-collaborator]
Connect each agent separately. [Named connections](/docs/connected-agents/#keep-two-connections-of-the-same-agent-separate) distinguish two instances of one agent kind. Check the intended stable connection ID as well as its self-described label.
### Choose the Project and permission [#choose-the-project-and-permission]
In **Settings → Connected agents**, choose **Project access** for the collaborator. Select **Project to share** and **Project permission**, then **Save Project access**. The picker lists registered agent-created Projects; it does not grant blanket access to ordinary personal Projects.
### Confirm the exact choice [#confirm-the-exact-choice]
In a compatible packaged app, the native dialog names the canonical Project, stable connection ID and exact permission. Choose **Grant access** only for the intended choice; **Cancel** is the default. Preparing a choice does not save permission. Read the resulting status to confirm that access was saved.

| Permission | What the connection may do through the retained research path |
| --- | --- |
| **Read** | Inspect authorized retained sources, exact results, Study evidence, associated workflows and permitted operation receipts; download retained files explicitly. |
| **Contribute** | Also import material, author associated workflows, create Studies, admit local workflow experiments, publish claims/challenges and use permitted controls. |
| **No access** | Revoke that collaborator's Project grant. Earlier work retains its original attribution. |

Neither grant permits membership administration, credentials, settings or spending. It does not loosen live-stage ownership rules. The connection that created a Project retains its creator role; its permission selector is disabled. Disconnect that connection to revoke its credential.

To remove a collaborator, select **No access → Save Project access**, then confirm **Remove access** in the native dialog. Check the resulting revocation message. Permission and connection checks also apply to reads and streamed downloads; revocation does not erase data already read by an outside agent or stop work already admitted.

If Hooke says **This copy cannot grant access yet**, the required owner interface is unavailable: do not ask an agent to call a Studio grant route or edit permission files. Source Studio allows its explicit development-only confirmation mode, `HOOKE_DEV_CONFIRM=1`; it is not a substitute for packaged native confirmation or a security boundary against software with your full Mac-user access.

## Work through a Study [#work-through-a-study]

Ask the authorized agent to inspect the Study question, allowed inputs and exact evidence, discover ready capabilities, then propose or admit a frozen workflow. Retained-input work can execute without taking over the live stage. Bind the exact Project/input revisions, method generation and parameters; a Project grant does not prepare a missing runtime or authorize cloud computation.

Workflow experiments use the same execution service and original attempt records as the manual [Study controls](/docs/researchers-and-studies/). Human review remains in Hooke. An agent cannot mark its own result as human-accepted through this door.

**What researchers report** shows attributed claims, limitations, dependencies, evidence links and challenges. A contributor can inspect and continue permitted retained work without relabelling earlier authors. Give it the original operation ID: request keys belong to each connection, so copying another agent's key does not recover that agent's request. A conversation recap is not a substitute for saved evidence; several agents agreeing is not scientific validation.

## Read exact content and export deliberately [#read-exact-content-and-export-deliberately]

Use `artifact.read` with the exact discovered reference, not a title or guessed latest revision. Supported text-file reads are bounded and return `nextOffset`; continue until you have the relevant content. A binary file does not become text just because its record has a summary.

For a retained file, `artifact.read` returns a download locator. In a compatible build:

```text
hooke download '<returned-relative-locator>' --output <new-local-file>
```

This reads an authorized retained revision into a **new** file. Existing outputs are not overwritten, redirects are refused, and the caller's connection and Project permission are rechecked while streaming. Verify the file against its retained content identity before using or packaging it. Interrupted downloads may need a retry to a new path. Ask before requesting full tables or images: the outside agent may send what it reads to its provider.

## Discover the Study and workflow contract [#discover-the-study-and-workflow-contract]

Integration developers can use the thin command's `api GET|POST <relative-path> [json]` transport. These are authenticated **local** paths under `/api/agent/v1/`, not public website URLs. Keep the intended connection selector on every command.

| Task | Discovered resource |
| --- | --- |
| Read Studies in the authorized Project | `GET studies?session=<project>` |
| Inspect exact Study evidence | `GET studies/<study>?session=<project>` and `POST studies/<study>/evidence` |
| List the Project's associated workflows | `GET workflows?session=<project>` |
| Discover capability generations, ports and readiness | `GET workflows/capabilities` |
| Read a frozen associated definition | `GET workflows/<workflow>?session=<project>&revision=<N>` |

For example, `hooke api GET 'studies?session=<project>'` reads the selected Project's Studies. Creation uses the current `studies` POST fields: `session`, `requestKey`, `title`, `objective`, `criteria`, `budgetUsd` and `inputs`. A recorded Study budget is not permission to spend through Hooke's provider keys.

Author a new frozen definition through `workflows/command` with its selected `project`. The door permits `create`, `duplicate`, `validate`, `pause`, `stop` and `check`; it refuses direct start/capability execution and human-review/recovery commands. Admit execution with `hooke run workflow` and exact `study`, `session`, `workflow`, `revision`, `inputs` and optional `bindings`. The workflow must be associated with that Project. Generic tool-discovery generation is not interchangeable with execution generation; follow the current contracts rather than guessing a request body.

An agent cannot choose arbitrary executables or bypass missing runtimes by naming a module. Study workflows refuse recursive researcher nodes. Cloud methods, hosted execution and launching subscribed agent CLIs are outside this local path.

## Stop, disconnect and recover [#stop-disconnect-and-recover]

Stop the intended Study/workflow or permitted operation **before** revoking its connection, then inspect the terminal receipt. **cancelRequested** is not proof of termination; completed work can remain **succeeded** if completion won the race. Closing a Tab, revoking a grant or disconnecting is not a cancellation receipt.

After a lost response, the same connection should read the operation ID or retry the same unchanged request before admitting new work. An authorized collaborator reads that original ID under its own credentials. Interrupted execution needs the [explicit workflow recovery controls](/docs/scientific-workflows/#pause-stop-and-recover) in Hooke; the door does not expose human acceptance or reconciliation as an agent shortcut.

**Settings → Connected agents → Disconnect** revokes that connection across Projects. A new connection needs fresh matching-code approval and has a new stable identity; do not assume it inherits earlier grants. Keep tokens, connection state and private locators out of public reports. Preserve original records and separate source checks, simulations, actual provider runs and scientific validation.
