Skip to main content

UnexHub Agent Runtime

Build a chat Agent by supplying instructions, knowledge, and optional Python business logic. The official Runtime handles the unex-agent-v1 container API, a default model/tool loop, streaming events, user questions, and cancellation. UnexHub supplies model and MCP capabilities for each authorized Run; UNH executes the local tools.

Requires Python 3.11–3.14. The package includes the CLI, starter template, dependency lock, and three examples. Developers do not need to clone the Runtime repository or build it from source.

Create an Agent

Once the selected version is available on PyPI:

pip install unexhub-agent
unexhub-agent init my-agent

Or let uv manage the tool environment:

uvx --from unexhub-agent==0.1.2 unexhub-agent init my-agent

Initialization makes no network requests. requirements.runtime.txt pins the CLI's exact Runtime version; image builds resolve that version from the configured package index. Upgrading your local CLI does not alter existing projects or released images.

Before publication, or to carry the Runtime with the project, install a maintainer-provided wheel and initialize with it:

python -m pip install /path/to/unexhub_agent-0.1.2-py3-none-any.whl
unexhub-agent init my-agent \
  --runtime-wheel /path/to/unexhub_agent-0.1.2-py3-none-any.whl

The wheel must match the installed CLI version. It is copied into vendor/ and referenced with a relative path. Fully disconnected builds also require a source or cache for third-party and business dependencies.

Add your business rules

Edit agent.yaml, instructions.md, and knowledge/. The default entrypoint: null uses the official loop. To add Python logic, set entrypoint: agent:run and implement:

from unexhub_agent import AgentContext


async def run(ctx: AgentContext) -> str:
    await ctx.emit("Starting the task", kind="run.progress")
    return await ctx.run_agent()

Use --example browser-assistant, --example file-organizer, or --example monitoring to initialize a complete example. The local wheel option can be combined with any example. Browser tools must be active in UNH; artifact publishing requires the platform artifact service.

Build and cloud-test

cd my-agent
unexhub-agent check-config --config agent.yaml
docker build --platform linux/amd64 -t my-agent:0.1.2 .

The image listens on 0.0.0.0:8080 and provides /health. Use the existing UnexHub Mode A/B image validation, deployment, self-test, and review workflow. Configure chat or hybrid interaction, protocol unex-agent-v1, and the Runtime version inside the image. Connect an online UNH device signed into the same account and environment, then send the task in UNH.

The platform owns container creation, renewal, stopping, and cleanup. A test Run borrows an existing cloud self-test environment and does not destroy or extend it when the task ends. This package does not connect UNH directly to an Agent on the developer's machine. Container files are temporary; persist business data explicitly. Unknown outcomes must be reconciled rather than blindly replayed.

UnexHub · Developer Center

Container egress proxies

Model, MCP, and artifact HTTP clients use HTTPX trust_env=True. They honor the platform-injected HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, and NO_PROXY settings. Keep loopback addresses in NO_PROXY for local health checks and fixtures. The container network policy must also allow the actual UnexHub Broker hostname. Rebuild existing Agent images with the updated pinned Runtime or a maintainer-provided wheel to apply this change.

Developer logs

Runtime 0.1.2 enables INFO JSON logs by default. Events carry the Run ID, execution stage, model/tool timings, and bounded exception-chain stack frames. HTTP failures include status, upstream request ID, and safe diagnostic hints, without logging credentials, conversation contents, tool arguments/results, or raw upstream error bodies. Use ctx.logger.info("Starting the screenshot task") for business progress, or unexhub-agent serve --config agent.yaml --log-level debug to adjust the Runtime log level.

License

The Runtime, starter template, and examples are licensed under the Apache License, Version 2.0. Generated projects retain Runtime license and attribution files in vendor/. Independent business code and third-party dependencies retain their respective licenses.

Metadata

Release files for unexhub-agent 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unexhub-agent 0.1.2
File Size Uploaded Provenance Actions
unexhub_agent-0.1.2.tar.gz 184.1 kB Without provenance Details for unexhub_agent-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for unexhub-agent 0.1.2
File Interpreter ABI Platform Actions
unexhub_agent-0.1.2-py3-none-any.whl Python 3 none any Details for unexhub_agent-0.1.2-py3-none-any.whl

Total release size: 245.8 kB

Release files / unexhub_agent-0.1.2.tar.gz

Download URL unexhub_agent-0.1.2.tar.gz
Size 184.1 kB
Tags Source
SHA-256 checksum
How to use checksums
54f2c4454bc022e37d40e82d2b980c5b881f0c06fdadc6c8bd71d26c1da532dd
BLAKE2b-256 checksum
How to use checksums
eab46b0eae9d1152fde64d206d79ff966415b0730d1ed0841b512124950bec21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / unexhub_agent-0.1.2-py3-none-any.whl

Download URL unexhub_agent-0.1.2-py3-none-any.whl
Size 61.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aec635f61c1be77efba122ad9bf188181787b1bc7dbbeba5fe24a166037224f0
BLAKE2b-256 checksum
How to use checksums
dcef3dbf3a966e8ac8de69a2084b1de8b5930e9349ccda440a69cf0441a0465b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for unexhub-agent 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page