npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@athenaintel/react

v0.67.0

Published

Athena React SDK — Build AI-powered chat applications with the Athena platform

Readme

@athenaintel/react

React SDK for building AI-powered chat applications with the Athena platform.

Installation

npm install @athenaintel/react

If you use the PropelAuth-specific provider from @athenaintel/react/auth, also install:

npm install @propelauth/react

Upgrading

SDK0.29.0 uses native Statewire wire2026-09-30 with Athena application2026-09-13. With statewire 0.21 it opens a WebSocket on public, unpatched installs too: its {} ping is answered by Athena's hosts from Python statewire 0.19.1 on. It requires a compatible backend. Publication is temporarily withheld until production HTTP+WebSocket and authorization tests pass and a compatible backend rollback release is retained. The publish workflow requires a manual PRODUCTION_NATIVE_CONTEXT_AND_ROLLBACK_QUALIFIED acknowledgement; dry runs remain available. Once a release is on npm, the computer starters (docker/athena-app, docker/default-vite, docker/kpmg-audit) move to it with scripts/computer-starter-lockfiles.ts --react <version>; no package release-age gate holds them (owner decision 2026-11-21). The qualification steps and gate removal condition are in the coordinated release runbook.

SDK 0.59.0 moves to statewire 0.27 and Athena's 2026-11-04 command contract: every message is one run/send, on wire 2026-11-01. Athena's hosts serve it from the release that added run/send (agora on Python statewire 0.23.1, Athena's managed cloud since November 8, 2026), and an older host cannot serve a 0.59.0 chat: a customer deployment upgrades its own Athena before moving its apps to 0.59.0 (see What's new in 0.59.0). 0.58.0, which first offered wire 2026-11-01, was tagged but never published; 0.59.0 carries it.

SDK 0.63.0 keeps 0.62.0's transport: it attaches and sends the same way, and asks nothing of Athena that 0.62.0 does not to hold a conversation. What it adds reads a newer Athena's answers and does without them on an older one: an attachment's chip is drawn as refused or archived once Athena stores its verdicts and as sent until then, and the ontology hooks ask featureGateEnv whether a gate is open and ask the gate itself where that cannot be answered (see What's new in 0.63.0). Three things show on upgrading with no change to your code: a finished turn starts folded under its header (foldFinishedTurns={false} on AthenaAssistantMessage keeps it open), each message's action bar gains Branch (branching={false} on AthenaChat leaves it out), and Edit is offered on the person's own messages while a run is live. @y/y moves from 14.0.0-rc.29 to 14.0.0-rc.30: an app that installs @y/y itself beside @athenaintel/react/collab moves with it, so the two resolve one copy.

SDK 0.63.1 keeps 0.63.0's transport: it attaches and sends the same way, and moves no dependency. One public shape changes: ConversationHistoryPanel (@athenaintel/react/chat-ui) draws the Source filter (SessionSourceFilter) in place of the All / Chats / Automations chips, so its activityFilter and onActivityFilterChange props and the ConversationActivityFilter type are gone. A host that mounts the panel itself drops the two props; its originFilter now takes a source key, several joined by commas, or ALL_SOURCES_FILTER (see What's new in 0.63.1).

SDK 0.64.1 moves the chat's transport client: statewire 0.27.1 → 0.28.3 and @assistant-ui/react-statewire 0.35.1 → 0.35.2 (the wire is unchanged; the client redials sooner after sleep, a lost network or a half-open socket), and @y/websocket 4.0.0-rc.2 → 4.0.0-rc.6 under @athenaintel/react/collab. An app that installs any of the three itself moves with it, so each resolves one copy. No public name is removed (see What's new in 0.64.1). 0.64.0, the same SDK, was tagged but never published; 0.64.1 carries it.

SDK 0.65.0 keeps 0.64.1's transport and moves no dependency. One public surface changes: workspace presence (@athenaintel/react/collab) reads Athena's roster instead of the Keryx awareness room. useWorkspacePresence and connectWorkspacePresence keep their names and return the same handle, but mintWorkspacePresenceToken, WorkspacePresenceTokenResponse, derivePresenceState, mergePresenceStates and the awareness-slot constants (PRESENCE_SWEEP_INTERVAL_MS, PRESENCE_DEFAULT_TICK_MS, PRESENCE_ACTIVE_WINDOW_MS, PRESENCE_IDLE_WINDOW_MS, MAX_PRESENCE_CONTEXTS_PER_SLOT, MAX_PRESENCE_STRING_CHARS) are gone. The roster answers a signed-in person only, an admin of the workspace or a member of one with the roster on: anyone else (a non-admin where the roster is off, a host that gives AthenaProvider an API key) and an Athena that does not serve the roster yet see error (see What's new in 0.65.0).

SDK 0.66.0 keeps 0.65.0's transport: it attaches and sends the same way, on statewire 0.28.3 and @assistant-ui/react-statewire 0.35.2, and asks nothing of Athena that 0.65.0 does not to hold a conversation. It adds one dependency, @tanstack/react-virtual 3.13.24, and removes no public name. Three things show on upgrading with no change to your code: a long model step's row reads a live headline from its thought with its own time ("Checking the alignment bindings · Thinking for 1m 12s", then "Thought for 9s"); a transcript past 24 rows draws only the rows near the screen, so a host that reads or tags the transcript's DOM sees only those; and while a run is live the composer shows Stop beside Queue (see What's new in 0.66.0).

SDK 0.67.0 keeps 0.66.0's chat and transport byte for byte: only @athenaintel/react/collab changes, with no dependency added or moved and no public name removed. One thing changes on upgrading with no change to your code: a Generic Doc handle whose token refresh Athena refuses (401, 403, 404) now ends with status: 'error' and closes its socket, where 0.66.0 kept the socket and asked again every 30 seconds. A host on connectGenericDoc that wants a refusal asked again says so with its retryMintError. useGenericDoc takes no such option: its handle ends, and a new one opens when the component mounts again or its asset or sign-in changes (see What's new in 0.67.0).

The SDK pins its assistant-ui runtime (@assistant-ui/tap, store, core, react, react-statewire, statewire) at exact versions, and those packages carry React contexts and module singletons: an app must resolve exactly one copy of each. A fresh install does. An existing app does not necessarily — bun keeps a bun.lock's existing resolutions on bun add, so after an SDK bump the transitive @assistant-ui/react-statewire / statewire dependencies can keep an older nested @assistant-ui/tap next to the SDK's new one. Two tap contexts mount and the page renders blank with:

Error: AssistantTapContext is not available

Make the app immune with a resolve.dedupe list in vite.config.ts (the Athena computer templates ship it; other bundlers have an equivalent single-instance setting):

export default defineConfig({
  resolve: {
    dedupe: [
      '@assistant-ui/tap',
      '@assistant-ui/store',
      '@assistant-ui/core',
      '@assistant-ui/react',
      '@assistant-ui/react-statewire',
      'react',
      'react-dom',
    ],
  },
});

Then bump to the release you want. One exception comes first: if your app depends on an assistant-ui package itself (say @assistant-ui/react, for components of its own) and the new SDK pins the same assistant-ui stack as the old one (compare the two versions' dependencies), keep bun.lock. Run only the bun add line below and skip deleting anything. A from-scratch resolve there can take newer core / store / tap patches through that package's caret ranges, beside the SDK's exact pins; resolve.dedupe above still mounts one instance at runtime. Otherwise, re-resolve from scratch. Lockfile-preserving commands do not do it — bun update and bun install --force keep the nested lockfile entries, and bun remove + bun add (or deleting only bun.lock) rewrites the lockfile but bun leaves the nested directories in node_modules, which Node still resolves first:

bun add @athenaintel/react@<version>      # the release you are upgrading to
rm -rf node_modules bun.lock && bun install
find node_modules -path '*/@assistant-ui/tap/package.json' | wc -l   # expect 1

Do not add @assistant-ui/* packages to your own dependencies to pin them: bun update @assistant-ui/tap on a package that is not a direct dependency behaves like bun add at the latest version and produces more copies, not fewer.

Quick Start

import { AthenaProvider, AthenaChat, Toolkits } from '@athenaintel/react';
import '@athenaintel/react/styles.css';

function App() {
  return (
    <AthenaProvider
      config={{ apiKey: 'your-api-key' }}
      tools={[Toolkits.DOCUMENT, Toolkits.WEB_SEARCH]}
    >
      <AthenaChat />
    </AthenaProvider>
  );
}

Provider Config

<AthenaProvider config={{ environment: 'staging' }}>
  <AthenaChat />
</AthenaProvider>

<AthenaProvider
  config={{
    apiUrl: 'https://iris.example.com',
    backendUrl: 'https://api.example.com',
    appUrl: 'https://app.example.com',
  }}
>
  <AthenaChat />
</AthenaProvider>

config accepts apiKey, token, getToken, apiUrl, backendUrl, appUrl, statewireSyncUrl, trustedParentOrigins, environment, extraRunConfig, and posthog. Top-level apiKey, token, apiUrl, backendUrl, appUrl, and environment props remain supported as compatibility aliases, but config is now the preferred API.

Several chats side by side

A host can show several chats at once: one AthenaProvider with enableThreadList drives the session list and its chat, and each further chat is an AthenaProvider of its own, bound to one thread with threadId, mounted anywhere in the tree (under the first one too):

const [thread] = useState(() => ({ threadId: mintThreadId(), isNew: true }));

<AthenaProvider config={config} threadId={thread.threadId} threadIsNew={thread.isNew}>
  <AttachmentProvider store={attachments}>
    <QuoteProvider store={quote}>
      <AthenaChat />
    </QuoteProvider>
  </AttachmentProvider>
</AthenaProvider>
  • threadIsNew says the host minted threadId (mintThreadId) for a chat that has not started: it attaches as new until the host turns it false, once the session list has the thread.
  • Each provider's assistant client is its own root, and one without a thread list hides any list above it, so a chat never defines another's tools or follows its thread.
  • createAttachmentStore() / createQuoteStore() give each chat's composer its own staged attachments and quote (<AttachmentProvider store>, <QuoteProvider store>), kept outside React so they survive the chat remounting in another window.
  • ⌘L quotes a selection into the chat it was made in, and one made outside every chat (or an embedded frame's text) into the chat the person last focused.
  • SessionList's onOpenInNewTab hands the host a session to open in such a chat.

A model picker, and a session's own model

Pass the picked model as model. Changing it while a session is open applies to that session's next turn:

  • On a session that has not run yet, the next send carries it, and the server keeps it as the session's model.
  • On a session that has run, the server runs every turn with the model the session's server config holds (another client, such as Athena itself, can change it too), so the SDK writes the new model there (config/patch {model}). Setting model back to undefined clears it, so the collab agent's own model, or the default, applies again.
  • The model a session is opened with is never written: opening a session never overrides the model someone chose for it.

Show the session's real model when it opens with useAthenaThreadModel() (inside <AthenaProvider>):

import { useAthenaThreadModel, useAthenaStatewireThreadId } from '@athenaintel/react';
import { useEffect, useRef } from 'react';

function SessionModelSeed({ onSessionModel }: { onSessionModel: (model: string | null) => void }) {
  const threadId = useAthenaStatewireThreadId();
  const { model, configured, ready } = useAthenaThreadModel();
  const seededFor = useRef<string | null>(null);
  useEffect(() => {
    // Once per session, after its snapshot lands; a session without server
    // config keeps the picker's current value.
    if (!ready || seededFor.current === threadId) return;
    seededFor.current = threadId;
    if (configured) onSessionModel(model); // null: the agent's / default model ("Auto")
  }, [threadId, model, configured, ready, onSessionModel]);
  return null;
}

model is null when the session pins no model; configured is false for a session without server config yet; wait for ready before reading either. A refused write (a view-only collaborator, or a workspace whose sessions cannot hold server config) is reported as a statewire.config diagnostics event, and the session keeps running with its own model.

The same holds for systemPrompt, tools (with the backend-bound frontendTools), workbench and knowledgeBase. On a session that has run, the server runs every turn with the values its server config holds, so changing one of these props while the session is open writes it there: one config/patch per change, carrying exactly the changed keys (model, system_prompt, enabled_tools, workbench, knowledge_base). A blank prompt or an empty list clears its key, so the collab agent's own applies again. The values a session is opened with are never written, and a host that never changes these props after the first send writes nothing. The statewire.config event names the refused keys other than the model in config_keys, never their values.

For a collab agent whose author restricts it to its own models, see Offering an agent's own models.

A session's own agent. agent seeds a new session's agent on its first send; after that the session's server config names its agent for good (collab_agent_id is a key the config owns), whatever agent says. Read it with useAthenaThreadAgent() (inside <AthenaProvider>): { agentId, configured, ready }, agentId the collab agent's asset id or null for the person's own Athena assistant; wait for ready, as with the model.

Grouping models by family. Each AthenaModelOption of useAthenaModelCatalog() also carries its place in its family, as agora's model registry names it: variantMode (STANDARD, THINKING, PRO), variantEffort (NONE, LOW, MEDIUM, HIGH, XHIGH, MAX) and variantServiceTier (STANDARD, FAST, ULTRAFAST), null where it names none. A picker can show one row per family (familyId) and an effort control instead of one row per model and effort.

Agents with who made them. useAthenaAgentDirectory() lists the agents useAthenaAgentCatalog() lists, each with createdBy (agora's user id of the person who made it) and updatedAt, so a picker can put the person's own agents first. It is a query of its own (AthenaAgentDirectory); the catalog is unchanged.

If config.appUrl is omitted, the provider resolves it from the parent bridge or from the matching Athena environment defaults. Known Athena staging and production apiUrl and backendUrl values automatically fall back to the corresponding frontend origin.

Use trustedParentOrigins when the SDK runs inside an iframe on a private-cloud or custom parent domain and you want to explicitly allow postMessage auth/config from that parent. Only the window that frames the app is heard. By default athenaintel.com hosts, localhost and your own origin are trusted, except the hosts that serve customer-written code (*.app.athenaintel.com, *.code-sandpack.athenaintel.com and friends; see "What's new in 0.28.0").

Plan mode

Plan mode is the agent's to-do plan: for multi-step work it writes the steps down (write_todos) and checks them off as it goes, which AthenaChat shows above the composer (AthenaPlanStrip). A thread plans unless its config excludes the write_todos tool or its TodoListMiddleware, which is what Athena on the web's Plan Mode switch does. Pass planMode to turn it off or back on:

import { AthenaChat, AthenaProvider, ChatPlanModeToggle } from '@athenaintel/react';

function Chat() {
  const [planMode, setPlanMode] = useState(true);
  return (
    <AthenaProvider config={config} planMode={planMode}>
      <AthenaChat
        composer={{ toolbarStart: <ChatPlanModeToggle value={planMode} onChange={setPlanMode} /> }}
      />
    </AthenaProvider>
  );
}
  • planMode={false} adds write_todos to the send's excluded_tools and TodoListMiddleware to its excluded_middleware, after anything your extraRunConfig excludes; true takes them out; omitting it sends neither.
  • As with model, changing it while a session is open applies to the next turn: on a session with server config the SDK writes one config/patch of the lists that change, computed from the session's own lists, so what another client excluded stays excluded. The value a session is opened with is never written. useAthenaThreadPlanMode() reads a session's own plan mode ({ planMode, configured, ready }, as useAthenaThreadModel reads its model); a refused write is a statewire.config diagnostics event with plan_mode and its config_keys.
  • A collab agent whose author turned off its built-in tools never plans: a run can only narrow what an agent may use.
  • ChatPlanModeToggle is the composer chip (a switch reading "Plan"), controlled like the pickers.

Folding attach and @ into a menu of your own

A host that offers attaching and the @ menu from a control of its own (a + menu, as Athena Desktop's composer has) turns the composer's own buttons off and runs them from a slot:

import { AthenaChat, useAthenaComposerActions } from '@athenaintel/react';

function AddMenu() {
  const composer = useAthenaComposerActions();
  return (
    <MyMenu>
      <MyItem disabled={composer?.needsConnectionReason != null} onSelect={() => composer?.openFilePicker()}>
        Files…
      </MyItem>
      <MyItem onSelect={() => composer?.openMentionMenu()}>An asset or person</MyItem>
    </MyMenu>
  );
}

<AthenaChat composer={{ attachButton: false, mentionButton: false, toolbarStart: <AddMenu /> }} />;
  • attachButton: false leaves the paperclip out; pasting and dropping files still attach them. openFilePicker() opens the same picker the paperclip does, and does nothing while needsConnectionReason is set.
  • mentionButton: false leaves the @ button out; typing @ still opens the menu, and so does openMentionMenu().
  • useAthenaComposerActions() is null outside a composer slot. Both default to true: a host that sets neither sees no change.

A welcome of your own

welcomeContent replaces the greeting (welcomeMessage, welcomeSubtext) in the empty thread with what the host renders, in the same place: Athena Desktop draws one centred line there whose project name opens its project menu. Absent, the greeting shows as before.

Composer slash commands

AthenaChat's composer.slashCommands (and TiptapComposer's slashCommands) give the composer a / menu of your own commands. Typing / at the start of the draft or after a space lists them, narrowed by what follows (a command's label, name or aliases). Arrows move through the list, and Enter, Tab or a click runs the selected command. Escape closes it. Enter sends nothing while the menu lists a command. A command that declares args (what it takes, as the menu shows it) gets the text typed after its name; any other command drops out of the menu once more words follow its name, so a message that starts with a command's word is sent as typed:

import { ListChecksIcon, MessageSquarePlusIcon } from 'lucide-react';
import type { ComposerSlashCommand } from '@athenaintel/react';

const commands: ComposerSlashCommand[] = [
  {
    name: 'new',
    label: 'New chat',
    description: 'Start a new conversation',
    aliases: ['clear'],
    icon: MessageSquarePlusIcon,
    group: 'Chat',
    run: () => startNewChat(),
  },
  {
    name: planMode ? 'plan-off' : 'plan-on',
    label: planMode ? 'Turn plan mode off' : 'Turn plan mode on',
    description: 'The to-do plan for multi-step work',
    aliases: ['plan', planMode ? 'plan off' : 'plan on'],
    icon: ListChecksIcon,
    group: 'Chat',
    run: () => setPlanMode(!planMode),
  },
  {
    name: 'open',
    label: 'Open a document',
    description: 'Open the document a link names',
    // `/open https://…` gives `args` "https://…".
    args: 'a link',
    run: ({ args }) => openDocument(args),
  },
];

<AthenaChat composer={{ slashCommands: commands }} />;
  • The typed /name args leaves the draft before run is called; insertText puts text in its place, as typed.
  • A command with a disabledReason lists greyed with the reason and does not run (a command that needs a connection, while there is none).
  • The list is read on every keystroke, so a command's label or disabledReason can change while the menu is open. Without commands, / is plain text.
  • A run that throws or rejects is reported as a composer.slash_command diagnostics event (slash_command_failed); what the person should see is the command's to say.

Transport (statewire only, as of 0.18.0)

The SDK speaks one chat transport: statewire. The provider attaches to the deep-agent statewire sync host at <statewireSyncUrl>/<threadId>, so the thread is hosted server-side and replicated live — history, reconnect, run scheduling, mid-run queueing, HITL approvals, and client tools (for recognized SDK hosts, e.g. computer-asset app_ids) all come from the server snapshot.

The legacy Iris /api/chat assistant-transport leg was deleted in 0.18.0 along with the transport prop — there is nothing to opt back onto. See Migrating from 0.17.

The sync endpoint resolves in this order: an explicit statewireSyncUrl; the statewireSyncUrl the host environment supplies (a Marathon-served computer asset mints it from /_athena/auth alongside backendBaseUrl, the bare Agora base — a trusted parent iframe can post the same fields); then the effective apiUrl host + /v2/threads (e.g. staging resolves to https://iris.stg.athenaintel.com/v2/threads, the same statewire base the mobile app and Chrome extension ship). Pass statewireSyncUrl to pin a custom host whose sync mount lives on a different origin. If nothing yields a URL (e.g. an unparseable custom apiUrl), the provider throws instead of falling back to an Athena default — credentials are never sent to a host you didn't configure. Hosts that predate the minted statewire fields keep working through the apiUrl derivation. Auth reuses the provider's existing credential plumbing: tokens ride Authorization: Bearer and API keys ride X-API-KEY. A getToken resolver is called with { force: true } right after the sync host refuses a credential, so a caching getter must mint a fresh token then; the persisted command lane is scoped to the signed-in user as well as the host, so a shared browser never resends one user's pending sends under the next user's token. That holds while the chat stays mounted too: when the signed-in user changes under it, the chat reconnects on the new user's lane as a new client, and what the previous user had not yet delivered waits under their name for their next sign-in. While a sign-in provider above the chat is still loading who is signed in (AthenaAuthContext with isLoading: true and no user yet), the chat does not connect and stores nothing: it connects once, under the signed-in user, when they are known, and sends made meanwhile wait for that.

What the statewire transport wires up in AthenaChat:

  • Approvals (HITL): when the backend parks a run on an approval-gated tool call, an approval card renders above the composer with Approve/Reject (or Decline for a park it has no card for) and resumes the run through the statewire run/input command. Hosts that build their own thread UI should mount the exported StatewireApprovalCard themselves — without it an approval-gated run stays parked with no way to answer it. A lone call whose resolved envelope carries a headline is titled by it, with its summary under it, above the card's own details (title on the slot context). Its renderDetails, isHandledElsewhere, and readOnly seams take host-specific review UIs, requests another surface answers, and viewers without edit rights; the headless useStatewireApprovalRequest behind it is exported for hosts with their own decision UI. Its confirmDecision seam runs the host's passkey decision check ("Confirm with your passkey") before an answer that lets anything run. The token it resolves rides as decisionCheck on run/input or run/lane-input. A reject never asks, and an answer with no token is still sent while checks are report-only. A passkey belongs to the Athena web app's host, so an app on another origin can't run that prompt itself: useAthenaBrowserDecisionConfirmer() (inside <AthenaProvider>, passed to <AthenaChat confirmDecision={…}>) asks agora for a check, opens the web app's check page in a new tab, and collects the token once the person confirmed there. Its onPending gets the code and link to show while the tab is open; useBrowserDecisionConfirmer takes your own request and opener when the provider's don't fit (an extension, an Office add-in).
  • The agent's typed questions and approvals: when a run parks on a typed Athena interrupt, AthenaChat renders that kind's own card, the ones Athena on the web shows, and answers with the resume shape its tool validates (a host that mounts StatewireApprovalCard itself passes typedInterrupts={statewireTypedInterrupts}, from @athenaintel/react/typed-interrupts; without it a typed park keeps the card's decline): the ask tool's questionnaire (one question at a time, yes / no, one or several options, text, a comment on each, a draft kept on agora), a file request (uploaded into Athena assets), a form (from the resume model's JSON Schema), toolkits to turn on or off (with the tool cap's headroom), a saved login to use, a project schedule, a wait, and a tool-raised approval; any other custom park gets its schema's form. A timed park counts down and stops its timer the first time the person touches the card. Approving a typed approval (toolkits, a saved login, a schedule, a tool-raised approval) goes through confirmDecision like any approval, and agora holds it to a signed-in person: when it refuses an answer, the card says why (for an app signed in with a key, where to answer instead). Answering a question never asks. isHandledElsewhere, readOnly and onResumeRejected apply to these cards too, and a host whose own cards answer typed parks (Olympus) passes no typedInterrupts and never imports that entry, so it bundles neither the SDK's cards nor its selector. The cards load on the first typed park. For an approval UI of your own, the same entry has StatewireTypedInterruptCard, which mounts them alone, useStatewireTypedInterrupt, the engine behind them, TypedInterruptCard, which renders one from an engine slice of your own, and the payload contract's selector and parser (isTypedInterruptRequest, parseTypedInterruptPayload); each kind's reader and resume are @athenaintel/agent-runtime/typed-interrupt-kinds'.
  • Frontend tools: tools in frontendTools with a local execute are declared to the backend as client_tools and executed by the mounted client-tool bridge, which resumes the run with each tool's result. One that changes something can ask the person first, and every one can be stopped (see Frontend tools that ask first, and stop).
  • Mid-run sends and the queue: a message sent while a run is active queues on the server. While a run is live the composer shows Stop and Queue side by side, as Athena on the web does (ComposerSendOrStop): Stop (tooltip "Cancel") stops the run, and Queue ("Queue message") sends the draft behind it and is off until something is typed. Enter and ⌘Enter (Ctrl+Enter off a Mac) send or queue the draft too; ⌘Enter does from inside a list, a code block, a table or a quote, where Enter continues the block. The queue panel above the composer (StatewireQueuedMessages) lists queued entries with remove, "Send now" (steer), Prioritize (run/prioritize), inline edit, and failed sends with Retry/Discard, plus Continue for a stopped run's queue head; hosts can opt into autoContinue for stranded queues and slot their own row renderer and editor.
  • Lean entries for hosts with their own composer: @athenaintel/react/chat-ui/statewire exports just the approval card, the queue tray, and the continue/run-ended affordances (plus the runtime-message card and Continue pill they render), and @athenaintel/react/tools exports the generic ToolFallback card with its primitives (ToolCard, ExpandableSection, NestedPtcMessages) — so a host that already ships its own composer and mention stack (Olympus) never pulls the SDK's Tiptap graph into its build. Tool names, icons, categories, and running copy come from the shared registry in @athenaintel/agent-runtime (getToolDisplayMeta), and success/failure from its classifyToolResult; the fallback takes host seams (displayName, icon, extraAction, notice, renderResult, onOpenAsset, hideInternalIdArgs) instead of being copied. @athenaintel/react/super-grouping exports the collapsed view (previously called the conversational view) of an assistant turn — SuperGroupingTranscript (what AthenaChat renders), SuperGroupingCard, SuperGroupingFinalText, CollapsibleGroup, the activity-timeline derivation, and the tool-based grouping function — with slots for the host's text/tool renderers and controls (renderHeaderActions, renderRunningMeta, summaryDetails, waitingTools, waitingToolCallIds, expansionKey), so Olympus and the Chrome extension mount one card instead of copies. A host can take a call out of the card's details: isInlineTool(toolName, part) keeps its tool UI on screen below the header (the call itself comes second, so the choice can depend on what it did), and isStepRowTool(toolName) draws it as its own step's row in the step list, kept mounted while the turn is live or mountDetails is set. The tool UI reads where it renders with useToolPartPlacement() ('step', 'inline', or null), so a call rendered in both places draws the part that belongs in each.
  • In-repo hosts consume the package, not the source. @athenaintel/react is a workspace dependency of Olympus, the Chrome extension, and the Office add-in, resolved through this package's exports to the built dist/ (the guarded prepare script builds it on a cold bun install; scripts/prepare-react-sdk.ts rebuilds a missing or stale dist in front of each host's typecheck, test, and build scripts, and scripts/typecheck-all.ts runs it once before the repo typecheck). While editing the SDK against a running host (next dev, the extension's bun run dev, the add-in's vite), run bun run dev here so the dist follows your edits. Because the dist inlines the private @athenaintel/agent-runtime, a host that also imports agent-runtime directly runs two copies of it; any agent-runtime state shared between the SDK's components and the host has to live on globalThis (see registerChatAssetMentionHandler).
  • Errors and connection state: transport errors (send rejections, paywall refusals) render as a dismissible banner; a degraded connection shows a reconnect strip; a send into a thread created by the retired legacy runtime is refused with a dismissible read-only notice (start a new chat). A send the server admits but refuses to START — a session keeps the collab-agent channel (the app's mode) it began on, so a send in the other mode is refused with collab_agent_channel_session_mismatch — leaves the message queued and the run in error; StatewireRunRefusalNotice (mounted by AthenaChat above the queue) shows the server's detail.message and, for that code, a "Start a new session" action (the thread list's newThread). The same code on a rejected command reaches StatewireErrorBanner with the same action (AthenaStatewireErrorNotice.code). readRunStartRefusal and COLLAB_AGENT_CHANNEL_SESSION_MISMATCH are exported for hosts with their own thread UI. Custom hosts can read all of it via useAthenaStatewireLifecycle.
  • Session persistence: useAthenaSessionPersistence() exposes Core's paired { threadId, sessionPersisted } verdict from the same runtime snapshot as the client. No verdict (or no provider) returns null; the flag itself is true, false, or null when the state does not declare existence. Its lifetime follows Core's thread, sync host and signed-in principal; credential rotation preserves the verdict. A remembered snapshot may report true before fresh server state arrives. This is an existence hint for the session asset, not authorization, workspace identity, or command durability. Actions must still pass their server permission checks.
  • Thread list: enableThreadList provides the persisted Agora session list; switching threads (or starting a new chat) re-attaches the statewire session to the selected thread while the host's own children stay mounted — sidebars keep their scroll position and search text, custom hooks keep their state, and only the per-thread pieces reset: the runtime and its client, AthenaChat's surface (composer draft, viewport scroll, approval cards, banners), and the thread-id contexts. A host composing its own chat from the statewire pieces keys any per-thread UI on useAthenaStatewireThreadId() (the attached thread's id, defined for a never-started chat too) the way AthenaChat does. ThreadList, SessionList, useAthenaThreadManager, useAthenaSessionAttention, and useRefreshThreadList read that state (and render nothing / return null without it). See Session list, attention and wake markers. The list holds the sessions of the provider's appId (and threadListAdditionalAppIds); with threadListAgentHome and a collab agent, also the conversations with that agent on its other channels (see What's new in 0.50.0).

The agent prop only accepts collab_agent:<asset_id> refs (see below), because the statewire host always runs the Athena deep agent. Any other non-blank value throws at first render — it is a misconfiguration, and a silently ignored selector would let a deployment answer as the wrong agent. model defaults to the deep-agent default model (DEFAULT_STATEWIRE_MODEL) unless a collab agent supplies one.

Session list, attention and wake markers

A Devin-style session list on top of enableThreadList: every row says what the session asks of the viewer, what to do next, and which pull requests it opened; the active thread gets a persistent "waiting on you" strip; and a GitHub wake renders as a runtime marker instead of a user bubble.

import { AthenaChat, AthenaProvider, SessionList } from '@athenaintel/react';

<AthenaProvider enableThreadList config={{ token }}>
  <aside><SessionList /></aside>
  <AthenaChat />
</AthenaProvider>

Field contract (v1)

Rows of POST /api/conversations/threads/list carry, all optional (an older server omits them and the SDK reads undefined):

| REST field | SDK field (ConversationSummary / AthenaStatewireThreadSummary) | Values | |---|---|---| | session_status / run_status | sessionStatus / runStatus | status_v2 planes | | attention | attention | needs_you · working · ready · watching · done · error | | next_action | nextAction | one line, ≤ 80 chars | | attention_source | attentionSource | interrupt · run · pull_request · termination · wake · handoff | | is_favorited | isFavorited | boolean — toggled through setFavorited / POST /api/conversations/threads/favorite | | last_wake | lastWake | { source, reason, at } | | created_by_me | createdByMe | boolean — the viewer started the session (false: shared with them) | | pull_requests (opt-in: include_pull_requests) | pullRequests | [{ repoFullName, number, url, title, state OPEN/CLOSED/MERGED, isDraft, reviewDecision, checksState SUCCESS/FAILURE/PENDING/NONE, updatedAt }] — [] none, null unreadable right now |

The per-user conversation index pushes attention, next_action, attention_source and is_favorited (never pull-request state), and the thread list folds every push into its rows through the same summaryFromConversationIndexEntry that renames them — a session flips to "needs you" live. deriveConversationAttention (exported) is the one attention rule: the server value when reported, else needs_you for a human gate, working for a live run, error for a failed one.

An app with no live index (one that gives AthenaProvider an API key and has no signed-in user) is pushed nothing, so its lists read instead: the session list, its pinned sessions and every useAthenaSessions list under the provider (SessionsPage, Inbox) read their first page again every minute while the page is visible, and not at all while it is hidden. A session that settles in the background, or starts waiting on the person, shows within that minute. Each list is one POST /api/conversations/threads/list a minute per visible page; a list on the live index sets no timer.

The timer starts only against an Athena that says it can afford it. A list that shows pull-request chips makes Athena read their state from GitHub, and an Athena from before this timer asked GitHub once for every list read whose pull requests had expired, which a read a minute would make every read. An Athena that reads a repository's pull requests together says so on each list answer (bounded_pull_request_refill: true), and the lists start their timer once an answer has said it. So:

  • This SDK against an older Athena (a private deployment whose server is behind its apps): no answer carries the field, no timer starts, and the lists read exactly as they did before (after a send, when the open run ends, when the window comes back into view).
  • An older SDK against a newer Athena: the older SDK ignores the field and has no timer. Nothing changes for the app; Athena asks GitHub less.

SessionList

Same visual language as ThreadList (Tailwind via cn, lucide icons), plus:

  • a status indicator per row — needs_you an orange dot, working a spinner, unread (and not needs-you) a blue dot, watching a clock, otherwise none;
  • a second line — nextAction coloured by attention (needs-you orange, ready green, error red), else the muted relative time of the last update;
  • one pull-request chip: a single pull request is #123 with its state's icon and colour (open / draft / merged / closed) and a link to it, marked · queued while it is in its base branch's merge queue; several show how many are open, merged and closed, each under its state's icon, and how many are queued, and open a list of all of them (in flight first, then the most recently updated), each a link to GitHub with its number, state, place in the merge queue and checks (a repository shared by all of them is named once in the list's header). Its label and tooltip say it in words ("3 PRs (2 open, 1 merged, 1 in merge queue)"). It is a sibling of the row button, so a click on it never selects the row;
  • an origin badge from appId / startChannel / triggerType (Chrome, Word, Computer, GitHub, API, …);
  • a trailing action cluster per row, revealed on hover / focus (a pinned pin and any action whose write is in flight stay visible) — every action a labelled <button> that is a sibling of the row control, never nested:
    • Open in new tab (prop onOpenInNewTab, absent by default): hands the host { threadId, title } instead of selecting the row, as does a ⌘-click (Ctrl-click) or middle-click on the row (see "Several chats side by side");
    • Rename (prop showRename, default true): the title becomes an input in place; Enter commits, Escape cancels, blur commits; an unchanged or empty title is never sent; the row shows the new title at once and rolls back on failure (POST /api/conversations/threads/rename, { thread_id, title } → the stored, trimmed title; 1–200 characters). A viewer who can pin a shared session cannot retitle it (the route runs the same EDIT gate as updateAsset(title)); the row rolls back on the 403. On an agora that predates the route (404 / 405) the action is withdrawn (renameAvailable) after one console warning.
    • Pin / Unpin (prop showPinToggle, default true): a <button aria-pressed>, filled while the session is pinned.
    • Archive (prop showArchive, default true): the row leaves the list at once and stays hidden until both list sources stop reporting it; a failure brings it back (POST /api/conversations/threads/archive). Archiving the active session moves the chat to a new one once the server has confirmed. Withdrawn on a backend without the route (archiveAvailable).
  • groups Needs you → Working → Pinned → Recent (prop grouped, default true; a session appears once, in the first group that applies), labelled in 11 px uppercase muted text; the active row has a bg-muted background and a 2 px accent bar; titles are text-sm font-medium, the next-action line text-xs in its attention tone and never bolder than the title; the pull-request chip sits on the meta line; every row control and action has a focus-visible ring;
  • hover prefetch (prop prefetchOnHover, default true): after the pointer has rested on a row for 120 ms (or when the row control takes focus) the list warms the provider's thread snapshot cache with that thread's REST state — once per thread per identity, at most two fetches in flight, failures ignored — so selecting it paints the transcript on the first frame instead of the loading scrim while the statewire attach lands (useAthenaStatewireThreadList().prefetchThread(threadId) for hosts drawing their own rows);
  • live rows, newest first: a session the signed-in user's conversation index pushes (started in this tab, another tab, Slack…) shows the moment it is pushed, before the list is read again; a session that becomes active moves to the top; and a message sent from this chat moves its session to the top as working the moment it is sent — a chat the server does not know yet as a pending row titled with the message (isPending: true on its useAthenaStatewireThreadList().threads entry, with no pin, rename or archive), which the server's own row replaces within moments;
  • skeleton rows (indicator, title line, meta line) while the first page loads — including while no credential has resolved — and for a refresh that has no rows to keep; "No sessions yet." only after a settled empty answer (hasResolvedFirstPage); a background refresh keeps the rows it has;
  • a search box wired to the server-side search (prop showSearch, default true), Load more over the shared pager, and New Chat / refresh as in ThreadList (prop showNewChat, default true; false for a host with its own new-session control);
  • an origin badge per row (prop originBadges: 'all' by default, 'external' to leave sessions started in the web app unbadged, 'none').

The pin writes POST /api/conversations/threads/favorite ({ thread_id, is_favorited } → the server's state after the write) with the same credential as the other thread endpoints — setThreadFavorite is exported for hosts calling it themselves. The toggle is optimistic: the row flips (and moves between Pinned and Recent) on the click, the server's answer is written back, and a failure restores the previous state. The optimistic value is held as an override over both list sources — the fetched page and the pushed conversation index — until they report the toggled value, so a push that predates the write cannot flip the row back. Writes for one session are serialized: the row's pin is disabled while its write is in flight (favoritePendingThreadIds), and a setFavorited call made meanwhile records the value and sends at most one follow-up write once the first has answered, so the server never ends on an earlier click. Overrides and in-flight writes are scoped to the (backendUrl, principal) pair — a credential swap reads an empty map and drops the previous identity's answers. On an agora that predates the route the first toggle gets a 404 / 405 (isThreadFavoriteUnavailableError): the row is restored, one console warning is logged, favoriteToggleAvailable on the thread-list state turns false, and the row shows a pinned session's pin read-only, as before. The conversation-history hooks (useStatewireConversationHistory, useRestConversationHistory) expose the same toggle as setConversationFavorited / favoritePending / favoriteToggleAvailable beside setConversationReadState.

The provider asks for pull-request state by default in thread-list mode (threadListIncludePullRequests, default true; turn it off in a host that never shows the chips to spare the server the lookup). The pure rules behind the rows — groupSessions, sessionIndicator, sessionSecondaryLine, pullRequestChip, orderedPullRequests, pullRequestInMergeQueue, pullRequestMergeQueueText, pullRequestChipCountsText, sessionOriginLabel — are exported for hosts drawing their own rows, also alone as @athenaintel/react/session-list-model, which loads nothing else of the SDK; useAthenaStatewireThreadList().setFavorited({ threadId, isFavorited }) is the toggle behind them. pullRequestChip gives the chip's openCount (drafts included), mergedCount, closedCount and queuedCount beside its label, and inMergeQueue for the pull request it stands for.

A host drawing its own session rows draws the same chip with <SessionPullRequestChip pullRequests={thread.pullRequests} className? /> (from @athenaintel/react; it draws nothing without pull requests). Place it beside the row's own button or link, never inside it; className is for its placement in the host's row (relative to lift it above a stretched link). A pull request's merge-queue entry (ConversationPullRequest.mergeQueue, { state, position }) comes from an Athena that reports it; against an older one it is undefined and reads as not queued.

useAthenaSessionAttention(threadId?)

{ threadId, attention, nextAction, attentionSource, pullRequests, isUnread } for the active (or given) thread, from the thread-list state; null outside thread-list mode or for a thread the list does not hold. Updates live with the index pushes.

useAthenaKeepWorking({ threadId, enabled? })

A conversation's "Keep working as me" leave: its own person gives the conversation standing leave, and while it holds, what the conversation's own work brings back runs with their GitHub and, where the conversation's agent keeps a cloud computer for it, on that computer: a check on one of its pull requests or a comment there by one of the repository's own people, and a message sent from their device while an agent may be using it, which also keeps the conversation's folder. That computer can act as its person in Athena, as it does in their own turns; outside it the run is handed nothing else of theirs, and a send still asks first. A leave gives what its person was told when they turned it on: keepWorkingMeaning({ terms }) is the sentence of the terms a standing leave was given under (keepWorking.terms). The hook returns { keepWorking, isOwn, refetch, give, isGiving, giveFailure, giveRefusal, end, isEnding, endFailure }: keepWorking is { on, givenAt, endsAt, endedAt, endedReason } (null until agora answers, and for an agora without the route), isOwn whether agora sent the reader its times (it sends them to the conversation's own person alone), give() turns it on under the terms KEEP_WORKING_MEANING states (show the person that sentence first), end() turns it off, and giveFailure / endFailure say in words why a turning on or off did not happen. The presses' states are the conversation's, not the mount's: every mount of the hook for one conversation says the same, so a turning off refused from a menu that has since closed is still said where the leave shows.

agora takes a giving from a signed-in person and from their own Athena Desktop sign-in (the owner's decision of 2026-11-27), never another device key, an API key or a runtime. Under a DeviceOperationProvider the giving carries the device an agent operates, read as it is sent, and agora refuses it. A giving refused as KeepWorkingRefusal.NeedsYou (giveRefusal) sends the person to Athena on the web (KEEP_WORKING_ON_THE_WEB is the hint for that). Because it may be given elsewhere, the hook reads again whenever the page becomes visible again, and every minute while it is on. Call refetch() as the conversation's run settles (a Stop ends it, and each turn moves its end) and, in an app whose window takes the focus without its page having been hidden (a desktop app), as the person comes back to it. A read on its way while the leave ends is dropped, so it cannot say "on" after.

The route, the refusals and the words (KEEP_WORKING_LABEL, KEEP_WORKING_MEANING, keepWorkingRefusalOf, keepWorkingRefusalWords, keepWorkingEndsText, …) are exported for a host drawing its own control, also alone as @athenaintel/react/keep-working, which loads nothing else of the SDK.

WaitingOnYouBanner

Mounted by AthenaChat above the thread viewport: a persistent strip while the active thread's attention is needs_you or the approval hook (useStatewireApprovalRequest) reports a pending request. Its text is the server's nextAction, else a summary of the pending request (the approval card's title when it has one); a click scrolls to the approval card (or to the composer when there is none). It never duplicates the card's Approve / Reject buttons. WaitingOnYouBannerView is the pure presenter for hosts that resolve the inputs themselves.

DrivingOnChip

"Driving on your phone": the person's newest message in this conversation came from another of their Athena apps (the host's state.driver). A hint, never a lock — sending here makes this app the driver and the chip goes away. It shows nothing while this app drives, once the other app has been quiet for 15 minutes, during a live call (the call strip says where it is) and outside a statewire thread. AthenaChat mounts it above the composer when you pass surface ("spaces", "mobile", "chrome", "desktop" or "office", the Athena app the chat runs in); a custom layout mounts <DrivingOnChip here=… /> itself. useDrivingOn(here) in @athenaintel/agent-runtime/thread-driver is the same read without the chip.

Wake markers

A user turn injected by a GitHub webhook wake carries a provenance envelope under metadata.custom.github_event_source. AthenaChat's user message (and the chat-ui UserMessage) render such a turn as a compact runtime marker — "Woke: review comment on #36337", linked, with the sender and the comment excerpt — in the same style as the runtime-ending card, instead of a bubble quoting the whole wake text. readGithubWakeEvent, isGithubWakeMessage, githubWakeMarkerText, WakeMarkerCard and WakeMarkerMessage are exported (also on @athenaintel/react/chat-ui and /chat-ui/statewire).

The envelope is message metadata, so the reader trusts only the shape the wake handler stamps: the repository must be owner/name, and the link is kept only when it is an https://github.com/<repo>/… URL for that repository (githubWakeEventUrl) — anything else renders the reference as plain text. The full message text always reaches the model; the marker is provenance for rendering only.

Messages from Slack, email, texts and Teams

A message that reached an agent over a channel arrives with two things from agora's channel routers: the inbound_channel envelope in metadata.custom (the channel, the sender's name and address or number, an email's subject), and a routing block at the start of its text (<inbound-message-context> … </inbound-message-context>: the Slack ids, the numbers a text went between, how a reply is delivered), which is how the model knows where the message came from.

AthenaChat's user message and the chat-ui UserMessage show the words that were sent, without the block, under one line: the channel's mark (Slack's and Teams' logos; a mail, text, API or voice-memo glyph), the sender's name and their address or number. Hovering the line shows the channel, the place (a DM, #launch, a group text) and the sender in full; clicking it opens what the agent received, every fact of the block labelled, with the Slack thread a mention came in. An email's subject is the bubble's first line, and Copy on the bubble copies the words that were sent. A typed message is unchanged.

Only a message carrying the envelope is drawn this way. Tags someone types at the start of an ordinary chat message show as typed.

A host with its own user message composes the same pieces: InboundChannelLine (the line, for the message in scope), InboundChannelSubject, and withInboundMessageBody(Text) (or UserMessageText, which already shows the words without the block). isInboundChannelMessage(custom) and inboundMessageBody({ custom, text }) read a message without React.

Sessions page and inbox

A full-page, Devin-style session list and a notifications inbox, both on top of enableThreadList and live through the same conversation index as SessionList:

import { AthenaProvider, InboxButton, SessionsPage } from '@athenaintel/react';

<AthenaProvider enableThreadList config={{ token }}>
  <header><InboxButton onOpenSession={() => showChat()} /></header>
  <SessionsPage
    onOpenSession={() => showChat()}
    labels={{ agents: { asset_123: 'Athena Engineer' }, channels: { ask: 'Ask' } }}
  />
</AthenaProvider>

SessionsPage

  • Filters the server applies. A Filter menu (status, pull requests, unread, pinned, creator, who started it, agent, mode, origin, created / updated date) and a title search. Each filter travels to POST /api/conversations/threads/list as a predicate of the server's one page statement, ANDed onto the list's unchanged permission gate — a filter only narrows what the viewer already sees, and Load more continues the filtered set. Active filters show as removable chips; Save as default remembers them in this browser (storageKey namespaces it), Reset to default goes back.
  • Display options. Sort by last update or creation, newest or oldest first; group by what each session needs (Needs you, Working, Ready, Waiting, Error, Done), by run status, or not at all; show or hide the Status, Origin, Mode, Pull requests, Creator, Created and Updated columns (remembered per browser). defaultHiddenColumns (typed SessionsColumnId[]) chooses which columns start hidden; every other column shows. The default is DEFAULT_HIDDEN_SESSIONS_COLUMNS (Mode, Creator, Created). An app whose sessions have no pull requests passes defaultHiddenColumns={[...DEFAULT_HIDDEN_SESSIONS_COLUMNS, 'pullRequests']}. The person can still show any column. Once they change the display, their choice is remembered and replaces the host's default.
  • A status column that says what to do. sessionStatusChip: the server's next action where the person must act ("Approve send email", "Merge #12"), else Working / Sleeping (a follow-up is pending) / Waiting / Error / PR merged / Done — an orange, blue, green, violet, red or grey dot by attention.
  • Row actions (revealed on hover / focus): mark read / unread (setReadState → POST /api/conversations/threads/read-state), pin, archive — the provider's writes, so the row flips in every list at once.
  • Export CSV of the loaded rows (sessionsCsv; cells a spreadsheet would run as a formula are prefixed with ').

Inbox / InboxButton

The inbox is the viewer's own sessions, newest activity first, minus the ones dismissed from it — read through the same route with created_by_me + exclude_dismissed (INBOX_QUERY; the Unread tab adds unread_only). No endpoint of its own. Each row: an unread dot, the title, the latest message (two lines), a state chip (inboxStateChip: Needs you, Working, PR ready, Sleeping, Waiting, Error, PR merged, PR closed, Answered) and the time. Opening a row selects the session and marks it read; Mark all read marks the loaded unread rows; Dismiss uses POST /api/conversations/threads/notifications/dismiss (EDIT on the session — a dismissed session comes back with its next message). InboxButton is a bell with the unread count (useAthenaInboxUnreadCount, the Unread tab's first page: 50+ past one page) that opens the inbox in a popover. Each tab shows its count once its list has answered, and nothing before.

What counts as read

AthenaChat marks the session it shows read for the viewer, as Athena's own chat does, wherever the session was opened from (SessionList, the inbox, a ?session_id= link): once the chat is in front of the person (its window, a pop-out's included, visible and focused, and the chat itself on screen, not hidden behind a maximized workbench), the session's history is on screen, no run is going and its row is unread, for a second. The write is the provider's setReadState with the row's updatedAt, so every list under the provider flips at once and the next message shows the session unread again. A message that arrives while the person watches is marked too (a running session is marked when its run ends, never per streamed chunk); a read session is never written; and a session the person marks unread from a list stays unread until something new arrives or they open it again. A host that draws its own transcript instead of AthenaChat calls setReadState itself.

Server filters and older servers

useAthenaSessions({ query }) is the data layer both components use, for hosts drawing their own rows. query is an AthenaSessionsQuery:

| Field | Server field | Meaning | |---|---|---| | search | search | case-insensitive title match | | runStatuses / sessionStatuses | run_statuses / session_statuses | status_v2 planes (running leaves out runs silent for 12 hours, as every list does) | | unreadOnly | unread_only | not read since it last changed (the read receipt) | | favoritesOnly | favorites_only | pinned by the viewer | | hasPullRequests | has_pull_requests | opened a pull request (true) or none (false) | | createdByMe | created_by_me | the viewer's own (true) or shared with them (false) | | collabAgentIds / collabChannelIds | collab_agent_ids / collab_channel_ids | the collab agent and its channel (mode); 'default' (DEFAULT_COLLAB_CHANNEL) is the agent's default channel; channels need an agent | | startChannels | start_channels | where it started (web, github, email, …) | | createdAfter / createdBefore / updatedAfter / updatedBefore | same, snake_case | ISO bounds, after inclusive, before exclusive | | excludeDismissed / excludeTriggered | exclude_dismissed / exclude_triggered | not dismissed from the inbox / started by a person | | sort / direction | sort / direction | updated or created, desc or asc |

An agora ignores request fields it does not know, so every list response now names the filters it applies (supported_filters). The hook reads that once per identity (a one-row probe) and splits the query (planSessionsQuery): fields the server applies are sent; fields it cannot are applied to the loaded rows instead (degradedFields — exact per page, but a page can come back short, and SessionsPage says so); fields the rows carry nothing to test on (creator, dismissed; pull requests when the list does not fetch them) are reported in unsupportedFields / unavailableFields and not applied, so SessionsPage disables them rather than show wrong rows. Server-applied filters are still checked on rows a live push changed, so a session you just read leaves "Unread" and a finished one leaves "Running". listThreads takes the server filters as filters (ThreadListFilterBody), and app_ids (additionalListAppIds) now reaches the server: the request body used to drop it. With threadListAgentHome, home_agent_id rides beside it, and the answer's home_agent_applied says whether the list holds the agent's conversations (absent on an older server: it does not).

firstPageUpdatedAt says when the query's first page was last written (ms since the epoch; 0 before it has any). With offlineHistory the first page can be the copy the device kept, painted at once while agora is asked again: that copy carries its old stamp until agora answers, and a refresh that fails leaves the stamp as it was. A host that must act only on what agora said since it started (Athena Desktop's needs-you notifications) compares it with its own start time. useConversationList in @athenaintel/agent-runtime reports the same stamp.

Session workbench

A Devin-style workspace pane beside the chat for the active session: a tab strip of panes, a "+" menu right after the tabs to open more (with a search box; Enter opens the first match), closable tabs, a collapse to a rail, a maximize that gives the workspace the chat's width (the chat stays mounted, hidden), and a resizable edge. With every tab closed, the column lists each pane with its description, centred, to open one.

import { AthenaChat, AthenaLayout, AthenaProvider, SessionList, SessionWorkbench } from '@athenaintel/react';

<AthenaProvider enableThreadList config={{ token }}>
  <aside><SessionList /></aside>
  <AthenaLayout workbench={<SessionWorkbench />}>
    <AthenaChat />
  </AthenaLayout>
</AthenaProvider>

AthenaLayout's workbench prop puts it in a right-hand column (defaultWorkbenchPercent, default 40; defaultWorkbenchCollapsed). With a workbench the layout opens no asset column of its own: assets the agent or the person opens show as the workbench's Open assets tab (closing the tab closes the asset panel). Maximize is offered only inside AthenaLayout, which owns the column's width; collapsing a maximized workspace brings the chat back beside the rail. Each session keeps its own open or collapsed workspace while the layout stays mounted, so defaultWorkbenchCollapsed is how a session the person has not opened it in starts. SessionWorkbench also works on its own anywhere under <AthenaProvider>; it then keeps its collapsed state itself, per session too. A host that gives it a place of its own to open and close (a tab, a window) passes collapsible={false}: the collapse control is left out and the workbench is never a rail.

Built-in panes and what each reads:

| Pane | id | Source | |---|---|---| | Tasks | tasks | The thread state's todos channel (the deepagents plan), else the newest write_todos call in the loaded transcript — "N/M done" and numbered steps with their status | | Shell | shell | Every execute call in the loaded transcript, newest first: first line of the command, the machine it ran on (sandbox_asset_id named through the workspace's computers, else the session computer the session is bound to, else "Session sandbox"; in a chat with a pinnedComputer, below, a command that named none reads "Machine not recorded (chat works on …)"), the exit status parsed from [Command succeeded/failed with exit code N], the time; searchable; a row expands to its output (first 4,000 characters). While the thread holds history the chat has not loaded (the chat's history edge reports it, useStatewireHistory), the count reads "so far" and Load earlier commands loads the next page, the same one scrolling up loads | | Computer | computer | GET /api/conversations/threads/{id}/workspace: the session computer, else the pinnedComputer a host passes (below), else the most recent computer — its screen, live (ComputerLiveDesktop, below), its