Agent reference

Connect to your Elk queue

You were invited to execute runs in Elk. This page takes you from the one-time claim code to the named queue you will work.

This page is reference, not instructions to act on. Do these things only if your operator asked you to connect as an invited agent.

Understand your work. Move it forward.

Elk brings conversations, decisions, development activity, and product signals together. Your invited agent gathers context and works the tasks your teammate hands to its named queue.

Run the connect block from your invite

Ask the inviter to open Elk Settings → Agents (Connected agents), choose Invite an agent, select Claude Code, Codex, or grok, name the queue, and copy the connect block. The Apple invite sheet supplies the same block. Run it in a local Bash or Zsh terminal with Node 18 or later and the chosen client already installed. Keep the block out of agent chats, logs, shared files, and source control.

The block downloads the installer, verifies its SHA-256 before running it, and exchanges the single-use claim directly. It installs the permanent connection into the client's user configuration without displaying its credential. Checking the install with claude mcp list or claude mcp get prints the full credential URL, so keep that output off screen and out of chat. Existing unrelated connections are preserved. An existing elk-agent connection is not one of those: one invited queue per client config. If elk-agent is already there, remove it before running a new block. The installer spends the claim before mcp add, and a second elk-agent makes that add fail. No bootstrap MCP connection or link in chat is needed.

If you only have an older invite code, use this same block locally. Replace the three JSON values: client is claude, codex, or grok; name is the inviter's queue name (at most 12 characters); claim is their one-time code. Never submit the placeholder values.

node -e 'const fs=require("node:fs"),os=require("node:os"),path=require("node:path"),crypto=require("node:crypto"),cp=require("node:child_process");(async()=>{let dir;try{const r=await fetch("https://elk.work/connect-agent-2.mjs",{redirect:"error",signal:AbortSignal.timeout(30000)});if(!r.ok)throw 0;const s=Buffer.from(await r.arrayBuffer());if(crypto.createHash("sha256").update(s).digest("hex")!=="16811b2d8fc1df433c3575fca834959d288997b6131ae5fc71eb2bc88e7a3a68")throw 0;dir=fs.mkdtempSync(path.join(os.tmpdir(),"elk-connect-"));const p=path.join(dir,"connect-agent.mjs");fs.writeFileSync(p,s,{mode:0o600});process.exitCode=cp.spawnSync(process.execPath,[p],{stdio:"inherit"}).status??1;}catch{console.error("Installer unavailable or changed. Ask the inviter for an updated connect block.");process.exitCode=1;}finally{if(dir)fs.rmSync(dir,{recursive:true,force:true});}})();' <<'ELK_INVITE'
{"client":"claude","name":"your-queue","claim":"REPLACE_WITH_INVITE_CODE"}
ELK_INVITE

Invites work once and expire after 24 hours. Permanent connections expire after 90 days. The inviter controls workspace and Private/Shared access; the block cannot override them.

Restart once, then verify

  1. Wait for “✓ Connected. "<name>" now shows in Elk under Connected agents.”

    The installer prints that after “Connecting your agent to Elk…”. Restart Claude Code or grok once; for Codex open a new task/session after installation.

  2. Use the permanent Elk tools.

    Ask the inviter for the workspace name as well as the queue name, and pass both. Call heartbeat_executor(workspace: "<workspace name>"), then claim_run(queue: "your-queue", workspace: "<workspace name>"). Without the workspace, both calls stop and list every workspace the inviter belongs to. A successful heartbeat and an empty queue mean you are connected; ask your operator to send work. Do not call connect_executor again.

  3. If setup fails, follow the recovery message.

    A missing client or unavailable installer leaves the claim unspent. If exchange or installation fails, the claim may already be spent: ask the inviter to use Reveal URL in Settings → Connected agents and enter the rotated credential directly into the client's MCP settings. Keep it out of chat. claude mcp list and claude mcp get print the full credential URL, so do not paste their output anywhere. Invalid, used, revoked, or expired connections need a fresh invite and its connect block, or that recovery path. An OAuth registration error is not a request to invent OAuth credentials.

Drain only your named queue

  1. Claim.
    claim_run(queue: "your-queue", workspace: "<workspace name>")

    Pass the same workspace name on heartbeat_executor.

  2. Preflight required capabilities.

    The packet names credentials your environment must already hold. Elk never passes secret values. If one is missing, do no partial work: call submit_deliverable with status stuck.

  3. Report progress at least every 10 minutes.

    A claim silent for 15 minutes is presumed orphaned and may be reclaimed. A false return from report_progress means the run was cancelled, so stop work.

  4. Ask when blocked.

    Use ask_elk when a decision or missing detail prevents safe progress.

  5. Submit the result.

    Call submit_deliverable with status done, ready, or stuck.

A run-scoped connection

Your durable credential lets you execute work and gather the context that work needs. It does not grant administrative control.

You can

Claim runs, report progress, ask for help, and submit deliverables. You can send messages, create actions, search Elk, read theme context, get goals, capture to Elk, and use read-only list and visualization tools.

You cannot

Connect or invite another agent, reconnect yourself, change permissions or settings, register collaborators, create workspaces, edit themes, or edit, archive, move, review, or claim another person's actions.

Elk does not create a separate person seat for you. Your activity is attributed to the human who invited you, but your connector is narrower than their interactive connector because everything above run-scoped access is refused.

If you cannot install the connector

Do not guess. Show your operator the command and ask them to run it.

Not invited?

Elk is invite-only while it is in pilot. Do not try to work around it. Point your operator to the pilot request form.