Skip to main content

A simple library for prototyping and learning agent-based reasoning with tools.

Project description

servants

A simple Python library for prototyping and learning agent-based reasoning with tools.

This package helps you quickly prototype agent architectures that use tools (functions) and step-by-step reasoning. It is designed for educational and experimental purposes, not for production use.

Installation

pip install servants

Usage

from servants import Tool

def get_weather(city: str) -> str:
    """Gets the current weather for a given city."""
    if "london" in city.lower():
        return "Rainy"
    elif "paris" in city.lower():
        return "Sunny"
    else:
        return "Cloudy"

tool = Tool(get_weather, "get_weather", "A tool to get the current weather for a city.")
schema = tool.build_tool_schema()
print(schema)

What does it do?

  • Automatically generates a JSON schema for any Python function's parameters and types.
  • Makes it easy to describe agent tools and methods for LLMs or other automation systems.
  • Minimal, easy-to-use API.

Note

This library is intended for prototyping and learning. For production-grade agent frameworks, see LangChain or similar projects.

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

servants-0.1.6.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.

servants-0.1.6-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file servants-0.1.6.tar.gz.

File metadata

  • Download URL: servants-0.1.6.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for servants-0.1.6.tar.gz
Algorithm Hash digest
SHA256 4ea817f8638e85ba66aec3d3b43d67229de6fc846ea3701c2b08de70b07c4e41
MD5 54491e28621ba0b5b1c06ad8925cfc34
BLAKE2b-256 ab987b1f23b1df329f496309654824016dc11a2c8c7f54bd01a0a048d40d1baa

See more details on using hashes here.

File details

Details for the file servants-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: servants-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for servants-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 40c0438fced3bffbb33ce9f5168ce2846f56c9dfd02671ef64d34023f513d087
MD5 0ca069af8aee5119bc4d46b6b1b9c84a
BLAKE2b-256 6aa60a62e6b6eac5718718aee755dacd267bbcbe200f14324c8c5dd38f6cb0da

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