Skip to main content

Manav Python SDK

Official Python client for the Manav AI platform.

Install

pip install manav

Requires Python 3.9+.

Quick start

Generate an API key at platform.manavagi.com/settings/api-keys, then:

from manav import Client

client = Client(api_key="mnv_...")

# List your agents
agents = client.get("/api/agents")
print(agents)

# Send a message to an agent
response = client.post("/api/chat/dialogues/stream", json={
    "agent_name": "manav",
    "message": "What's on my task list today?",
})

Or set the API key via environment variable:

export MANAV_API_KEY=mnv_...
from manav import Client
client = Client()  # picks up MANAV_API_KEY automatically

Async usage

import asyncio
from manav import AsyncClient

async def main():
    async with AsyncClient(api_key="mnv_...") as client:
        agents = await client.get("/api/agents")
        print(agents)

asyncio.run(main())

Error handling

The SDK raises typed exceptions:

from manav import Client, AuthenticationError, RateLimitError, NotFoundError

client = Client(api_key="mnv_...")

try:
    result = client.post("/api/agents", json={"name": "my-bot"})
except AuthenticationError:
    print("Bad or expired API key")
except RateLimitError as e:
    print(f"Rate limited — retry after {e.retry_after} seconds")
except NotFoundError:
    print("Resource not found")

Exception hierarchy:

ManavError                    # root — catch-all
├── AuthenticationError       # 401 — bad/missing/expired API key
├── NotFoundError             # 404 — resource doesn't exist / no access
├── RateLimitError            # 429 — .retry_after has seconds
├── ValidationError           # other 4xx — bad payload
└── APIError                  # 5xx — unexpected server error

Every exception also exposes .status_code and .body for debugging.

Configuration

client = Client(
    api_key="mnv_...",
    base_url="https://api.manavagi.com",  # default
    timeout=30.0,                          # default (seconds)
    max_retries=2,                         # default — retries on 429/5xx
)

Retries

By default the SDK retries on 429 (rate limit) and 5xx (server error), honoring the Retry-After header when present and falling back to exponential backoff otherwise. Set max_retries=0 to disable.

Versioning

Follows semantic versioning. While the SDK is in 0.x, minor releases may include breaking changes — pin exact versions in production.

Development

git clone https://github.com/devsngh/manav-python.git
cd manav-python
pip install -e ".[dev]"
pytest

Regenerating the low-level API client

The low-level client under manav/_generated/ is regenerated from the live OpenAPI schema at https://api.manavagi.com/openapi.json:

openapi-python-client generate --url https://api.manavagi.com/openapi.json \
    --output-path manav/_generated \
    --overwrite

A weekly GitHub Actions workflow does this automatically and opens a PR when new endpoints appear.

License

MIT — see LICENSE.

Links

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

manav-0.1.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

manav-0.1.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file manav-0.1.0.tar.gz.

File metadata

  • Download URL: manav-0.1.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for manav-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c3d12fd760a72dcdeeaa27878e3ecc30a4fc257b1b5bcea08bd06c27521a0eb9
MD5 baec235ecb89fc4027b7745f8b90697e
BLAKE2b-256 8d9a7508be035409c9c56dc6048f6f7dd9a64ca3e53abea14c1dc014a9318560

See more details on using hashes here.

Provenance

The following attestation bundles were made for manav-0.1.0.tar.gz:

Publisher: publish.yml on devsngh/manav-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file manav-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: manav-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for manav-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 906fc2ae32394b4eca80f2e93237ea42834096544015afb56b67bd894a7e03f5
MD5 13be888e82d5d681e94a370dd54a40be
BLAKE2b-256 e0e2ad513ae69cd1525bccbc4c16f348a305d30c371f42f49dbb8707bcdfd138

See more details on using hashes here.

Provenance

The following attestation bundles were made for manav-0.1.0-py3-none-any.whl:

Publisher: publish.yml on devsngh/manav-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page