---
title: Personal agent
description: One personal agent with general and client-private conversations and shared Executor connections.
owner: engineering
sourceFiles:
  - packages/contracts/src/server/personal-agent.ts
  - apps/server/src/http/personal-agent.ts
  - apps/server/src/domain/files/personal.ts
  - apps/server/src/domain/personal-agent/reads.ts
  - apps/server/src/http/personal-files.ts
  - packages/contracts/src/server/personal-files.ts
  - packages/db/src/schema/files.ts
  - apps/web/src/features/agent/components/personal-files.tsx
  - apps/server/src/domain/personal-agent/authority.ts
  - apps/server/src/domain/personal-agent/tools.ts
  - apps/server/src/domain/personal-agent/connections.ts
  - apps/server/src/domain/personal-agent/executor-grant.ts
  - apps/server/src/runtime/personal-agent/chat.ts
  - apps/server/src/runtime/personal-agent/connections.ts
  - apps/server/src/runtime/personal-agent/pi.ts
  - apps/server/src/runtime/browser/workspace.ts
  - apps/server/src/runtime/personal-agent/actor.ts
  - apps/server/src/worker.ts
  - infra/personal-agent.ts
  - apps/web/src/routes/agent/index.tsx
  - apps/web/src/routes/executor/callback/index.tsx
---

Open **Your agent** for the general conversation across clients. Each client page has a separate private conversation with the same personal agent. Switching clients selects that client's history and working files; returning continues where you left off. These conversations are private to the user, including on a client page. They are separate from shared Team chats inside spaces.

Wurthy is the firm workspace. Clients belong to the firm, and spaces belong to clients. The internal `organizationId` remains the firm authorization boundary; it is not the selected client. Each user has one `PersonalAgentSession` instance within the firm, sharing permissions and an Executor account inventory across its conversations. Existing general history and connections keep their original storage keys. New client conversations start empty; old general messages are not copied into clients.

One deployed class serves all instances. Native Pi and Lifecycle run the agent; each conversation owns a separate persistent native Pi session and Computer filesystem. A user does not deploy a Worker or keep a dedicated computer running. Containers may sleep; working files remain in SQLite. Private uploads, message attachments and named saved files use the existing file catalog and private R2 bucket. Scheduling and private app authoring remain unavailable.

## Authority and conversation persistence

The authenticated HTTP boundary derives the actor from the current session and requires the rendered user and organization as preconditions. Browser input contains commands and message IDs, never a claimed runtime identity. Native callbacks verify the calling Durable Object address before using the actor. Every admission, model credential request, tool call and reply settlement checks the current account, active firm and membership. Client conversations additionally require current visibility of that client through the authorized client directory. The server supplies the selected client as the default context; tools still use the user’s live permissions.

Workbench tools call existing client, space, task and membership services with that actor. Task grants still control reads and mutations. Membership additions and invitations use the existing role policy. The personal agent and Team Wes both create invitations through the shared membership service and [durable invitation email workflow](/architecture/authentication#invitation-email). Tool results report `copy-link` when delivery is disabled or `email-queued` when enabled; queued email does not confirm inbox delivery. Invitations do not enroll conversation recipients. Platform-role changes require live `platform_admin` authority and recheck it within the SQL mutation. An organization admin cannot appoint a platform admin merely through organization membership.

Read results become working-context source receipts. Before another model request, tool call or final delivery, the server rechecks all retained read permissions; account receipts also require the exact active installation revision. Receipts remain attached across turns and compaction because earlier tool results and derived files remain available. Deleting a source does not remove its retained provenance. If a retained source becomes inaccessible, continuation fails closed rather than reusing restricted context.

The private conversation owns a persistent native Pi session and Computer workspace. Each new message submits only its new instruction; the native transcript retains earlier tool calls and results and uses Pi's context compaction rather than truncating history to a fixed message count. Blocking compaction uses the same live authorization boundary as generation; background compaction is disabled. Every tool and generation task binds its original operation through a durable task memo, so session reuse cannot retarget an old call to a newer message. Stop and retry tracking remain operation-specific.

Human messages are saved before native submission. Exact retries reconcile the same ID and immutable content without issuing another operation. A second active operation across any of this agent’s conversations is rejected. Operation IDs cannot be reused across client or general conversations. Stop marks the operation unanswered before requesting native cancellation, blocking later tools and delivery even if cancellation is interrupted. Interrupted unsafe tools are not automatically repeated. Native results are reconciled into canonical private messages when the conversation is read; Pi retains its durable outcome if the browser closes first.

Messages are stored individually in the owning Durable Object, so growing history does not rewrite one unbounded KV value. The conversation returns the latest 100 messages; older records remain stored. Existing canonical history bootstraps the persistent native session once when upgrading from the earlier per-operation implementation; old tool calls are never replayed and old scratch workspaces are not silently imported. Legacy source receipts are retained for authorization. Subsequent messages continue the native session. The API exposes no other user's history.

## Private files

Use **Add files** in personal chat to select, drop or paste supported files, then send a message. Use **Files → Choose files → Upload** to save without sending a message. General **Your agent** and each client-private conversation have separate catalogs. Files in client-private chat are private to the user, not shared Client-channel files. The limits and supported formats match [conversation files](/architecture/files#upload-and-recovery): 10 MiB per file and up to ten attachments per message. Chat still requires message text.

All saved metadata stays in the existing Postgres `file` table. `file_personal_context` maps a file ID to its owning user, firm and exact general/client context; it also records retry identity, immutable storage backend and retained Workbench source receipts. Existing shared files keep their conversation and storage-location links. Private files have neither shared link. No fake space or shared conversation is created.

Bytes use the existing environment-owned private evidence bucket under `personal/<organization>/<user>/<context>/evidence/<file>/<version>`. Paths are server-generated, display names never become paths, and no buckets are provisioned per user or client. Space deletion only cleans its own shared prefixes and cannot reclaim personal files. The private API checks the active account, firm membership and client visibility before use and again after storage I/O. Knowing a file ID or hash does not grant access.

Upload retries reserve one version in a transaction and use create-once object writes. Pending rows are hidden; retry with the original key and bytes reconciles the same version. Changed content or metadata conflicts. Successful files remain selected after partial upload/message failure, preserving their upload IDs; exact message retries compare text and attachments. Unsent selections live only in browser memory and require reselection after reload. Removing a selected saved file does not delete its catalog record. Uncertain pending evidence is retained; there is no new automatic deletion or retention policy.

Saved message attachments pin immutable file/version/hash references. The agent can list files and import an exact authorized version into that conversation's persistent Computer workspace. Attachment receipts survive native-session reuse and compaction. `file_save` snapshots a bounded working file into the same catalog; it does not publish to Team or Client channels. Completed agent replies attach the latest ten files saved by that operation; additional saved files remain in Files. Computer path and symlink checks protect saved snapshots. Saved output retains its Workbench read-source receipts, which metadata and content reads recheck; revocation cannot be bypassed by downloading a derived file.

Opening a private attachment revalidates metadata and downloads verified bytes into the existing inert viewer. Bytes are held only for the open preview and discarded on close; reopening repeats authorization. Downloads remain authenticated attachments with `nosniff`. Agent completion refreshes the catalog. Private-to-shared publication, revisions, deletion, OCR, image uploads and Excel preview remain separate work.

## Account connections

**Apps & Files → Add connection**, or the standalone agent page, reuses the existing searchable Executor catalog picker and OAuth requirement controls. Search queries the native catalog, with up to 50 matches per query. It excludes the Executor management integration. Users do not configure skills. Providers that require an OAuth client registration expose that setup requirement; showing a catalog entry does not imply its provider consent has already been configured.

Every installation has its own native app and private user-and-organization inventory entry. Personal accounts never enter a space's shared Finance app or Team grant. Workbench stores native references and PKCE-derived agent grants privately; provider credentials remain in Executor. A scoped native MCP grant permits only that installation's app and exact connected account targets. It can call the app's read and write tools, retaining Executor's native browser approval behavior.

OAuth intents bind the installation, requirement, state hash and expiry to the owning instance. The callback requires the same authenticated scope and exact configured return URL before completing the native connection. Cancellation discards the pending intent. Disconnect removes that installation's account link and invalidates its grant and retained unpublished context. It does not revoke a reusable credential elsewhere.

External mutations record an uncertainty claim before contacting Executor. An interrupted install, consent completion or grant issuance becomes `reconcile_required`; the UI reports setup needs attention instead of silently retrying an operation with an unknown outcome. Operator reconciliation is required for those states. Connection labels and public chat responses never contain tokens or management credentials.

The implementation reuses the existing stage-owned Executor host, service identity and reviewed provider registrations. Host activation and provider configuration still apply. Model configuration and local regression commands are in the [CLI reference](/reference/cli#personal-agent-runtime).

## Browser

Personal agents use the same [managed browser and takeover controls](/architecture/team-agent#optional-tools-and-inbox-behavior) as Team. Each conversation's native working context gets a separate browser, including separate general and client conversations. Viewing or controlling it rechecks the current user, organization, client visibility and retained source/account permissions. Use the Browser button to inspect the latest screenshot or take control for a login. Closing the panel does not return control; use Return control to agent when finished.

## Verification boundary

The native regression exercises actual Pi, remote code-mode execution, native Computer file tools and SQLite storage with synthetic model responses and blocked external network access. It verifies separate client and general histories, native sessions and working files, plus a file created in one turn is read and edited in a follow-up after restart, retained tool results, exact retries without repeated edits, and denied continuation after an earlier source is revoked. HTTP integration coverage checks real task grants, platform-role policy and membership revocation. Durable-state tests protect exact retry admission, stop behavior, organization/user isolation and ambiguous connection mutations. Hosted provider OAuth, real external writes, browser keyboard and screen-reader flows still require acceptance in an authorized environment.
