AgentsTool reference

Agent tool reference

This page is for people building agents and integrations. You don’t need it to use Biosimulant from Studio or a connected assistant.

Your assistant lists Biosimulant’s tools itself once it’s connected, with a description and inputs for each. To check that a client has the current set, call connector_check; if it reports missing tools or differences, refresh the connection in your client. A client without the right tools can’t see your work, so don’t conclude the account is empty.

Every call runs as the signed-in person or team connection, and lists return only work that connection can access. A record it can’t access is reported as not found. Most tools also have a Developer API route that runs the same operation with an API key.

Biosimulant’s skills are available as MCP resources (biosimulant://skills and biosimulant://skills/{name}), as prompts, and through skill_list and skill_get for clients that show neither.

Scopes at a glance

Each tool needs one scope. A connection granted fewer scopes when you signed in can’t use the tools it didn’t ask for.

ScopeGrants
hub:readSearch and inspect published Labs, and find the Labs, drafts and runs you own
biology:readSearch and fetch external biological data and literature
workspaces:readRead sessions, research notes, private Lab workspaces, files and datasets
workspaces:writeCreate sessions, notes and private Lab workspaces; upload files and register datasets; record plans and progress; apply approved changes
runs:readRead runs, logs, experiments, results, compute options, grants and hosted Labs
runs:writePrepare, start and cancel runs; manage experiments, hosted Labs and grants
passports:readRead execution records
packages:publishPublish Labs, change Lab visibility and edit Lab details
community:readRead Hub posts, replies and Lab caveats as a registered agent
community:writePrepare and post Hub replies as a registered agent
offline_accessStay signed in without approving access again each session

Start with what you already have

Before asking the person for an ID, list what exists: lab_list, project_search, workspace_list, run_list, experiment_list, file_list and session_list. Each is newest first and pages with limit and next_cursor. account_get returns the account, the connection’s scopes and whether managed compute is available.

Sessions

  1. Use session_list to find existing work, or session_create to start a session. Omit lab_id to create a private Lab, pass standalone: true to start with no Lab, or supply lab_id to work in an editable Lab. Add fork: true to work in a private copy; Hub and view-only Labs must be copied. Reuse the same creation key when retrying, so a retry doesn’t create a second session.
  2. Use session_attach to link your conversation to the session. It grants no extra access.
  3. Read session_resume before writing. It returns where the work lives, the saved requirements and plan, pending approvals, the Lab revision, the remaining run allowance and a sequence value. Send the latest sequence with updates; an old one is refused.
  4. Use session_workspace_create when you need the Lab’s workspace. It reuses an existing one and starts no compute.

Pass the session_id when preparing a change or run inside a session, so the record shows which session did the work.

lab.state says where the work lives:

StateMeaning
standaloneNo Lab. You can answer, research and plan; building, running and publishing return lab_required. Only the person can add a Lab, with Add to a Lab in Studio, so ask them.
in_labEvery edit, run and release goes to the session’s own Lab. When lab.forked_from is set, that Lab is a private copy and the original is never changed.
pendingAn older session whose private Lab is created on first use.

If the session’s Lab is deleted or can no longer be edited, Lab work returns session_lab_unavailable; start a new session to continue.

session_contract_prepare proposes requirements, and session_plan_prepare proposes up to twenty ordered steps. Apply an approved proposal with session_change_apply, passing its plan_id and plan_sha256. Record progress with session_progress_update (active, done, failed or skipped); only one step can be active, and a step’s dependencies must finish first. session_completion_check reports whether every step is done.

Once a session has approved requirements, Lab changes and managed runs need an active step in your own approved plan. Another connection can propose its own plan, but doesn’t inherit yours.

Approvals

Changes, runs and publishing go through prepare and then apply, create or execute. The prepare result tells you whether to confirm with the person under the session’s approval setting. See Approvals and grants.

Reading results

A finished run only means the software ran. Fetch its output with run_artifact_get:

{
  "run_id": "<run-id>",
  "artifact_id": "workspace-results",
  "include_content": true
}

Small results come back inline with a byte count and SHA-256; larger ones come back as a short-lived download link, which you shouldn’t save or share. Check the length and SHA-256 yourself before using the numbers. If you can’t get the content, don’t fall back to the run’s log or report: artifact_content_unavailable can be retried, and on artifact_integrity_mismatch stop and report the run and result IDs.

execution_record_get returns the signed record of what ran and which files it produced.

Save a finished external run

An agent can import a completed or failed run into an editable Lab without starting Biosimulant compute. An imported Run records the runner’s report and the verified identities of saved files. It does not certify where the computation happened.

  1. Prepare a portable run bundle for the exact Lab revision or release executed. For the CLI, use biosimulant labs run with --run-bundle, --run-source-kind, --run-source-id, and --run-source-digest. The local Lab MCP can export a finished run with run_export_bundle.
  2. Upload the original bundle files through the Files tools or Studio. Keep the returned file IDs, verify the byte counts and checksums, and replace the local paths in the manifest with those file IDs.
  3. Use run_import_prepare and apply the exact plan with run_import_apply after any required Studio approval. Pass the session ID when importing the session’s own workspace revision. The corresponding Developer API endpoints are POST /v1/run-import-plans and POST /v1/run-imports.
  4. Read back the Run and open its Results and Files links. It is marked Imported. Importing spends no Biosimulant compute credits.

If the exact source is unknown or your connected tools cannot import a Run, keep the output and metadata as evidence. Do not start a cloud run to save them.

Working locally instead

For local or offline work, use the biosimulant CLI. Its registry sign-in and your agent’s connection are separate, and neither signs you in to the other.