Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

agental-sdk

Latest version: v0.41.0

Overview

Last scanned
28 Nov 2026
Published
28 Nov 2026
PyPI package Publisher: agental
0 Stars
0 Forks
39 Versions
6.6K Downloads
Python Repo language

Scan summary

agental-sdk was last scanned on 28 Nov 2026 at version 0.41.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 39 versions; the latest 5 were published within 4 days (25–28 Nov 2026).
  • Findings: No rules fired in version 0.41.0.
  • Downloads: 6,592 downloads.

Versions

39 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.41.0 LATEST 28 Nov 2026 No rules fired
0.40.0 26 Nov 2026 No rules fired
0.39.1 26 Nov 2026 No rules fired
0.39.0 25 Nov 2026 Not shown
0.38.0 25 Nov 2026 Not shown

No rules fired in 0.41.0

Findings

Findings for v0.41.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.41.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

agental

Python SDK for agental.io: a Linux virtual machine of your own over HTTP. One call makes it, another runs a command in it, another stops it. Its disk is kept while it is stopped.

pip install agental-sdk

Then from agental import Agental. Python 3.10 or later. It depends on httpx and nothing else.

Start

Make an API key in the console and put it in AGENTAL_API_KEY.

from agental import Agental

agental = Agental()

sandbox = agental.sandboxes.create(size="small")  # tiny, small, medium or large

result = sandbox.exec("uname -a")
print(result.exit_code, result.stdout)

sandbox.files.write("app/main.py", "print('hello')\n")
print(sandbox.exec(["python3", "/opt/agental/app/main.py"]).stdout)

sandbox.delete()

create answers when the machine is running. A sandbox you already have is agental.sandboxes.get(id), and agental.sandboxes.list() gives all of them.

asyncio

AsyncAgental is the same client, awaited.

import asyncio
from agental import AsyncAgental

async def main() -> None:
    async with AsyncAgental() as agental:
        sandbox = await agental.sandboxes.create()
        print((await sandbox.exec("uname -a")).stdout)
        await sandbox.delete()

asyncio.run(main())

Commands

sandbox.exec(["ls", "-la", "/opt/agental"])  # the arguments exactly, no shell
sandbox.exec("cd /opt/agental && npm test")  # a line of shell, run by sh -c
  • A command that fails is an answer, not an error: read exit_code.
  • Every command starts fresh, as root in /root. A cd or an export does not carry over to the next one.
  • A command gets 60 seconds unless you pass timeout, in seconds, up to 90. One that runs out is killed and exits 124. For longer, use commands.run below, up to 600.
  • Each of stdout and stderr is cut at 1 MB, and truncated is then true.

To see output as it arrives:

for event in sandbox.exec_stream("npm test"):
    if event.type == "exit":
        print("exited", event.exit_code)
    else:
        print(event.data, end="")

For a command that takes more than a minute, do not hold a request open for it:

build = sandbox.commands.run("cd /opt/agental && make", timeout=600)
print(build.status, build.exit_code, build.stdout)

# or start it and look later
started = sandbox.commands.start("make")
now = sandbox.commands.get(started.id)

A started command runs until it exits, its time limit runs out, or its sandbox stops, whether or not anyone is watching. no_timeout=True gives it no limit of its own:

dev = sandbox.commands.start(["npm", "run", "dev"], no_timeout=True, cwd="/opt/agental/app", env={"PORT": "3000"}, stdin=True)

# its output, as bytes, from any offset: it goes on by itself after a cut
for event in sandbox.commands.output(dev.id):
    if event.type == "output":
        print(event.data.decode(errors="replace"), end="")
    elif event.type == "gap":
        print(f"[{event.to - event.offset} bytes of {event.stream} were overwritten]")
    else:
        print("ended", event.command.end_reason)

stdin = sandbox.commands.stdin(dev.id)
stdin.write("rs\n")
stdin.close()

sandbox.commands.kill(dev.id, grace=10)  # TERM, then KILL after 10 seconds
sandbox.commands.delete(dev.id)
  • Each stream keeps its last 1 MiB while its sandbox runs: older bytes come as a gap, never silently missing. A command's stdout and stderr keep its last 65,536 characters after that.
  • env values are never written to agental's records or logs.
  • signal(id, "INT") reaches every process of the command, those it left in the background too.

Jobs

A job runs a command in a sandbox you keep, or in a fresh one made from a template for each run: every so often, on a cron, once, or only when asked.

tick = agental.jobs.create(sandbox="scraper", command="python scrape.py", every="1h", name="scrape")
agental.jobs.create(sandbox="scraper", command="./digest.sh", cron="0 7 * * 1-5", time_zone="Europe/Sofia")

run = agental.jobs.run("scrape", wait=600)  # one run now, waited for: outcome, exit_code, stdout, stderr
runs = agental.jobs.runs("scrape")  # the latest first
output = agental.jobs.run_output("scrape", runs[0].id)  # one run with its output
agental.jobs.pause("scrape")  # and resume("scrape")
agental.jobs.list(sandbox="scraper")  # one sandbox's; list() for all of them
failed = agental.job_runs(outcome="failed", limit=20)  # every job's runs

# A fresh sandbox for each run, made from a template: deleted after a run that succeeds, kept stopped for 30 minutes after one that fails.
tests = agental.jobs.create(template="ci", size="medium", keep_failed_for="30m", command="npm test", every="1h", name="tests")
last = agental.jobs.runs("tests")[0]
if last.keep_until:
    agental.jobs.keep_sandbox("tests", last.id)  # its sandbox becomes an ordinary one of yours, deleted only by you
agental.jobs.list(template="ci")  # the jobs that make their sandboxes from one template

# Try a failed run twice more, and tell a webhook rather than mail when one fails for good.
agental.jobs.update("tests", retries=2, alerts="webhook")
for run in agental.jobs.runs("tests"):
    print(run.attempt, run.outcome, run.failed_for_good)  # 1, 2, 3: the tries of one due time

# Inputs: the variables a run is given, as its command's environment.
agental.jobs.create(
    sandbox="scraper",
    command='python report.py --day "$REPORT_DAY"',
    name="report",
    inputs={"REPORT_DAY": "yesterday", "API_TOKEN": {"default": "s3cret", "secret": True}},
)
report = agental.jobs.run("report", inputs={"REPORT_DAY": "2026-11-15"}, wait=120)
agental.jobs.run_again("report", report.id, wait=120)  # the same inputs, secret ones too

# Put a job by its name: made, or changed to exactly this, as agental job apply does.
put = agental.jobs.put("nightly", sandbox="scraper", command="npm test", cron="0 3 * * *")
print(put.created, put.changed, put.job.id)

# An HTTP address: a POST to it starts a run, from anywhere, with no API key.
made = agental.jobs.triggers.create("report")  # made.secret is shown this once
httpx.post(made.trigger.url, headers={"Authorization": f"Bearer {made.secret}"}, json={"REPORT_DAY": "2026-11-15"})
agental.jobs.triggers.create("report", signature="github")  # a GitHub webhook's: X-Hub-Signature-256
agental.jobs.triggers.update("report", made.trigger.id, respond="wait", rate_per_minute=10)
rotated = agental.jobs.triggers.rotate("report", made.trigger.id)  # the old secret no longer calls it
agental.jobs.calls("report")  # the calls refused in the last 7 days, with why
agental.jobs.triggers.delete("report", made.trigger.id)
  • A job is named by its id or its name. create() and update() take the fields by name, or the API's JSON as body, with what is named going over it; in body, "every": None clears it.
  • When a run finds the sandbox stopped, it starts it, runs, and stops it again when the command ends, keeping its disk: you pay for the minutes it runs. after="stop_with_memory" keeps its memory too. if_stopped="skip" runs only while it runs.
  • A sandbox someone started again, sent a command or moved the stop of meanwhile is left running.
  • Every minute at the most: for anything more often, leave the sandbox running and loop inside it. at runs it once, at a date and time; with no every, cron or at it runs only when asked.
  • With at, after="delete" deletes the sandbox once the run's command exits 0, whether the run started it or not; the run says so in deleted_sandbox. A run that fails, times out or does not run leaves it, so that it can be looked at. It takes a key that may delete the sandbox.
  • retries (0 to 5, 0 unless it says) tries a run that failed or ran out of time again, after 30 seconds, then 2 minutes, 8, 32 and about 2 hours. Each try is a run of its own: attempt is 1 for the first, and the one with no tries left is failed_for_good. A run that could not get a sandbox is tried again every 30 seconds within its timeout, its tries left as they were. A pause drops a retry that waits.
  • alerts says who is told when a run fails for good and when the job works again: "email", the default, mails its maker and the organization's owners and admins once a stretch of failures, again when it works, and when it pauses itself; "webhook" sends the events job.run_failed, with the last 4 KB of its output, and job.recovered; "both"; or "none". failing_since says when the stretch began, None while it works.
  • After 10 runs one after another fail for good, a job pauses itself and says why in paused_reason; resuming it clears that.
  • While a run still goes, the next is skipped. overlap="replace" stops it instead, "parallel" runs both.
  • A run gets 10 minutes unless timeout says, in seconds, up to six hours. One that could not be made on time is missed, and never made up later.
  • run(..., wait=SECONDS) raises AgentalTimeoutError for a run still going after that long; the run goes on. The API holds the call until the run ends, up to 90 seconds of it, and the run is read after that.
  • inputs are a job's variables, by name (upper-case letters, digits and underscores): a default, None for one a run must be given (only on a job that runs when asked), or {"default": ..., "secret": True} for one sealed where it is kept and shown as ••••, in output too. A run by the clock is given the defaults; run(job, inputs={...}) gives values over them, and a run says what it was given in inputs. One the job does not name is refused with unknown_input, and one it needs and was not given with input_required. run_again(job, run_id) runs it again with what that run was given.
  • put(name, ...) makes the job of that name, or changes it to exactly what it is given, whatever is left out going back to its default, and answers a JobPut: the job, created, and changed, False where it was that already. agental.jobs.usage() counts this month's runs and their running time by job.
  • A trigger is a job's HTTP address, url. A caller sends its secret as Authorization: Bearer, or signs the body with it: signature="github" takes X-Hub-Signature-256, "stripe" takes Stripe-Signature, and "hmac-sha256" an HMAC-SHA256 of the body in header (X-Signature unless it says). The secret is shown once, when it is made or rotated. The fields of a JSON body that the job names in its inputs are given to the run, and the whole request is a file its command reads at $AGENTAL_REQUEST. A call is answered at once with the run's id (respond="accepted"), or held until the run ends, up to 60 seconds ("wait"). An Idempotency-Key header, or GitHub's delivery id, makes a delivery sent twice in 24 hours one run. It takes rate_per_minute calls a minute, 60 unless it says. A run a call starts has started_by == "http". A call refused is listed by jobs.calls(job) for 7 days, with why.
  • On fresh sandboxes (template=), each run's sandbox is made running and deleted after a run that succeeds. After one that fails it is kept, stopped, until the run's keep_until (keep_failed_for, 24 hours unless it says, "0" to "7d"), so that it can be looked at, then deleted; keep_sandbox(job, run_id) keeps it for good. if_stopped and after are for a sandbox you keep, and are None on a fresh job. A run whose sandbox someone stopped or deleted while it ran is cancelled.
  • A template that jobs make their fresh sandboxes from is deleted only with template.delete(pause_jobs=True), which pauses them; without it the delete is refused with in_use_by_jobs.

Files

A path is relative to the work folder, /opt/agental, or absolute: anywhere on the machine, as root sees it. A file can be up to 10 MB.

sandbox.files.write("notes.txt", "hi")
sandbox.files.read("notes.txt")  # "hi"
sandbox.files.write("logo.png", data)  # bytes
sandbox.files.read_bytes("logo.png")
sandbox.files.read("/etc/hostname")

file = sandbox.files.get("notes.txt")  # path, bytes, modified_at, text
sandbox.files.write("notes.txt", "ho", if_modified_at=file.modified_at)  # file_changed if it was changed since

sandbox.files.list("/var/log")  # path, entries (name, kind, bytes, modified_at), truncated
sandbox.files.make_folder("out/today")
sandbox.files.move("notes.txt", "out/today/notes.txt")  # file_exists if something is there
sandbox.files.delete("out", recursive=True)

Stop, start, fork, snapshot

sandbox.stop()   # the disk is kept, what was running is not, and it costs 5% of the running price
sandbox.stop(keep_memory=True)  # or keep its memory too, at 10%: start() puts back every process as it was
sandbox.start()  # waits until it is running, also when it has to be brought back from storage

copy = sandbox.fork()  # a new sandbox with the same disk
live = sandbox.fork(memory=True)  # or one that goes on from where it was, every process running on (Firecracker boxes only)

snapshot = sandbox.snapshot("before-upgrade")
sandbox.restore(snapshot.id)  # roll the disk back
fresh = agental.sandboxes.create(snapshot_id=snapshot.id)

A snapshot's state is ready when it can be used. deleting is one whose delete was asked and is finishing by itself, and rolling_back is one a roll-back of its sandbox to an earlier snapshot is discarding: it is ready again, usually within a minute, if the roll-back was not made. Rolling back to one that is not ready, or making a sandbox from it, raises an ApiError with the status 409 and the code under_way.

Spot sandboxes

Half the list price, for work that is cheap to repeat: evals, batch jobs, test runs. A spot sandbox runs in room nobody else is paying for, and that room is taken back when a standard sandbox needs it.

from agental import Spot

sandbox = agental.sandboxes.create("eval-run", spot=Spot(on_reclaim="delete", warn_at=0.3))  # Spot() takes the defaults, "stop" and 0.5
sandbox.spot  # on_reclaim, warn_at, reclaim_chance; None on a standard sandbox
sandbox.update(spot=Spot(on_reclaim="delete"))
sandbox.update(spot=None)  # a standard sandbox, at the list price from now
  • on_reclaim is what is done when its room is taken back: "stop" keeps its disk, never its memory, and it starts again as spot; "delete" deletes it. One run lasts at most 24 hours, and is then stopped with its disk; to run longer, turn off spot.
  • reclaim_chance, 0 to 1, is its chance of being stopped in the next minute, worked out every minute while it runs. It is a hint, not a promise: a burst of starts can stop it within seconds. The event sandbox.reclaim_chance is sent when it crosses warn_at, up or down.
  • It is not counted in the plan's running count. Its starts count toward the free starts, and past them pay a burst fee at the spot price, half a standard start's. A create raises ApiError with spot_capacity_exceeded when no server in the region has spare room now (try again later), and spot_needs_top_up before the account's first payment. It never keeps its memory: stop(keep_memory=True) raises spot_keeps_no_memory.

Regions

A sandbox is made in one region and stays there. eu has servers in the European Economic Area or the United Kingdom; us and apac are the others, where they have servers.

from agental import ApiError

for region in agental.regions():  # the regions you can make sandboxes in now, the default first
    print(region.name, region.label, region.default, region.sizes_with_room)

sandbox = agental.sandboxes.create(region="eu")
sandbox = agental.sandboxes.create(region=["eu", "us"])  # the first of them that has room

try:
    agental.sandboxes.create(size="large", region="us")
except ApiError as error:
    if error.code != "capacity_exceeded":
        raise
    print(error.regions_with_room)  # where a sandbox of that size fits now, maybe []

Left out, a sandbox is made in the default region, or in the region of the snapshot it is made from. A full region raises an ApiError with the status 409 and the code capacity_exceeded, and the sandbox is not made anywhere else unless you named more than one region. regions_with_room says where it would fit now: create it again there.

When it stops

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases agental-sdk

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Vulnerability Insights

Compromised Claude Code extensions (versions 2.1.312 & 2.1.313) in Cursor try to install a backdoor

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229