Skip to main content

nagent

Run your Nagent agents from Python. A thin client over the Nagent REST API (/api/v1), standard library only, Python 3.9 and later.

pip install nagent

Create an API key in Nagent at Settings, API & MCP (https://nagent.ai/admin/settings/api) and set it as NAGENT_API_KEY.

import os
from nagent import Nagent

nagent = Nagent(api_key=os.environ["NAGENT_API_KEY"])

# A finished run
run = nagent.runs.create("nora", input="Research retail-1.example")
print(run["status"], run["output"])

# A long run: accepted at once, then waited on
accepted = nagent.runs.create("nora", input="Audit retail-1.example", wait=False)
run = nagent.runs.wait(accepted["id"])

# A conversation: the same session_id carries the earlier turns
nagent.runs.create("nora", input="And their competitors?", session_id="crm-4711")

# Approvals, every page
for approval in nagent.approvals.iter():
    print(approval["id"], approval["action"])

Verify a webhook delivery with the raw body:

from nagent import verify_webhook

ok = verify_webhook(os.environ["NAGENT_WEBHOOK_SECRET"], request.headers, request.get_data())

Every method maps to one operation in /api/v1/openapi.json. Errors raise NagentError with status, code, the problem document and the request id. Full reference: https://nagent.ai/developers

Metadata

Release files for nagent 1.0.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 nagent 1.0.0
File Size Uploaded Provenance Actions
nagent-1.0.0.tar.gz 6.1 kB With provenance Details for nagent-1.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 12.4 kB

Release files / nagent-1.0.0.tar.gz

Download URL nagent-1.0.0.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
211df3c514e8d4be50aae445bbc472c76afe5d78b5e215c9c16d394ec2b0d619
BLAKE2b-256 checksum
How to use checksums
3f86d264cb301cdbc9f721622139ed3d282707ed5c94d990733948dfc243415f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 15, 2026.

Transparency log

Release files / nagent-1.0.0-py3-none-any.whl

Download URL nagent-1.0.0-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
32eae0d276290cefb22418eeebe34e5f23d52d62348287e2fafa4fad32bbdb71
BLAKE2b-256 checksum
How to use checksums
1ed9ae78ea3d579709bb433744d2e2441e15801470570f23f7840a3717111e7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 15, 2026.

Transparency log

Security for nagent 1.0.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nagent-1.0.0.tar.gz

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 Oct 15, 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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files Full 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