Skip to content
Logo

How AI requests run

Eve is the service that runs OncoBrain's AI drafting tasks. Before starting a task, the app checks access and records its exact inputs. Each diagnosis, workup, or treatment request has its own run and returns a draft for clinician review. Different workflows can run concurrently; a case can have only one running request for the same workflow.

The primary Cell stores the clinical record, captured inputs, run status, and execution attempts. Celld's native Workflow controls retry waits and replay. Eve receives permitted files or an extraction packet; its temporary files can be discarded. Recovery uses the saved run and attempt records, and stale results cannot replace the current result.

A clinician requests a draft. The app captures the input list in the primary Cell. Celld dispatches an admitted effect to the app, which publishes the workspace and starts Eve. Exact-read evidence is registered through the app. The app anchors the terminal artifact, Celld settles the fenced result, and the clinician reviews the draft.

A standard draft from request through review. Safe progress can stream before settlement. Chart confirmation and treatment decisions remain clinician actions. Explore the sequence.

The standard flow

  1. The app checks the actor, organization, case, and workflow admission, then saves the run and its exact inputs.
  2. Celld dispatches the admitted effect to the app's protected broker. The broker verifies the claim and starts or resumes Eve.
  3. Eve loads the installed skill and the tools permitted for this run. It reads only the verified workspace files named by the run.
  4. An exact read can register evidence through the app. The app filters progress and draft text for the browser.
  5. The app saves the terminal Markdown and immutable artifact. The clinician can review, edit, or make a working selection.

Missing optional inputs or an earlier draft should still allow a useful partial result. Unknowns remain explicit.

Waiting, retrying, and stopping

The saved run has four statuses: running, succeeded, failed, and cancelled. Waiting for Eve or retrying an execution attempt leaves the run running. Each attempt has a fence: a token that prevents an older attempt from publishing a result.

A running workflow can succeed, fail, or be cancelled. Waiting and retrying happen within execution attempts while the run stays running; they are not additional run statuses.

A run captures its inputs once. Its execution can be observed again or retried until a current result settles it. Explore the lifecycle.

EventWhat happens
Eve is still working, or the broker's observation deadline expiresThe next observation keeps the same claim and fence. The run stays running.
A retryable broker failure requires another attemptThe old attempt becomes abandoned; a new claim and fence prevent it from settling later.
The current execution completesSettlement checks the latest running run and, when attached, its Eve session and runtime generation (epoch). Success also requires recorded model provenance and a verified terminal artifact.
The request is cancelled or authority is revokedCancellation closes the run and invalidates its active claimant. Interactive cancellation preserves a success that already won the race.

A late or superseded result is ignored. A disconnected browser or an executor deadline alone does not turn a run into failed.

Extraction is packet-only

Clinical extraction receives an application-built packet in its message. It does not get a workspace and has zero model-visible tools. It cannot browse, read files, delegate, or access the database. It returns structured candidates with source references, coverage, unresolved items, and warnings.

A clinician decides what enters the chart. Accepting or editing a proposal stages the review. Add and confirm writes those facts and confirms the resulting chart state in one transaction, after checking current revisions. A direct chart save confirms only the edited fact alongside previously confirmed facts; Confirm changes handles other unconfirmed revisions. The model cannot accept a fact or confirm a state. See how sources become reviewed context.

Add a workflow

A normal Eve workflow is one folder:

apps/eve/agent/skills/<slug>/SKILL.md

Eve discovers those skills and exposes the live catalog from authenticated /info. Do not add another app-side workflow registry. Put drafting behavior, instructions, tools, and model selection in Eve. Keep authorization, input capture, evidence checks, persistence, and clinician actions in the application.

Reads and evidence

OperationUseWhat it does not prove
grepLocate likely text in the permitted workspaceEvidence
read_fileRead an exact path and page or line rangePermission to read other files
search_internal_evidenceFind a bounded product-label passageEvidence
read_internal_evidenceRead the exact passage and register its provenancePatient truth or treatment preference

Search results are discovery only. The app records evidence only after an exact read and preserves the passage, digest, locator, and source version. Product-label evidence is an ETL-owned supplement. It contains no patient context and does not replace patient sources, guidelines, or clinician judgment. Its full source can be reopened only while ETL retains the pinned LanceDB version.

What each flow produces

FlowStarts fromSaved resultClinician boundary
Clinical extractionPrepare findingsCandidates, support, coverage, warnings, review stateReview proposals, then commit facts and confirmed state
Diagnosis and workupRelevant case stageCited Markdown and artifactDraft only
TreatmentTreatment planProse, then Comparison and Flowchart viewsReview, option selection, and later overrides
Referral readinessAssess referralCited completeness artifactRecord one disposition for that artifact
Trial matchingTrial matchingCited draft and trial-pinned review projectionReview criteria and record one pursuit decision or none
SummaryArtifactsAudience-specific cited MarkdownEligible artifacts may be marked reviewed
CopilotWorklist, Library, or caseThread message linked to its exact runCannot change facts, plans, orders, or approvals

Test the behavior

Eve evaluations use synthetic fixtures. List and run the public biomarker cross-skill suite with:

bun run eval:list
bun run eval -- --tag biomarker-cross-skill
bun run eval:strict -- --tag biomarker-cross-skill

These evaluations exercise skill behavior. Application integration tests cover admission, workspace construction, evidence registration, persistence, and streaming. Private clinician calibration sources stay outside Git.

External agents use the app's OAuth MCP endpoint at /api/mcp, never Eve. Read scope gives bounded workflow and confirmed-case context. Run scope enables retry-safe start_workflow, wait_for_workflow, and cancel_workflow calls with an operationId. A care coordinator can operate only Referral readiness, and a global admin role does not widen clinical workflow access.

For concrete clinician questions and tool calls, see AI walkthroughs. From evidence to output follows the source versions, citation records, and saved treatment views.