Tasks
Run and manage tasks with the Edison client.
Overview
Edison client implements a RestClient (called EdisonClient) with the following functionalities:
Simple task running:
run_tasks_until_done(TaskRequest)orawait arun_tasks_until_done(TaskRequest)Asynchronous tasks:
get_task(task_id)oraget_task(task_id)andcreate_task(TaskRequest)oracreate_task(TaskRequest)
To create a EdisonClient, you need to pass an Edison Scientific platform api key (see Authentication):
Task types
In the Edison platform, we define the deployed combination of an agent and an environment as a job.
To invoke a job, we need to submit a task (also called a query) to it. EdisonClient can be used to submit tasks/queries to available jobs in the Edison platform.
Using an EdisonClient instance, you can submit tasks to the platform by calling the create_task method, which receives a TaskRequest (or a dictionary with kwargs) and returns the task ID.
Aiming to make the submission of tasks as simple as possible, we have created a JobNames enum that contains the available task types.
Please note that Kosmos is not available via API.
JobNames.LITERATURE
Literature search
Ask a question of scientific data sources, and receive a high-accuracy, cited response. Built with PaperQA3.
JobNames.LITERATURE_HIGH
Literature search
Ask a question of scientific data sources, and receive a high-accuracy, cited response. High reasoning mode enabled for SOTA performance.
JobNames.ANALYSIS
Data analysis
Turn biological datasets into detailed analyses answering your research questions.
JobNames.PRECEDENT
Precedent search
Formerly known as HasAnyone, query if anyone has ever done something in science.
JobNames.MOLECULES
Chemistry tasks
A new iteration of ChemCrow, Phoenix uses cheminformatics tools to do chemistry. Good for planning synthesis and designing new molecules.
Kosmos
Kosmos is a specialized agent for autonomous discovery. It can digest over 1,500 research papers and execute more than 42,000 lines of analysis code in a single run. It operates through multiple AI agents working in parallel, sharing information through structured "world models."
Every conclusion is fully auditable, so you can trace any finding back to its original code or scientific source. Kosmos also generates publication-ready figures and data visualizations alongside its written analysis.
Please note that Kosmos is not currently available via API.
Submitting tasks
Using JobNames, the task submission looks like this:
Asynchronous tasks
Sometimes you may want to submit many jobs, while querying results at a later time. The platform API supports this, as shown below.
Batch task submission
In either the sync or the async code, collections of tasks can be given to the client to run them in a batch:
Task continuation
Once a task is submitted and the answer is returned, Edison platform allow you to ask follow-up questions to the previous task. It is also possible through the platform API. To accomplish that, we can use the runtime_config we discussed in the Simple task running section.
Last updated
