Your thinking partner.
README.md

Co — a personal mobile client for the Letta Agent SDK #

Chat with your Letta agents from your phone: pick an agent, watch it think, run tools, and ask you for permission before it does anything consequential. Works against Letta Cloud or your own machine running a Letta app-server.

Co tracks Letta's Agent SDK mobile reference app while giving it a warmer visual language and a product direction centered on thoughtful, everyday use. Every screen maps to a small number of files, and the whole SDK story — resuming a session, reducing the stream into a transcript, approvals, aborting, queued follow-ups — lives in one readable file you can lift into your own app.

Conversation history Completed chat with markdown
Running tool call Tool approval

Built with Expo (React Native), TypeScript, and @letta-ai/letta-agent-sdk.

Try it on your phone #

Install Expo Go on your iPhone or Android device, then run:

git clone https://tangled.org/cameron.stream/co
cd co
bun install
bunx expo start --tunnel

Scan the QR code shown in the terminal with your phone.

To build the native app locally instead:

bun run ios      # requires macOS and Xcode
bun run android  # requires Android Studio

Android build artifacts #

Build, sign, and publish an APK to Tangled from your Mac:

bun run release:android v0.1.6

Use --build-only to save an APK without publishing, or --publish-only to upload that saved build later. See Android releases for local credentials, signing-key backup, and release details. Hosted Android builds are disabled because the public runner times out before compilation.

Co has three EAS Build profiles in eas.json:

Profile Artifact Intended use
e2e Unsigned APK Emulator automation and disposable test builds
preview Signed APK Direct installation and internal sharing
production Signed AAB Google Play submission

Installable preview APK in EAS Build:

bun run build:android:apk

Build the same profile on the current machine:

bun run build:android:apk:local

The local build requires the Android SDK/JDK toolchain. Set ANDROID_HOME to the installed SDK before running it. EAS cloud builds do not require a local Android SDK.

On macOS with Android Studio installed, Co can also build directly through generated Gradle files without an Expo login:

bun run build:android:apk:native

This uses Android Studio's bundled JDK and ~/Library/Android/sdk by default, then writes artifacts/co-release.apk. Override JAVA_HOME or ANDROID_HOME when the tools live elsewhere. This locally generated APK is signed with Expo's generated Android debug certificate; use it only for direct testing. Use the EAS preview profile for a consistently signed shared build and production for Google Play.

Build the unsigned emulator/E2E artifact or Play Store bundle:

bun run build:android:e2e
bun run build:android:store

The first signed build prompts for Expo authentication and Android credentials. EAS can create and retain the keystore. Keep using that keystore for future versions of com.letta.co; replacing it prevents upgrades over an already-installed build.

After downloading an APK, install or replace Co on a connected Android device with:

adb install -r path/to/co.apk

Then connect it to one of two things.

Letta Cloud — choose Letta Cloud on the first screen, then continue in your browser with OAuth or paste an API key from platform.letta.com. The reference build includes the general-purpose Letta Mobile public OAuth client and uses letta-mobile://oauth/callback. Apps that need a separate OAuth identity can set EXPO_PUBLIC_LETTA_OAUTH_CLIENT_ID and configure their own scheme. Access tokens, refresh tokens, and API keys stay in the device keychain (expo-secure-store). Cloud requests always use https://api.letta.com.

The distributed OAuth client is ci-let-94bf2d5e34984a684fb6b18880b6bc7d. It is a public identifier, not a client secret. The registered redirect is letta-mobile://oauth/callback, and the app always uses Authorization Code with PKCE.

Your own machine — run an app-server wherever your code lives:

npm install -g @letta-ai/letta-code
openssl rand -hex 24 > /tmp/ws-token
letta server --listen ws://0.0.0.0:4610 --ws-auth capability-token --ws-token-file /tmp/ws-token

Choose Your own server, enter ws://<your-machine>:4610, and paste that token. The token is required from a phone: React Native always sends an Origin header, and app-servers only accept those on token-authenticated upgrades.

This is a real terminal on that machine. An agent connected to your own server can read files and run commands there. For anything beyond your own LAN, put it behind TLS (wss://) or a private network such as Tailscale, and treat the endpoint as a credential.

Requires Agent SDK 0.7.x with letta-code ≥ 0.30.5; the single-socket transport means those two move together.

What it does #

  • Agents and conversations — browse, search, create, rename, delete; cursor pagination on both lists and on message history.
  • Streaming chat — assistant text as it arrives, collapsible reasoning with live think time, markdown with fenced code and tappable links, long-press to copy.
  • Tool calls — status from running to settled with durations, a detail sheet with the full input and output, unified diffs coloured, and consecutive calls collapsed into one "Ran 5 tools" row so a long agentic turn stays readable.
  • Approvals — when the agent wants to run something, you get the full command, the working directory, one-tap "always allow" suggestions, and allow/deny with a reason.
  • Permission modes — strict, standard, accept-edits, unrestricted, switchable mid-conversation.
  • Interrupt and queue — stop a running turn, or send follow-ups that queue behind it.
  • Attachments — send screenshots and photos, downscaled on device.
  • Reconnect — background the app and come back mid-turn; state reconciles against the server rather than guessing.

How it's built #

Two rules run through the whole app:

  1. The server is the truth. Run phase, queue order, and approvals render only what the runtime confirms. Mutations show pending, never pretend.
  2. Opening a conversation is free. History hydrates over REST; the SDK session — and on Cloud, its sandbox — is created lazily on the first send.
Layer Files What it teaches
SDK ↔ UI src/lib/letta/ChatSession.ts The whole story: resumeSession, reducing stream(), canUseTool approvals, abort, queue
Transcript rows src/lib/letta/transcriptProjection.ts Turning the SDK's createTranscriptAccumulator() rows into render state
Domain model src/lib/letta/model.ts The snapshot vocabulary the UI renders — the mock and real transports both speak it
Data layer src/lib/letta/api.ts Agents, conversations, models, history via the portable client
Mock transport src/lib/letta/mockSession.ts A fixture-driven fake session, so every UI state is reachable with no server
Design system src/theme/tokens.ts Colour, type, space, motion — everything visual resolves through tokens

A note on idiom, since it is the point of the repo: row identity, delta accumulation and replay suppression are not hand-rolled here. They belong to the SDK's transcript accumulator, and this app keeps only what the SDK cannot know — which row is live, how long a think took, and the two tool states the approval flow owns. Earlier versions of this app did hand-roll them and got them subtly wrong; the shape you see is the second answer, not the first.

Two dev-only routes are worth opening: /gallery renders every component in every state against the mock transport (no server, no credentials), and /stills renders the press screenshots.

Deeper detail lives in docs/design-doc.md (visual system, screen map, and the screen→SDK operation map) and docs/architecture.md.

Review the mobile redesign #

The current design pass keeps Around, Inter, and the website’s purple accent while refining onboarding, chat, history, and appearance settings. Run bun run preview:design --port 8088 and open http://localhost:8088/stills?scene=chat for an interactive local preview. See the redesign notes for the direction, native review steps, and validation limits.

Co's visual layer #

The application architecture and interaction behavior come from Letta's Agent SDK mobile reference app. Co uses Cameron's Around display face and the Inter body face, white/black surfaces, fine gray rules, and purple accent from cameron.stream. Those changes are deliberately concentrated in app.json, src/app/_layout.tsx, src/app/index.tsx, src/components/ui/Text.tsx, and src/theme/tokens.ts so upstream behavior can keep moving without turning every sync into a design-system merge conflict.

The glossy per-agent marks remain because they make agents easy to distinguish in lists; they are an interaction primitive rather than Co's app identity.

See UPSTREAM.md for the exact imported revision and sync policy.

License #

Apache-2.0, assets included — there is no separate artwork carve-out, because the app ships no third-party marks.

"Letta", "Letta Cloud" and "Letta Code" identify the service this client connects to. That is nominative use and grants no rights in those marks; Apache-2.0 §6 grants none either. Give a published fork its own name and icon.

Co opens directly into the latest conversation. New conversations are a clean chat surface with the compact composer; there is no separate home page.