OpenInstinct README

The project's README from github.com/Merit-Systems/OpenInstinct. As one markdown file: README.md.

OpenInstinct

A personal iMessage assistant that can use a browser like you.

It can do your chores, book you movie tickets, or handle your groceries. You stay in control of your passwords, credit cards and context.

It's Open Source, self-hostable, and can use any model. One-click deploy to Vercel and get rolling.

Deploy with Vercel

OpenInstinct booking movie tickets over iMessage — it walks Fandango to checkout and reports the theater, showtime, seat, and total

Agents: For the simplest deployment, give your human the Deploy with Vercel link above and have them complete the guided flow. It automatically provisions and connects Kernel, Postgres, private Blob storage, Linq, and Vercel AI Gateway access. OpenInstinct creates its installation secrets on first use.

Why self-host?

Personal agents are much more useful when they can sign in, book, buy and act on your behalf. But your accounts, your passwords, are the keys to your digital kingdom. OpenInstinct runs in your own Vercel account. Secrets are encrypted before they touch your database and models never see them. Verify yourself by reading the code!

Deployment

The deploy button provisions Kernel for cloud browsers, Neon for Postgres, and a private Vercel Blob store for browser images, per-user memory, and installation secrets. It also creates and attaches a Linq connector for iMessage. Vercel AI Gateway handles inference. Usage is billed to your Vercel account.

On first use, OpenInstinct creates independent Better Auth and vault-encryption keys in the private Blob store. Vercel supplies the application URL, database, Kernel, Blob, and Linq configuration, so the deploy flow requires no environment-variable values. For a non-Vercel host or an existing installation that manages its own keys, set both secret overrides and the public application URL explicitly:

BETTER_AUTH_SECRET="$(openssl rand -base64 32)"
BETTER_AUTH_URL=https://your-host
SECRET_ENCRYPTION_KEY="$(openssl rand -base64 32)"

The application database schema and versioned migrations live in db/. The Drizzle application store uses DATABASE_URL for runtime queries; its migration commands require the direct DATABASE_URL_UNPOOLED connection. Run pnpm db:migrate before starting against a new or upgraded local database. Vercel uses Turbo to run the uncached migration task before its application build. See db/README.md for existing-database adoption, environment loading, and constraint-validation sequencing. Better Auth retains its separate migration path.

Treat the private Blob store as production key material: deleting it loses the automatically generated encryption key, and rotating that key requires re-encrypting existing vault values.

Blob storage

The one-click deploy creates and connects a private Blob store automatically. Vercel supplies BLOB_STORE_ID and a short-lived VERCEL_OIDC_TOKEN to each deployment, so there is no long-lived Blob credential to copy.

OpenInstinct uses this store for persistent per-user memory and browser images. Production conversations require it because memory is recalled before each agent turn. Local Eve development uses process-local memory instead.

Ongoing undertakings use a separate workstreams memory slot backed by the application database. Run the application migrations before using this feature; it needs no additional service or credentials. The root agent can save goals, constraints, decisions, source-linked observations, and unresolved steps across conversations. It recalls an index of the eight most recently updated active or waiting workstreams, then reads the selected record before continuing. Older and completed workstreams remain searchable.

Workstreams are scoped by authenticated workspace and Eve's deployment-aware memory key. Updates require the current revision. Each scope retains content for up to 100 bounded records; the agent asks which obsolete record to forget at capacity. Forgetting erases the content and source references, retaining only a tombstone to prevent an interrupted save from restoring them. Existing chat history is unchanged. This slot is available only in interactive root turns; remembering work does not start a job, create a schedule, or authorize an action.

For an existing Vercel project, link it first with eve link --project <your-vercel-project> --non-interactive, then create and connect the store with one command:

pnpm exec vercel blob create-store open-instinct-images --access private --yes --environment production --environment preview --environment development

Outside Vercel, set BLOB_READ_WRITE_TOKEN from a private Blob store instead. The memory provider uses that token explicitly, and browser image capture uses the same store.

Linq iMessage setup

The deploy button creates a managed line, writes LINQ_CONNECTOR, and attaches the inbound webhook trigger automatically. For an existing Vercel project, link the checkout, create a Linq line, and attach its connector for both app tokens and inbound webhook triggers:

vercel link
vercel connect create linq --connection-method line --name open-instinct --json
vercel connect attach <returned-connector-uid> --project <your-vercel-project> --environment production --triggers --trigger-path /eve/v1/linq --yes
vercel env add LINQ_CONNECTOR production --value <returned-connector-uid> --yes
eve deploy --non-interactive --yes

The create command returns the connector UID. Repeat the attachment and environment-variable steps for preview or development if those environments should use Linq too. LINQ_PHONE_NUMBER is an optional E.164 override that adds a click-to-message shortcut in the workspace; Linq delivery itself uses the line assigned to the connector.

Before the first sign-in, open the connector's Vercel Connect settings and follow the one-time Phone Numbers verification instruction. Additional users verify themselves by messaging the connector's Linq number once. The --triggers --trigger-path /eve/v1/linq options are also required: attaching a connector without them permits outbound token access but does not forward incoming messages to OpenInstinct.

Google Workspace connection

OpenInstinct can use a user's Gmail, Calendar, and read-only Contacts through a user-scoped Google OAuth grant. Vercel Connect stores and refreshes the tokens; OpenInstinct stores only the stable user identity used to request them. Gmail access deliberately uses gmail.modify, not the permanent-delete mail.google.com scope.

  1. In one Google Cloud project, configure the OAuth consent screen and enable the Gmail API, Google Calendar API, and People API.

  2. Create OAuth web credentials. Add https://connect.vercel.com/callback as an authorized redirect URI, then download the client-secret JSON.

  3. Vercel expects top-level clientId and clientSecret keys, not Google's nested web.client_id and web.client_secret download. Convert the download into a temporary file outside the repository, then create and attach the connector:

    vercel link
    google_credentials_file="$(mktemp)"
    jq '{clientId: .web.client_id, clientSecret: .web.client_secret}' /absolute/path/to/downloaded-client-secret.json > "$google_credentials_file"
    vercel connect create google --connection-method oauth --name open-instinct --data @"$google_credentials_file"
    rm -f "$google_credentials_file"
    vercel connect attach <returned-connector-uid> --project <your-vercel-project> --environment production --yes
    vercel env pull
    

    Never commit either credential file.

  4. Set GOOGLE_CONNECTOR_UID to the returned UID and redeploy. The default is google/open-instinct.

Gotchas:

Local development

The Deploy with Vercel flow above is the simplest way to run OpenInstinct. It provisions the required services and credentials automatically. Local development is a manual path and requires:

First clone and install the application:

git clone https://github.com/Merit-Systems/OpenInstinct.git
cd OpenInstinct
pnpm install --frozen-lockfile

For fully manual setup, copy the environment template and add your Kernel and AI Gateway keys:

cp .env.example .env.local

# Set KERNEL_API_KEY and AI_GATEWAY_API_KEY in .env.local.

If you already use a Vercel project, link it to pull AI Gateway access. If that project does not have Kernel yet, the Marketplace CLI provisions the free Developer plan, connects it to the project, and pulls its environment variables:

pnpm exec eve link --project <your-vercel-project> --non-interactive
pnpm exec vercel integration add kernel --plan FREE

Then start OpenInstinct:

pnpm dev

pnpm dev starts PostgreSQL from compose.yaml, applies the committed database migrations, and starts the application. Stopping the development process also stops and removes the PostgreSQL container; its data remains in the postgres-data volume for the next run. Run pnpm dev:app when intentionally using an externally managed database instead. If KERNEL_API_KEY is missing, pnpm dev stops before starting Docker and points back to the recommended Vercel flow or the manual .env.local setup.

Local development otherwise uses the same vault, Kernel browser, and AI Gateway path as the Vercel deployment. Better Auth and vault encryption use stable local-only defaults when their variables are unset. Vercel deployments provision them automatically in private Blob; other production hosts require explicit secrets.

[!WARNING] This is not software intended for production use.


Built on Vercel · Kernel · Linq · Neon

OpenInstinct (Merit-Systems/OpenInstinct)

Searching Database…

这是什么?OpenInstinct 是一个个人 iMessage 助手,能代你浏览网页,处理订电影票、买日用杂货之类的琐事,同时把你的密码和信用卡锁在一个由你掌控的加密保险库里。
这是我自己运行的,还是托管服务?它是一个自托管的开源应用:你把它部署到自己的 Vercel 账户里,而不是注册某个 SaaS 产品。
怎么部署它?点击 Deploy with Vercel 按钮,它会自动开通用于云浏览器的 Kernel、Neon Postgres、私有 Blob 存储、用于 iMessage 的 Linq 连接器,以及 Vercel AI Gateway 访问权限,并在首次使用时创建自己的密钥。
把它连到我的 iMessage 号码需要什么?部署流程会自动创建一个托管的 Linq 号线和 webhook;你只需在首次登录前,在 Vercel Connect 里完成一次性的 Phone Numbers 验证,其他人只要给这个连接器的号码发一条短信就能使用。
它准备好投入生产使用了吗?没有,项目明确警告它目前还不适合生产使用。
我的密码和信用卡信息会怎么样?机密信息在碰触数据库之前就已加密,AI 模型永远看不到它们;README 邀请你读代码亲自验证这一点。
它可以用我想要的任何 AI 模型吗?可以,推理通过 Vercel AI Gateway 路由,你想接哪个模型就接哪个。
它能访问我的 Gmail 和日历吗?可选。它通过用户范围的 Google OAuth 授权支持 Gmail、日历和只读联系人访问,使用受限的 gmail.modify 权限范围,而不是完整的邮件删除权限。
它底层依赖哪些服务?它是一个构建在 Vercel 上的 TypeScript/Next.js 应用,用 Kernel 做云浏览器自动化,用 Linq 提供 iMessage 连接,用 Neon 存 Postgres 数据。
不部署的话,怎么在本地运行?克隆仓库,用 pnpm 安装依赖,把 Kernel 和 AI Gateway 密钥加进 .env.local,然后运行 pnpm dev——它会通过 Docker Compose 启动 Postgres,并自动执行迁移。
What are similar projects?openclaw, Zero, leon, crm, sim, open-glean, Octop, openmuse
Size
6.6 MB
Stars
457
Updated
CommitOct 05
Age
1mo
Commits · 90 Days