Sci-agent is a lightweight, simple, easy-to-use yet powerful agentic AI framework for building AI agents that can be easily connected with experiment control systems and scientific computing tools.
- No multithreading complications. Experiment control libraries are not always thread-safe. Agentic AI frameworks that execute tools in spawned threads can crash and result in painful debugging and redesigns. Parallel execution of instrument-control tools are either not possible or likely to cause a real-world disaster. So we take this variable out of the equation.
- Transparency. When building an experiment automation agent, every tool call matters. A bad tool call can crash a lab instrument. We believe every tool call should be visible to the user, and we don't attempt to hide away multi-step, tool-call-involving LLM responses from the user with a black-box
invokeAPI. You control every step of the process and can intervene at any point. - Build any type of workflow with it. No graph, no nodes, no edges. Define your workflow in native Python. Want to let an LLM drive the whole process? Or rather use an logic-based workflow with LLM queries embedded inside? Your choice.
- Versatile GUI adapter. If your automation workflow involves system messages auto-generated by system logic, existing GUI frameworks may not directly support it. Sci-agent can write all messages to a SQL database so that you can poll it with any GUI framework, including your homemade ones.
- Stateful and adaptable tools. Tools are classes. Each class is a "tool box" that can have multiple methods callable by the LLM. Tool classes are stateful so that you can keep a persistent connection or run engine object used by your instrument control system. The built-in wrapper can serve sci-agent tools as MCP servers, allowing them to be used by other clients. The other way around is also possible: you can use any MCP server with sci-agent.
We recommend using uv to install sci-agent. Clone this repository, enter the directory, and run:
uv venv
uv syncSci-agent can load Agent Skills folders and expose them as tools. Each skill is a
folder containing a SKILL.md file with required YAML frontmatter:
---
name: <short-identifier>
description: <when to use this skill>
---The Markdown body can include any workflow instructions, examples, or templates.
Configure skill_dirs on BaseTaskManager to point at skill directories (see
skills/scan-lab-motor/SKILL.md for an example).
One important usage of skills is to inform the agent in BaseTaskManager of how it
can launch a sub-task manager that performs a particular task by writing codes. If
you create subclasses of BaseTaskManager with your own workflow, you are always
encouraged to create a skill for it so that you can let your BaseTaskManager agent
launch that task manager through chat instead of scripting it manually.