Query
Run bioinformatics queries through the AI agent. Supports synchronous and streaming modes.
POST
/v1/queryScope: querySynchronous query — waits for the agent to finish and returns the full response.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | The bioinformatics query or instruction |
| conversation_id | string | No | Session ID to continue a previous conversation |
| workspace_id | string | No* | Required if key is scoped to specific workspaces |
response = client.query.run(
"Find BRCA1 variants associated with breast cancer",
workspace_id="ws_abc123",
)
print(response.answer)POST
/v1/query/streamScope: queryStreaming query — returns Server-Sent Events as the agent processes the request. Same request body as /v1/query.
SSE Event Types
| type | Description |
|---|---|
| status | Processing status update (e.g., "Searching databases...") |
| content | Text content to display to the user |
| tool_call | A tool was invoked by the agent |
| done | Stream is complete — no more events |
| error | An error occurred during processing |
for chunk in client.query.stream("Run BLAST for ATGCGTAACCGTAA"):
if chunk.type == "status":
print(f"[{chunk.status}]")
elif chunk.type == "content":
print(chunk.content, end="", flush=True)
elif chunk.type == "done":
print("\nComplete.")