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

Uploaded Python 3

File details

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

File metadata

  • Download URL: servants-0.1.7.tar.gz
  • Upload date:
  • Size: 6.2 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.7.tar.gz
Algorithm Hash digest
SHA256 985c00bec121ce90f3c3ae60dd7e8fb26c25e523260edbcc98394e0f0fbb1b9e
MD5 f6983303532582e469af8bedf55eebc2
BLAKE2b-256 f288878df12f72da08d07430be036315e984c3b0a5f6024b010ddea021405027

See more details on using hashes here.

File details

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

File metadata

  • Download URL: servants-0.1.7-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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a8062ef6b751e08c1e3731110a4db5b0df49b9ca2b226982b24b0c48df1c7830
MD5 7632ffc18b4d0fdc2ddb40a6e3723383
BLAKE2b-256 fa03fc7a53b3e104da2eb5fcbd40a9cffbc85b3e42285430e04317a3ec120623

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