Skip to main content

trymockagent

Dependency-free Python client for the MockAgent API. Supports Python 3.9+.

After publishing the package, install it with:

pip install trymockagent
import os
import uuid

from trymockagent import MockAgent, MockAgentError

mock = MockAgent(
    tool_id="YOUR_TOOL_ID",
    api_key=os.getenv("MOCKAGENT_API_KEY"),  # optional unless the tool requires a key
)
run_id = str(uuid.uuid4())

try:
    result = mock.call({"user_id": "vip", "reason": "duplicate"}, run_id=run_id)
    print(result)
    # If this tool has final-answer QA criteria configured:
    qa = mock.submit_final_answer("The VIP refund was processed.", run_id=run_id)
    print(qa)
except MockAgentError as error:
    print(error.status, error.body, error.retryable, error.retry_after_seconds)
    raise

get_tool() fetches the tool's schema and description. call(arguments, run_id=...) posts JSON and forwards the run ID in x-mockagent-run-id. submit_final_answer(text, run_id=...) submits configured final-answer checks. No automatic retries are made; inspect the exception and follow the response's retry guidance. Set base_url for a self-hosted MockAgent instance.

Metadata

Release files for trymockagent 0.1.0

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

Source distribution (sdist)

Source distribution for trymockagent 0.1.0
File Size Uploaded Provenance Actions
trymockagent-0.1.0.tar.gz 3.0 kB Without provenance Details for trymockagent-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for trymockagent 0.1.0
File Interpreter ABI Platform Actions
trymockagent-0.1.0-py3-none-any.whl Python 3 none any Details for trymockagent-0.1.0-py3-none-any.whl

Total release size: 6.3 kB

Release files / trymockagent-0.1.0.tar.gz

Download URL trymockagent-0.1.0.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
818b38fd029d415f71b1b619c266b97183a76c6fde91452d803b7c0f2cde759a
BLAKE2b-256 checksum
How to use checksums
b35faf145883bdfc0c78c5a4d2963f97aeb39ffba29532d645d6f43c79fd52fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / trymockagent-0.1.0-py3-none-any.whl

Download URL trymockagent-0.1.0-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
acb204e8ef2cb780f14ababfcf34eafef6cf22c07ed393c2a14f446f48e2c02f
BLAKE2b-256 checksum
How to use checksums
c62894637a69d5e59b5f7edcf9886bc78bba1a0b87834e9fa78154486d9f1e67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Security for trymockagent 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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