Skip to content

Parameter Description

Parameters and Options

The usage of UCAgent is:

1
2
3
ucagent [application] <workspace> <dut_name> [options]
ucagent attach <session_dir> --agent <agent_id>
ucagent prepare-workspace --app <id_or_path> [--workflow <name>] --source <dir> --workspace <dir> --dut <name>

New direct tasks default to toffee-ut:ut. To select it explicitly, run ucagent toffee-ut <workspace> <dut>. Run ucagent --list-apps to see available applications. prepare-workspace requires a preparation hook on the selected workflow. If a workspace shares its name with an application or subcommand, use a path beginning with ./.

Input and Output

  • workspace: The directory used by the workflow. For ToffeeUT, inputs can live in a directory such as workspace/Adder/.
    • workspace/<DUT_DIR>/README.md: DUT verification requirements and objectives
    • workspace/<DUT_DIR>/*.md: Other reference files
    • workspace/<DUT_DIR>/*.{v,sv}: RTL sources with their includes and other dependencies
    • Other files related to verification (e.g., provided test instances, requirement specifications, etc.)
  • dut_name: The name of the Design Under Test, i.e., , for example: Adder

Output

  • The workflow prepares Guide_Doc/ and generates documentation, tests, and run results by stage. --output overrides the workflow's output directory. ToffeeUT defaults to ut_project; actual run evidence goes under ut_project/results/.

For a detailed explanation of the output, refer to Result Analysis and Process Summary

Task and workspace

Parameter Required Description Example
workspace Required for normal tasks; optional for multi Working directory or local .tar.gz / HTTP(S) archive URL; multi defaults to the current project directory ./output
dut Required for normal tasks; optional for interactive multi DUT name; required when multi starts an explicit initial workflow Adder
Option Short Value/Type Default Description
--workspace-base path /tmp/ucagent_workspace_base Base directory for extracting archive workspaces; the effective workspace is <base>/<archive-name>/workspace
--output dir Workflow output declaration Output directory name

Configuration and workflows

Option Short Value/Type Default Description
--config path None Path to the configuration file, e.g., --config config.yaml
--plugin name/path (repeatable) [] Activate installed plugin ID or local plugin project path
--workflow [app:]workflow None Select an application's workflow. A qualified ID also selects the application, for example toffee-ut:ut
--override A.B.C=VALUE[,X.Y=VAL2,...] None Override configuration using dot-path notation, can be used repeatedly; values are parsed as Python literals, booleans should be written as True/False, unparsed values are treated as strings

Execution and models

Option Short Value/Type Default Description
--interaction-mode -im standard/enhanced/advanced standard Interaction mode; enhanced includes planning and memory management, advanced includes adaptive strategies
--seed int Random Random seed (automatically random if not specified)
--sys-tips str Empty Override system prompt
--loop -l flag Off Submit the automatic loop during initialization (supports --loop-msg)
--loop-msg str Empty The first message injected when entering the loop
--agent-mode single / multi Unset Select single Agent or three-layer Global/Super/Sub execution; overrides configuration. See Multi-agent and Global Agent.
--max-subagents int Unset Per-Super limit for concurrently running Sub agents (0–128)
--backend str None Specify backend (overrides configuration file settings)
--icmd str (repeatable) [] Initial commands to execute at startup, can be used multiple times
--exit-on-completion -eoc flag Off Exit when the current mode's task finalization conditions are met; see Global Agent for multi

Interface and display

Option Short Value/Type Default Description
--stream-output -s flag Off Stream output to the console
--human -hm flag Off Start the ordinary interactive Console
--tui flag Off Enable terminal TUI interface
--web-console [host[:port]] [password] Off Enable browser Web UI (standalone mode). Default localhost:8000. Note: Provides only the Web interface, not local command-line interaction
--web-terminal [host[:port]] [password] Off Start Web Terminal server. Default 127.0.0.1:8818. Provides both Web terminal and local command-line interaction

--web-console provides a standalone Web session; --web-terminal can be used simultaneously with the local terminal. For example:

ucagent toffee-ut output/toffee_Adder Adder --tui --web-console '127.0.0.1:8000 mysecret'
ucagent toffee-ut output/toffee_Adder Adder --human --web-terminal '127.0.0.1:8818 mysecret'

See Web Master User Guide for the Master's Dashboard, Launch, Task, and Agent pages.

Stages and history

Option Short Value/Type Default Description
--force-stage-index int Unset Resumes saved progress by default; explicitly selecting an index (including 0) resets saved data from that stage onward when rewinding
--ref str (repeatable) [] Specifies reference files that a stage needs to read; format: [stage_index:]file_path1[,file_path2]
--skip int (repeatable) [] Skips the specified stage index; can be provided repeatedly
--unskip int (repeatable) [] Unskips the specified stage index; can be provided repeatedly
--no-history flag Off Disable loading history from the working directory

Documents, templates and file protection

Option Short Value/Type Default Description
--template-dir path None Custom template directory
--template-overwrite flag No Allow overwriting existing content when rendering templates to the workspace
--template-cfg-override path (repeatable) [] Override template configuration from YAML files, can be used multiple times
--no-write -nw path1 path2 ... None Prohibits writing to specified files or directories; paths must be within the workspace, and non-wildcard paths must already exist
--gen-instruct-file -gif file AGENTS.md Generate a guidance file for external Agents under the workspace (overwrites if exists)
--guid-doc-path path (repeatable) None Select custom Guide_Doc directory or append files

Tools and skills

Option Short Value/Type Default Description
--force-todo -fp flag No Enables the ToDo tool in standard mode and includes ToDo information in each round's prompt
--use-todo-tools -utt flag No Enables ToDo-related tools (not limited to standard mode)
--use-skill / --no-use-skill flag On Explicitly enable/disable SKILL; uses configuration value if not specified, built-in configuration defaults to on
--extra-skill-path path None In addition to the default SKILL, use SKILLs from the specified path; cannot be used with --no-use-skill
--ex-tools -et name1[,name2...] None Comma-separated list of external tool class names (e.g., SqThink); can be used multiple times
--no-embed-tools true_or_false (value optional) true Disables built-in retrieval/memory embedded tools; a bare argument or true disables them, while passing false enables them
--append-py-path -app path (repeatable) [] Adds Python paths or files for module loading
--enable-context-manage-tools flag Off Enables context management tools; applicable to scenarios requiring explicit context management, such as API mode

The ToDo tool is used to record plans and does not replace stage verification. Step indices start from 1; a new plan requires 2–20 steps. See the Tool List for tool purposes.

MCP and HTTP services

Option Short Value/Type Default Description
--mcp-server flag No Starts the MCP Server (including file tools)
--mcp-server-no-file-tools flag No Start MCP without the file operation group; workflow-required tools must still be available
--mcp-server-host host 127.0.0.1 Server listening address
--mcp-server-port int 5000 Server port; use -1 to automatically select an available port
--export-cmd-api [ip[:port]][ passwd] Off Starts a CMD API server, default 127.0.0.1:8765; a password can be specified to enable HTTP Basic Auth

Master management and connections

Option Short Value/Type Default Description
--as-master [ip[:port]] Off Starts as a Master API server; uses default values if no address is specified
--master host[:port] [key] [] Connects to a Master API server; access_key can be specified; can be used multiple times
--client-id str None Client identifier used when connecting to the Master (used with --master)
--as-master-key str None Access key required for client registration (used with --as-master)
--as-master-password str None HTTP Basic Auth password to protect the Master API (used with --as-master)
--as-master-persist [path] /tmp/ucagent_master Master uses a persistent workspace directory (used with --as-master)

Logs and recording

Option Short Value/Type Default Description
--log flag No Enables logging
--log-file path Auto Log output file (uses default if not specified)
--msg-file path Auto Message log file (uses default if not specified)

Checks and management

Option Short Value/Type Default Description
--list-apps flag No List discoverable application IDs, kinds, and brief descriptions, then exit
--list-plugins flag No List discoverable extension IDs, kinds (application or plugin), and brief descriptions, then exit
--plugin-help id/path Show the application or plugin description and custom help, then exit
--validate-plugin name/path (repeatable) [] Validate plugin manifest, compatibility, dependencies, commands, and resources then exit
--emulate-config flag No Traverse configured stages and run their checks
--version flag Prints the version and exits
--upgrade [pip_args] No Upgrades UCAgent from the GitHub main branch; optional additional pip arguments can be passed
--check flag No Checks for the existence of default configuration, language directories, templates, and Guide_Doc, then exits
--hook-message str None Hook continue/complete key for custom prompt handling (used by Code Agent)

Examples

Run a prepared DUT directly:

ucagent toffee-ut output/toffee_Adder Adder --backend langchain --tui --loop

Use the command-line backend to invoke verification tools via MCP:

ucagent toffee-ut output/toffee_Adder Adder --backend opencode \
  --no-embed-tools --mcp-server --mcp-server-port -1 --tui --loop

Temporarily override configuration:

1
2
3
ucagent toffee-ut output/toffee_Adder Adder --config config.yaml \
  --override 'runtime_options.ut_reference_model=True' \
  --override 'conversation_summary.max_tokens=16384'

--override is processed after YAML loading and accepts Python literals such as True or ['toffee-ut:ut']. Quote the entire key=value argument in the shell; pass separate options for multiple overrides. YAML booleans use true/false. See Workflow Configuration for configuration priority and list replacement rules.

Compatibility with existing UnitTest projects

UCAgent 2.0.0 used unittest:unittest when no application or workflow was selected. To continue an older project, use ucagent unittest <workspace> <dut> with its original configuration and output directory (usually unit_test/, with reports under uc_test_report/). Stage progress is not reused across workflows. See the UnitTest guide for the repository's Picker/UnitTest recipes such as make test_Adder.

Environment Variable Description

UCAgent supports configuring various parameters via environment variables. Environment variables are used to override the default values in the built-in configuration file; keys explicitly written in the user configuration file take precedence over the configuration file.

Model Configuration

Environment Variable Name Description Default Value
OPENAI_MODEL OpenAI chat model name None (must be configured)
OPENAI_API_KEY OpenAI API key None (must be configured)
OPENAI_API_BASE OpenAI API base URL None (must be configured)
OPENAI_CONTEXT_SIZE Context window size in tokens for CLI clients that support it. Also the default LangChain summary threshold CLI client default, 204800 for LangChain
OPENAI_OUTPUT_SIZE Maximum model output per response, in tokens Not set
OPENAI_API_MODE OpenAI API mode used by the LangChain backend: auto, responses, or chat_completions auto
OPENAI_RESPONSES_PROBE_TIMEOUT Timeout in seconds for the Responses API capability probe before first model work, must be a positive number 10
OPENAI_REASONING_EFFORT Reasoning effort for the LangChain backend; passed as-is according to the string supported by the current OpenAI or compatible model service xhigh
OPENAI_TEMPERATURE OpenAI model temperature parameter Not set
OPENAI_TOP_P OpenAI model top_p parameter Not set
ANTHROPIC_MODEL Anthropic Claude model name claude-3-7-sonnet-20250219
ANTHROPIC_API_KEY Anthropic API key None (must be configured)
GOOGLE_GENAI_MODEL Google Gemini model name gemini-2.5-pro
GOOGLE_GENAI_API_KEY Google Generative AI API key None (must be configured)

Embedding Model Configuration

Environment Variable Name Description Default Value
EMBED_MODEL Vector embedding model name None (must be configured)
EMBED_OPENAI_API_KEY OpenAI API key for the embedding model None (must be configured)
EMBED_OPENAI_API_BASE OpenAI API base URL for the embedding model None (must be configured)

Langfuse Monitoring Configuration

Environment Variable Name Description Default Value
ENABLE_LANGFUSE Whether to enable Langfuse tracing monitoring false
LANGFUSE_PUBLIC_KEY Langfuse public key None (must be configured)
LANGFUSE_SECRET_KEY Langfuse secret key None (must be configured)
LANGFUSE_URL Langfuse service address http://localhost:3000

Conversation Summary Configuration

Environment Variable Name Description Default Value
SUMMARY_MAX_CTX_TOKEN Estimated context token limit that triggers compression; 0 disables this trigger condition 204800
SUMMARY_MAX_SUM_TOKEN Output token limit for each summary generation, must be greater than 0 8192
SUMMARY_MAX_KEEP_MSG Context message count limit that independently triggers compression; 0 disables this trigger condition 100
SUMMARY_TAIL_KEEP_MSG Number of recent messages retained for the LLM 1

SUMMARY_MAX_CTX_TOKEN and SUMMARY_MAX_KEEP_MSG are two independent trigger conditions; exceeding either one will trigger compression. Context tokens are estimated values before the model call; if the model service returns usage during execution, the LangChain backend will calibrate subsequent estimates using the most recent actual input tokens. In status, ProviderTokens displays the server-side cumulative tokens as input/output/total, Context displays the current estimated value and threshold, and Compression displays the reason for the most recent compression and the size before and after.

LLM Rate Limiting Configuration

Environment Variable Name Description Default Value
ENABLE_LLM_RATE_LIMIT Whether to enable LLM request rate limiting false
LLM_MAX_RPS Maximum requests per second for LLM 10

LLM Auxiliary Suggestion Configuration

Environment Variable Name Description Default Value
ENABLE_LLM_FAIL_SUGGESTION Whether to enable intelligent suggestions for stage failures false
FAIL_SUGGESTION_MODEL Model name used for failure suggestions None (must be configured)
FAIL_SUGGESTION_API_KEY API key for failure suggestions None (must be configured)
FAIL_SUGGESTION_API_BASE API base URL for failure suggestions None (must be configured)
FAIL_SUGGESTION_MFCOUNT Minimum number of failures to trigger failure suggestions 3
FAIL_SUGGESTION_TEMPERATURE Temperature parameter for the failure suggestion model Not set
FAIL_SUGGESTION_TOP_P Top_p parameter for the failure suggestion model Not set
ENABLE_LLM_PASS_SUGGESTION Whether to enable intelligent review for stage passes false
PASS_SUGGESTION_MODEL Model name used for pass review None (must be configured)
PASS_SUGGESTION_API_KEY API key for pass review None (must be configured)
PASS_SUGGESTION_API_BASE API base URL for pass review None (must be configured)
PASS_SUGGESTION_TEMPERATURE Temperature parameter for the pass review model Not set
PASS_SUGGESTION_TOP_P Top_p parameter for the pass review model Not set

Process Control Configuration

Environment Variable Name Description Default Value
HUMAN_CHECK_CK Whether to enable human review of check points when verifying complex DUTs false
UC_ENV_CMD_BACKEND_EX_ARGS Additional arguments for command-line backend execution None

loop_settings.max_stalled_rounds defaults to 18 and limits consecutive stalled rounds in --loop. Set it to 0 to disable, or override it with --override loop_settings.max_stalled_rounds=VALUE. See Loop Stall Protection for counting and recovery rules.

Test Tool Configuration

Environment Variable Name Description Default Value
UC_TEST_RCOUNT Number of repeated executions for test cases 3
UC_IS_IMP_TEMPLATE Whether it is an implementation layer test template false
UC_SEED_MODEL Retrieval mode for random test seeds: manual returns the literal value passed to test_utils.get_seed(seed) as-is; random returns a brand new random seed; time generates based on the current time; uniform:<min>:<max> takes a uniform value within the closed interval; normal:<mu>:<sigma> takes a value from a Gaussian distribution and clamps it to [0, 2^31-1]. Invalid values will result in an error directly manual