asiflow-hyper
Python client for the Hyper Agent API: delegate a software objective to Hyper, run and verify the work, read the evidence. Thin and honest: every method is one documented REST call (https://api.hyper.asiflow.ai/openapi.json); errors are the API's RFC 9457 problems.
from asiflow_hyper import HyperClient, device_login
token = device_login(client_name="my-agent", scope="objectives:read objectives:write runs:write evidence:read deploy:verify offline_access")
hyper = HyperClient(token=token.access_token)
job = hyper.create_objective(name="Bakery site", objective="A one-page site for Nour's bakery with a contact form.")
job = hyper.wait_job(job["id"])
run = hyper.start_run(job["result"]["project_id"], policy={"budget_cap_usd": 10})
run = hyper.wait_run(run["result"]["run_id"], on_needs_you=lambda card: "approved")
for attempt in run["attempts"]:
if attempt["status"] == "verified":
print(hyper.attempt_evidence(attempt["id"]))
Drive a session (1.1.0)
The interactive loop — the same one the Hyper web app runs — and every other capability:
s = hyper.sessions.create(repo="acme/site", permission_mode="auto_approve", budget_usd=10)
hyper.sessions.send(s["id"], "Add a pricing page, run the tests, open a pull request.")
view = hyper.sessions.wait_until_settled(s["id"]) # ready | waiting_input | …
if view["pending"] and view["pending"]["kind"] == "question":
hyper.sessions.answer(s["id"], "blue")
view = hyper.sessions.wait_until_settled(s["id"])
print(hyper.sessions.transcript(s["id"])["rows"][-1]["content"])
hyper.actions.invoke("publish_site", sessionId=s["id"]) # any of hyper.capabilities()["groups"]
hyper.sessions.end(s["id"])
Scopes sessions:read sessions:write (plus workspace:*, publish:write for the catalog). A person can hand you a token from Settings → Agent access on hyper.asiflow.ai, or your client registers itself and the person allows it on Hyper's consent page.
The agent-interop-e2e lane runs this client against production on every Hyper deploy.
Release files for asiflow-hyper 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| asiflow_hyper-1.1.0.tar.gz | 9.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| asiflow_hyper-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.1 kB
Release files / asiflow_hyper-1.1.0.tar.gz
| Download URL | asiflow_hyper-1.1.0.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f6b0683af36b77e4699a4f8c8df5c66b05e70becb0acc7c7d061da3380c0b71b
|
|
BLAKE2b-256 checksum How to use checksums |
e3a9fa951f6070ccffba32288d44ad869f8b7137411680ccddbdce10d13aacd7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.3
|
Release files / asiflow_hyper-1.1.0-py3-none-any.whl
| Download URL | asiflow_hyper-1.1.0-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
914a13c288336e739eda7d74cb744fd529b15969eb1fc0bbc96cce52d5858300
|
|
BLAKE2b-256 checksum How to use checksums |
081ce71c95ff246b4c68850b6e8f73cbb3350ad1bc06dd64ce63387292724493
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.3
|