Agent runtime with SDK imports, bundled CLI, optional daemon bootstrap, and built-in tools
Project description
yuuagents
yuuagents is a Python agent runtime with two supported paths:
- SDK path: import
yuuagents, build a local agent, and run it in-process. - Service path: install the package, run
yagents install, then start the daemon withyagents up.
The base package includes:
yagentsCLI- SDK helpers such as
run_once(...),LocalAgent,Session,AgentConfig, andAgentContext - built-in tool registry and capability guards
- snapshot-based task persistence
- optional Docker-backed and web-backed capabilities
Install
Requirements:
- Python 3.14 or newer
piporuv- For service mode, a working
ytraceexecutable onPATH - For Docker-backed tools, Docker Engine must be reachable
Install the base package:
pip install yuuagents
Optional extras:
pip install 'yuuagents[docker]'
pip install 'yuuagents[web]'
pip install 'yuuagents[docker,web]'
pip install 'yuuagents[all]'
Extra meanings:
docker: enables Docker-backedexecute_bash,read_file,edit_file, anddelete_fileweb: enablesweb_searchall: installs both optional capability sets
SDK Path
Use the SDK path when you want to run an agent locally inside your own process.
import asyncio
import yuullm
from yuuagents import LocalAgent, run_once
async def main() -> None:
llm = yuullm.YLLMClient(
provider="openai",
api_key_env="OPENAI_API_KEY",
default_model="gpt-4o-mini",
)
result = await run_once(
"Say hello and report that the runtime is working.",
llm=llm,
system="You are a concise coding assistant.",
)
print(result.output_text)
agent = LocalAgent.create(llm=llm)
run = agent.start("Inspect the current workspace")
async for step in run.step_iter():
print(step)
print((await run.result()).output_text)
asyncio.run(main())
SDK mode does not require the daemon, Docker, or a local SQLite task database.
Service Path
Service mode is the CLI-and-daemon workflow.
yagents install
yagents install writes the installed config to ~/.yagents/config.yaml, creates the runtime directories, initializes the task database, and prepares the configured Docker image when Docker-gated tools are present.
Current config resolution order:
- Start from the bundled default template shipped inside the package.
- Merge
config.overrides.yamlfrom the current working directory if present. - Merge
config.overrides.yamlfrom--project-dirif provided. - Merge
--overridesif provided. - If
--configis provided, it fully replaces the default template and requires confirmation before continuing.
Important details:
- The packaged default template is used even when you do not have a repository checkout.
- On the default install path,
docker.imageis pinned to the versioned runtime image tag for the installed package. - If no Docker-gated tools are configured, Docker image setup is skipped.
- If Docker-gated tools are configured but Docker is unavailable, install continues with a warning and those tools will fail later at runtime.
yagents up
yagents up starts the daemon on the Unix socket from the resolved config.
Behavior to know:
--configloads a specific config file.- Without
--config, the CLI preferscwd/config.yaml, then~/.yagents/config.yaml, then the bundled default template. config.overrides.yamlin the current directory is merged on top when present.--dot-envloads environment variables from a.envfile; otherwise the command auto-discovers.envwhile walking up from the current directory toward$HOME.- If the configured database path changed since the last install,
uprefuses to start rather than orphan the old SQLite file. -d/--daemonprefers a systemd user service when possible; otherwise it falls back to a background subprocess.
Other CLI commands
| Command | What it does |
|---|---|
yagents run --agent main --task "..." |
Submit a task to the daemon |
yagents list |
Show a human-readable task list |
yagents status <task_id> |
Return JSON status for one task |
yagents logs <task_id> |
Print conversation history by role |
yagents input <task_id> "..." |
Send a user message to a running task |
yagents stop <task_id> |
Cancel a running task |
yagents config |
Show the current installed config |
yagents config --overrides FILE |
Update config and try hot reload |
yagents config --config FILE |
Replace config and try hot reload |
yagents trace ui |
Open the yuutrace UI |
yagents down |
Stop the daemon and try to stop the systemd user service |
yagents uninstall |
Remove the installed runtime state |
yagents run accepts --persona, --tools, --model, --container, and --image. --container and --image are mutually exclusive.
Built-in Tools
Available tool names in the package:
sleepview_imagedelegateinspect_backgroundcancel_backgroundinput_backgrounddefer_backgroundwait_backgroundexecute_bashread_fileedit_filedelete_fileweb_search
Capability rules:
sleepandview_imageare always available.delegateand the background control tools require delegate capability from the daemon runtime.- Docker-backed tools require Docker capability and the
dockerextra. web_searchrequires web capability, thewebextra, and a Tavily API key.
Configuration
The repository contains source-side reference templates:
config.example.yamlconfig.overrides.example.yaml
Those files are reference material for source checkouts. Packaged installs use the bundled default template shipped inside yuuagents itself.
Persistent state lives under ~/.yagents by default:
~/.yagents/config.yaml~/.yagents/tasks.sqlite3~/.yagents/traces.db~/.yagents/yagents.sock~/.yagents/dockers/
Development
uv sync
uv run pytest
uv run ruff check src/ tests/
uv build
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yuuagents-0.1.1.tar.gz.
File metadata
- Download URL: yuuagents-0.1.1.tar.gz
- Upload date:
- Size: 63.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52f48f18aa03eeb8c31526c16ad92261f9958039e0a696ca87a4dd83ebc89122
|
|
| MD5 |
db1326ef5d3b8beabcc271edc023159a
|
|
| BLAKE2b-256 |
57b662ecfd4eab953d4067b5f5ad7ab5004ac94341e333101ffefd1de6e4ce56
|
Provenance
The following attestation bundles were made for yuuagents-0.1.1.tar.gz:
Publisher:
publish-pypi.yml on yuulabs/yuuagents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yuuagents-0.1.1.tar.gz -
Subject digest:
52f48f18aa03eeb8c31526c16ad92261f9958039e0a696ca87a4dd83ebc89122 - Sigstore transparency entry: 1202847284
- Sigstore integration time:
-
Permalink:
yuulabs/yuuagents@f9ed2cf489bb713a82ac46c4e22edc258e777700 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/yuulabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@f9ed2cf489bb713a82ac46c4e22edc258e777700 -
Trigger Event:
push
-
Statement type:
File details
Details for the file yuuagents-0.1.1-py3-none-any.whl.
File metadata
- Download URL: yuuagents-0.1.1-py3-none-any.whl
- Upload date:
- Size: 76.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
759492cb7fc9d12b787469fde25562477404ecf95232c6dc3f9eb0dd22ef83d5
|
|
| MD5 |
5eb6d445a8df4d16c700db15d53a2402
|
|
| BLAKE2b-256 |
1febff8540595b2eef07ecf5d19e18cc98007dd1c48fd3b401b03f5302bca045
|
Provenance
The following attestation bundles were made for yuuagents-0.1.1-py3-none-any.whl:
Publisher:
publish-pypi.yml on yuulabs/yuuagents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yuuagents-0.1.1-py3-none-any.whl -
Subject digest:
759492cb7fc9d12b787469fde25562477404ecf95232c6dc3f9eb0dd22ef83d5 - Sigstore transparency entry: 1202847289
- Sigstore integration time:
-
Permalink:
yuulabs/yuuagents@f9ed2cf489bb713a82ac46c4e22edc258e777700 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/yuulabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@f9ed2cf489bb713a82ac46c4e22edc258e777700 -
Trigger Event:
push
-
Statement type: