AgentRunner
Run model tool calls and resume checkpointed human interactions.
Features
- Run model tool calls and resume checkpointed human interactions.
- Supports Python 3.10 through 3.12.
Installation
uv add swarmauri_agent_runner
pip install swarmauri_agent_runner
Usage
from swarmauri_agent_runner import AgentRunner
from swarmauri_runstore_sqlite import SqliteRunStore
from swarmauri_standard.tool_llms.OpenAIToolModel import OpenAIToolModel
model = OpenAIToolModel(api_key="your-api-key")
runner = AgentRunner(model, SqliteRunStore(path="runs.db"))
state = runner.start("Ask me which package to inspect.")
if state.status == "input_required":
from swarmauri_standard.messages.AnswerMessage import AnswerMessage
question = state.event().question
reply = AnswerMessage(question_id=question.question_id, answer=input(question.content))
state = runner.resume(state.run_id, reply)
Reopen the same SQLite database and configure the same model and tools to resume a pending question or approval in another process. The application authenticates the caller before exposing a run or accepting a decision. Set a stable approval scope that identifies the workspace and permissions. A run interrupted during tool dispatch records that state for reconciliation. Runtime tool instances and open process handles live in the application process.
Tool approvals and run stores
Install swarmauri-runstore-sqlite to run the SQLite example. The runner
accepts an IRunStore and an OpenAI or Gemini tool model. Existing
OpenAI-shaped model callables and legacy typed run stores remain supported.
Set approval_policy(tool, arguments) to return "ask" for calls that
need review and configure an approval_scope. Render state.event() in your
application, then submit the authorized reviewer’s decision.
from swarmauri_agent_runner import ApprovalDecision
state = runner.decide(
run_id,
ApprovalDecision(approval_id=approval_id, approved=True),
)
Use runner.load(run_id) to retrieve typed state from a reopened database.
state.approval_requests and state.approval_decisions retain the information
needed to render resolved approval cards. Tool execution status is separate.
When a process stops during tool dispatch, reconcile the external side effect
before recovering the run.
Existing SQLite databases work with the standalone adapter. The old
swarmauri_agent_runner.SqliteRunStore import accepts and returns typed
RunState objects. Install swarmauri_agent_runner[sqlite] to use that
compatibility wrapper.
Metadata
Release files for swarmauri_agent_runner 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| swarmauri_agent_runner-0.1.1.tar.gz | 10.6 kB | Without provenance | Details for swarmauri_agent_runner-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| swarmauri_agent_runner-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for swarmauri_agent_runner-0.1.1-py3-none-any.whl |
Total release size: 24.9 kB
Release files / swarmauri_agent_runner-0.1.1.tar.gz
| Download URL | swarmauri_agent_runner-0.1.1.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
743af070af643ba4f470bb1babf9b3ea6e0172bd7f74a5e06648edf7af97edbd
|
|
BLAKE2b-256 checksum How to use checksums |
d988fd56198ea819d2e10d7f366e4700976411cff4688461368ce47c150f6ab5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / swarmauri_agent_runner-0.1.1-py3-none-any.whl
| Download URL | swarmauri_agent_runner-0.1.1-py3-none-any.whl |
|---|---|
| Size | 14.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e2f14629dc51470b6447bfa011c38d2335f468eed73f826e134e9ba0d0ee6233
|
|
BLAKE2b-256 checksum How to use checksums |
cf4e139968481d2435f732f19d43a59b21df15a73af00196fc7dcdad5fd48b63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for swarmauri_agent_runner 0.1.1
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.