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

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="minimax/minimax-m2:free",
        PardusAPI="pk_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.1.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.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pardusagnet-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 164aa1468c2a569676b4d24a6cfdea68837e308fc70ccac5de6b72949ede6025
MD5 8a1ba3a2ae806171fcf382b4310937aa
BLAKE2b-256 dcbc9cae906963aa1502306489a3213c1ca06a3cbeb295bd63e2246979adf2a8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pardusagnet-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 824f20eda8c5ac255a011bb4e1e4470a8f2af27504f51c41f8a1e8a3ce41d1d3
MD5 5313855526eab169582de759fc6886d9
BLAKE2b-256 23fadd7b568ed01f09507fe256c656936623e3f8fa8d9ad49f8e90a62bb548e8

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