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.5.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.5-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: servants-0.1.5.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.5.tar.gz
Algorithm Hash digest
SHA256 f30c4b5236416a11f2646ca9a9d3776bd28aa96198ffd4c8cc0e0be4593e9be1
MD5 3fbdcbbaf22dbbc476700da091d18788
BLAKE2b-256 37a2c04acd114d20f0a569d432ad2bd9d4b062cc458d0b114daeba4ebc7cc737

See more details on using hashes here.

File details

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

File metadata

  • Download URL: servants-0.1.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 afd4ac45c47a5c18c979d7f344a6acfcf30e00b2a52bb31896e5661a49737ca5
MD5 486ae8f28da4406c4df023b010497b21
BLAKE2b-256 82515e9473d36f8df1574488e5bd4b7060ab9f7501fc64218e5918840832b22d

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