Skip to main content

The simplest agent library you have ever seen

Project description

PardusAgent

A Python client library for building AI agents with tool-calling capabilities powered by Pardus AI.

Quick Start

To get API key visit http://pardusai.org/ !

Installation

pip install pardusagnet

Basic Usage

import asyncio
from pardusagnet import Tool, Agent


def add(a: int, b: int) -> int:
    """Add two integers together"""
    return a + b


def minus(a: int, b: int) -> int:
    """Subtract b from a"""
    return a - b


async def main():
    agent = Agent(
        tools=[Tool(add), Tool(minus)],
        models="glm-4.5",
        PardusAPI="pk_your_api_key_here" # better export PARDUS_API_KEY="YOUR API KEY HERE"
    )
    
    result = await agent.run("Calculate 100 minus 42")
    
    print(result['text'])
    for tool_result in result['tool_results']:
        print(f"{tool_result['name']}: {tool_result['result']}")


asyncio.run(main())

Configuration

  • API Key: Set via PardusAPI parameter or PARDUS_API_KEY environment variable
  • Server URL: Default is pardusai.org, customize with base_url parameter
  • Model: Any model supported by Pardus AI (e.g., minimax/minimax-m2:free)

Example

See the complete example in examples/simple_agent.py

python examples/simple_agent.py

Project details


Download files

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

Source Distribution

pardusagnet-0.1.2.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

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

pardusagnet-0.1.2-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file pardusagnet-0.1.2.tar.gz.

File metadata

  • Download URL: pardusagnet-0.1.2.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pardusagnet-0.1.2.tar.gz
Algorithm Hash digest
SHA256 dd2f058e4cf2dc6934e9094b5bc619f33415a17330ba6061f3362231a11a8c8e
MD5 fda8a4d90195ad6c791a4101fb340ec3
BLAKE2b-256 3a8909daee93056c14d2eee5b552d275e2fd714ae3cd2c5e761256836dd2d1fb

See more details on using hashes here.

File details

Details for the file pardusagnet-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pardusagnet-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pardusagnet-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d9650a3643ba418999ace7e371b174cd9901bb61a8c82d1104c13b8e47187847
MD5 b8f8957c95bfbfd542ce1ac3a0783035
BLAKE2b-256 acda0a3c37414a30f511cb36a16015311f23992e84c03614faee63157f5284aa

See more details on using hashes here.

Supported by

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