Skip to main content

yuce

A thin Python client of the YuCe audit server (sbgk audit-serve): one authenticated connection per agent, the server's tools as methods. Standard library only, Python 3.10 or newer.

It talks to a running server. The kernel, its checks and its journal stay in the server: see the main README for how to start one.

Install

pip install organetic-yuce

You import it as yuce. Do not run pip install yuce: that name on PyPI belongs to an unrelated project.

A reader

import yuce

with yuce.Client("127.0.0.1:8787", token="replace-with-a-secret-1") as agent:
    task = agent.acquire(max_wait_ms=10_000)
    if task["status"] == "DIRECTIVE":
        p = task["local_id_prefix"]
        reply = agent.submit(task["task_id"], [
            yuce.observe(p + "o1", "the document id", "a quote, byte for byte", terms=["a term"]),
            yuce.claim(p + "c1", "What the quote says.", "a subject", [p + "o1"]),
        ])
        print(reply["status"])

task["prompt"] is the directive to give a model: it holds the section to read and the form of the lines to send back. examples/reader.py is the whole loop with your model in one function.

The owner

with yuce.Client("127.0.0.1:8787", token="replace-with-a-secret-4") as owner:
    print(owner.status())
    owner.revoke(quote_id)                     # the source no longer holds
    print(owner.record(claim_id)["grounded"])  # False: the claim rested on that quote

What comes back

A tool's answer is a dict, and a refusal of the kernel is an answer: submit gives REPAIR_REQUIRED with the reason, and you send only the lines after the accepted ones. An exception means the call itself failed:

Exception Meaning
yuce.RpcError the server refused the call: code is yuce.UNAUTHORIZED (the token), yuce.FORBIDDEN (the role's tools) or a JSON-RPC code
TimeoutError no answer within timeout_s, 60 s by default. The call may still have reached the server
yuce.ConnectionClosed the connection ended. Open a new Client

Use one Client per agent and one thread at a time. Every tool has its method; agent.call("audit_status") calls one by name, and agent.tools() lists what this agent's role may call. The role comes from the token, and the server decides it: agent.subject shows it.

The connection is plain TCP, as the server has no TLS: the token travels unencrypted, so keep the server on loopback or inside a network you trust.

Metadata

Release files for organetic-yuce 0.1.7

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

Built distribution (wheel)

Table of built distributions (wheels) for organetic-yuce 0.1.7
File Interpreter ABI Platform Actions
organetic_yuce-0.1.7-py3-none-any.whl Python 3 none any Details for organetic_yuce-0.1.7-py3-none-any.whl

Release files / organetic_yuce-0.1.7-py3-none-any.whl

Download URL organetic_yuce-0.1.7-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
49c28dfd21affb53567174b4591631fdd3d4157ed55a6da0ee186b0cfa1da986
BLAKE2b-256 checksum
How to use checksums
0ef1ecbceb060fe174cedea33001fe2c05787f054eb3174931b14424b488689a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Security for organetic-yuce 0.1.7

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.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for organetic_yuce-0.1.7-py3-none-any.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

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