Prerequisite Installation¶
Note: All example output directories in this document use
outputas the example. Users can modify the custom workspace directory as needed.
1.1 System Requirements¶
- Python: 3.11+
- Operating System: Linux / macOS
- API Requirements: When selecting the LangChain or command-line backend, an accessible model service is required; see Direct Usage for specific environment variables
- Memory: 4GB+ recommended
- Git: used for workspace history
1.2 Installing the UCAgent Main Package¶
Install a release from PyPI¶
UCAgent 2.0 is available on PyPI as UCAgent. Installing it provides the ucagent command.
The package bundles ToffeeUT and installs uc-toffee[runner]>=2.4,<3 with its uc-xcomm and pytest runtime dependencies.
Use python -m pip install --upgrade UCAgent to upgrade, or python -m pip install "UCAgent==2.0.0" to pin a version. On 2.0.0, use ucagent toffee-ut <workspace> <DUT> for a direct launch, or name ToffeeUT in your Global request as shown in the quickstart.
Install from source¶
Clone the repository to run bundled examples such as Adder or to edit the source. The repository checkout provides the examples and Makefile.
To install just the development CLI from main without keeping a checkout, run python -m pip install git+https://github.com/XS-MLVP/UCAgent@main in a virtual environment.
When upgrading from Toffee 1, use a fresh virtual environment. The pytoffee and uc-toffee distributions share the toffee import name.
RTL Builds and Simulation¶
Compiling RTL requires Picker, Verilator (including verilator_coverage), CMake, Make, a C++ compiler, and development headers for your Python version. The example uses prebuilt Linux x86-64 packages; the corresponding uc-xcomm 2.0.2 wheels support CPython 3.11 and 3.12. Install Picker in the same virtual environment as UCAgent:
uc-picker installs SWIG. The remaining build tools come from your system. For other platforms, tool versions, and Python bindings, see the Picker installation guide. A prebuilt DUT package must match the current Python and xcomm ABI. The documentation-only Mini Example does not require native build tools.
Installation Test¶
In the activated virtual environment, check the Python dependencies and entry points:
Before verifying RTL, check the build tools as well:
With picker --check, the templates and Python/C++ resources must pass; other languages are optional. Reactivate the same virtual environment each time you open a new terminal.
Example interface of ucagent --help:
See Option Description for grouped descriptions, default values, and complete examples of each parameter.
1.3 Installing Code Agent (Optional)¶
The Global quickstart uses OpenCode V2. Install it with npm or choose another official installation method:
In OpenCode, use /connect and /models to connect a provider and choose a model. Keep opencode on PATH when launching UCAgent.
The command-line backends currently built into UCAgent include claude, opencode, copilot, qwen, kilo, and codex. After installing the client, select it via --backend=<name>; refer to the official documentation for client login, model, and version requirements.
