Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
3cad995
experimental: scaffold local-pc-executor shim + platform hooks
ntindle May 8, 2026
e4fd242
feat(copilot): add local PC executor shim binding
ntindle May 14, 2026
a52306e
docs(platform): mirror cross-OS spec updates from shim repo
ntindle May 20, 2026
e9a1030
feat(copilot): wire HELLO metadata through LocalPCShim adapter
ntindle May 20, 2026
23dc986
feat(copilot): route file tools to LocalPCShim per executor
ntindle May 22, 2026
88acba2
feat(copilot): make MCP file-tool descriptions executor-agnostic
ntindle May 22, 2026
af1b496
feat(copilot): gate LocalPC executor behind LaunchDarkly per-user flag
ntindle May 22, 2026
0908132
docs(platform): mirror OAuth registration spec update from shim repo
ntindle May 22, 2026
d39776a
docs(platform): mirror OAUTH_FLOW.md clarification on client_id
ntindle May 22, 2026
c10de70
docs(platform): mirror PROTOCOL.md daemon-feedback edits
ntindle May 22, 2026
bb773a1
docs(platform): mirror AUDIT_LOG.md + SECURITY.md updates from shim repo
ntindle May 22, 2026
1333b7d
test(copilot): loopback e2e for local-executor WS route + LocalPCShim…
ntindle May 22, 2026
996068f
docs(platform): mirror README reframe from shim repo
ntindle May 22, 2026
ce034f1
docs(platform): mirror PLATFORM_HOOKS §10.9 computer-use deferral
ntindle May 22, 2026
6774481
docs(platform): mirror CROSS_PLATFORM.md Autostart row update (NSSM →…
ntindle May 22, 2026
1ef28c2
feat(frontend): surface LocalPC executor mode + first-run warning
ntindle Jun 4, 2026
b31ec11
docs(platform): mirror AUDIT_LOG.md spec amendments from shim repo
ntindle Jun 4, 2026
7986994
docs(platform): mirror COMPUTER_USE.md v1 feature spec from shim repo
ntindle Jun 4, 2026
1c6e0e0
docs(platform): mirror Q1-Q5 computer-use spec lock from shim repo
ntindle Jun 5, 2026
d354c05
feat(copilot): live shim status endpoint + connected-machine badge
ntindle Jun 5, 2026
bfe3cfd
test(copilot): cover LocalPCShim _ComputerProxy wire-op surface
ntindle Jun 5, 2026
2f8d9c8
feat(copilot): wire LocalPC computer-use beta + MCP tools end-to-end
ntindle Jun 5, 2026
fcb66e1
feat(frontend): per-session computer-use consent + mirror PLATFORM_HO…
ntindle Jun 5, 2026
c6c03b3
feat(backend): OAuth public-client mode (OAuthApplication.isPublic + …
ntindle Jun 5, 2026
75cabd5
docs(platform): mirror OAUTH_FLOW.md true-public-client implementatio…
ntindle Jun 5, 2026
e42355b
feat(copilot): in-flight semantics + WRITE_UNCONFIRMED on shim discon…
ntindle Jun 5, 2026
eb7cd99
feat(backend): Prometheus metrics for LocalPC shim sessions
ntindle Jun 5, 2026
ee10374
docs(platform): mirror HARDWARE.md hardware-access wire spec from shi…
ntindle Jun 5, 2026
5fa12dd
feat(copilot): consume pending_capacity + STATUS frames from shim for…
ntindle Jun 5, 2026
ffad171
docs(platform): mirror MULTI_MACHINE.md orchestration spec from shim …
ntindle Jun 5, 2026
5b05fed
feat(copilot): translate FILE_TOO_LARGE + DEPENDENCY_MISSING shim errors
ntindle Jun 5, 2026
c2a3532
docs(platform): mirror PRIVACY_MODE.md from shim repo
ntindle Jun 5, 2026
1f743ba
docs(platform): mirror PROTOCOL.md robustness additions from shim repo
ntindle Jun 5, 2026
b6ec732
feat(backend): push SESSION_REVOKED to shims on OAuth token revoke
ntindle Jun 5, 2026
0c3e33c
feat(copilot): translate OpUnconfirmedError in remaining proxies + re…
ntindle Jun 5, 2026
cd3f9e0
docs(platform): mirror RELEASE_RUNBOOK.md from shim repo
ntindle Jun 5, 2026
55a13ca
docs(platform): mirror LOCAL_LLM.md + PROTOCOL.md local-LLM wire ops
ntindle Jun 5, 2026
5b61010
feat(copilot): add LocalLLMRouter + _LocalLLMProxy + LD flag + tests
ntindle Jun 5, 2026
201c3e5
dx(copilot): ruff format incidentals (Boy Scout cleanup)
ntindle Jun 5, 2026
5a6cf09
docs(platform): mirror WORKFLOW_RECORDING.md v0.2 design from shim repo
ntindle Jun 10, 2026
4d06d7c
docs(platform): mirror calibrated cloud-fallback consent spec from sh…
ntindle Jun 10, 2026
12c82c7
docs(platform): mirror workflow-recording v1 build contract from shim…
ntindle Jun 16, 2026
815e078
feat(backend): add workflow-recording shim surface (_RecordingProxy)
ntindle Jun 16, 2026
f4c71b3
feat(backend): generalize recordings into parameterized skills + trus…
ntindle Jun 16, 2026
2bb0c9f
feat(backend): register workflow-recording MCP tools + WORKFLOW_RECOR…
ntindle Jun 16, 2026
3131f46
feat(frontend): workflow-recording UI — record affordance, review, co…
ntindle Jun 16, 2026
1c2d43d
docs(platform): mirror PROTOCOL.md recording-op idempotency rows from…
ntindle Jun 16, 2026
7b2cf01
Merge origin/dev into experimental/local-pc-executor
ntindle Jun 27, 2026
8b93d9e
Merge origin/dev into experimental/local-pc-executor
ntindle Jul 9, 2026
4f86903
feat(platform): add remote Local PC execution targets
ntindle Jul 12, 2026
a00af0f
Merge branch 'dev' of https://github.com/Significant-Gravitas/AutoGPT…
ntindle Jul 17, 2026
e9d1ed5
Merge branch 'dev' of https://github.com/Significant-Gravitas/AutoGPT…
ntindle Jul 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions experimental/local-pc-executor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# ⚠️ EXPERIMENTAL — AutoGPT Local PC Executor

> **DANGER: This is untested, experimental, pre-alpha software.**
> Do not run on any machine you care about. Do not use in production.
> Running this gives the AutoGPT platform the ability to execute arbitrary commands on your computer.
> You have been warned.

---

## What Is This?

A local shim daemon that lets the **AutoGPT hosted platform** use your actual machine as
its code execution backend — instead of an E2B cloud sandbox.

When the shim is running and connected, AutoGPT can:
- Read and write files on your filesystem
- Execute shell commands
- (Optionally) take screenshots and control your mouse/keyboard via Claude's computer use API
- (Optionally) access local hardware (serial ports, USB devices, GPIO)
- (Optionally) route inference to a local LLM (Ollama, llama.cpp)

## Why Would You Want This?

- Access files that can't be uploaded to the cloud
- Use licensed software installed on your machine
- Control physical hardware (3D printers, Arduinos, lab instruments)
- Run tasks that need your local environment (VPN, internal network, specific OS setup)
- Privacy: keep sensitive data on-device while still using AutoGPT's orchestration

## Current Status

| Component | Status |
|-----------|--------|
| Spec / Protocol | 🟡 Draft |
| Shim daemon (Python) | 🔴 Skeleton only |
| Platform hooks | 🔴 Not implemented |
| OAuth integration | 🔴 Spec only |
| Computer use | 🔴 Spec only |
| Hardware access | 🔴 Spec only |

## Quick Start (Future — Not Working Yet)

```bash
pip install autogpt-local-executor
autogpt-shim auth # Opens browser → AutoGPT OAuth flow
autogpt-shim start # Starts daemon, connects to platform
```

## Architecture

See [`docs/VISION.md`](docs/VISION.md) for the full dream.
See [`docs/PROTOCOL.md`](docs/PROTOCOL.md) for the WebSocket message protocol.
See [`docs/PLATFORM_HOOKS.md`](docs/PLATFORM_HOOKS.md) for where this plugs into AutoGPT.
See [`docs/OAUTH_FLOW.md`](docs/OAUTH_FLOW.md) for the auth design.
See [`docs/SECURITY.md`](docs/SECURITY.md) for the threat model and mitigations.

## Contributing

This lives in `experimental/local-pc-executor/`. PRs welcome, but understand this is
exploratory — the interface will break repeatedly.

Open issues with `[local-executor]` prefix.
120 changes: 120 additions & 0 deletions experimental/local-pc-executor/docs/OAUTH_FLOW.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# OAuth Flow — Shim Authentication

> **Status**: Spec / Not Implemented

The shim authenticates using AutoGPT's **existing OAuth 2.0 provider infrastructure** —
the same system used by third-party app integrations. No new auth infrastructure needed.

## Why Not Device OAuth?

AutoGPT already runs a full OAuth 2.0 Authorization Server:
- `/auth/authorize` — authorization endpoint
- `/auth/token` — token endpoint
- `introspect_token()` — token validation
- Authorization Code + PKCE flow already implemented

Device OAuth would be redundant. The shim registers as an OAuth app and uses
Authorization Code + PKCE with a localhost redirect URI.

---

## Registration (One-Time)

The shim is a first-party OAuth application registered in the AutoGPT platform:

```
Client ID: autogpt-local-executor (well-known, public)
Client Secret: none (PKCE replaces it for public clients)
Redirect URI: http://localhost:41899/callback
Scopes: local_executor:connect local_executor:shell local_executor:files
(optional) local_executor:computer_use local_executor:hardware
```

Port 41899 is reserved for the shim's local callback server.

---

## First-Time Auth Flow

```
User Shim AutoGPT Platform
| | |
| autogpt-shim auth | |
|---------------------->| |
| | 1. Generate code_verifier |
| | code_challenge = S256(cv) |
| | |
| | 2. Spin up localhost:41899 |
| | |
| | 3. Open browser → |
| | /auth/authorize? |
| | client_id=autogpt-local-executor
| | redirect_uri=http://localhost:41899/callback
| | code_challenge=... |
| | scope=local_executor:connect ...
| | |
| [Browser opens] | |
|<====================================================-->|
| [User logs in and approves scopes] |
| | |
| |<-- GET /callback?code=AUTH_CODE
| | |
| | 4. POST /auth/token |
| | grant_type=authorization_code
| | code=AUTH_CODE |
| | code_verifier=... |
| | |
| |<-- {access_token, refresh_token, expires_in}
| | |
| | 5. Store tokens in OS keychain |
| | (keyring library) |
| Auth complete | |
|<----------------------| |
```

---

## WebSocket Connection Auth

On every WebSocket connect, the shim includes the access token:

```
GET /ws/local-executor/{session_id}
Authorization: Bearer {access_token}
```

Platform validates via `introspect_token(access_token)`:
- Checks token not expired
- Checks token belongs to the session owner
- Checks `local_executor:connect` scope present
- Returns user_id for the session

---

## Token Refresh

The shim manages token refresh proactively:
- Refresh 5 minutes before expiry using stored `refresh_token`
- On 401 during WebSocket upgrade, refresh and retry once
- On refresh failure (expired refresh token), prompt user to re-auth via CLI: `autogpt-shim auth`

Tokens stored in OS keychain:
- macOS: Keychain Services via `keyring` library
- Linux: Secret Service (GNOME Keyring / KWallet) via `keyring`
- Windows: Windows Credential Manager via `keyring`

---

## Per-Capability Scopes

| Capability | Required Scope |
|-----------|----------------|
| Shell execution | `local_executor:shell` |
| File read/write | `local_executor:files` |
| Computer use | `local_executor:computer_use` |
| Hardware access | `local_executor:hardware` |
| Local LLM | `local_executor:local_llm` |
| Background tasks | `local_executor:background` |

The platform only grants scopes the user explicitly approved during OAuth.
The shim only advertises capabilities it has scopes for.
Loading
Loading