# Operate OpenProgram through backend tools

| Tool | Operates |
| --- | --- |
| `framework` | Sessions, projects, configuration, files, applications and executions, through the authenticated backend, with no interface clicking |
| `resource` | Persistent environments: Web pages, Terminals and installed applications |

## HTTP operations

```
framework(action="describe", operation="settings")
framework(action="invoke", operation="GET /api/settings")
```

| Argument | Holds |
| --- | --- |
| `path` | Named path parameters |
| `query` | Query parameters |
| `body` | JSON |
| `content_base64`, `content_type` | Binary endpoints |
| `arguments={"offset": 50}` | Discovery paging; the result gives `next_offset` |

Use the exact operation ID from discovery. Results include HTTP status; a failure does not mean a mutation is safe to retry.

## WebSocket commands

```
framework(action="commands")
framework(action="command", operation="rename_session",
          arguments={"session_id": "EXACT_SESSION_ID", "title": "Research"})
```

Results hold response frames, after the command's own validation. Long-running work stays with the worker; read its execution or session state. File operations keep their request IDs, idempotency keys and revision checks.

## A window, without screen automation

```
framework(action="interface")
framework(action="interface", operation="tabs.list",
          arguments={"window_id": "EXACT_WINDOW_ID", "arguments": []})
```

The catalogue declares tab, group, split, sidebar, resource view, appearance, bookmark and native Desktop commands with schemas.

- Commands target one authenticated connected window. Missing or ambiguous windows fail explicitly, and a lost reply is not retried.
- Native history, downloads, browser import and update controls use the existing Desktop functions. A browser window reports native-only capabilities as unavailable.
- Window presentation needs a connected view; backend and installed application operations do not need a rendered frontend.
- Unsaved file tabs must be saved or discarded before an automated close.
- Web pages are opened and closed with `computer_use(type="browser")`, or with `tabs.openWebTab`. A native Page presentation command names its tab with `arguments.tab`, the id that target's `list_tabs` lists; it needs what `computer_use` needs.

## Authority

| Boundary | Rule |
| --- | --- |
| Approval | Normal tool approval and owner authority apply. |
| Sandbox | No unrestricted host fallback outside an active sandbox. |
| Not in the catalogue | Not in the catalogue: authentication bootstrap, transport receipts, Agent approval answers. An Agent cannot approve its own pending operation or change approval modes or rules. |
| Python applications | Installed Python applications still need explicit trust, and only manifest operations with `agent: true` appear in resource action schemas. |

[Application packages](https://fzkuji.github.io/OpenProgram/docs/capabilities/applications.html) · [Desktop resources](https://fzkuji.github.io/OpenProgram/docs/interfaces/desktop.html)
