Skip to main content

ToolMate-SDK: a software developement kit for developing agentic AI applications that support 13 LLM backends and integrate tools and agents. (Developer: Eliran Wong)

Project description

# ToolMate AI - SDK

ToolMate-SDK: a software developement kit for developing agentic AI applications that support 13 LLM backends and integrate tools and agents. (Developer: Eliran Wong)

Supported backends: anthropic, azure, custom, deepseek, genai, github, googleai, groq, llamacpp, mistral, ollama, openai, vertexai, xai

# A Sibling Project

This SDK incorporates the best aspects of our favorite project, [Toolmate AI](https://github.com/eliranwong/toolmate), to create a library aimed at further advancing the development of AI applications.

# Supported backends

anthropic - [Anthropic API](https://console.anthropic.com/)

azure - [Azure OpenAI API](https://learn.microsoft.com/en-us/azure/ai-services/openai/reference)

custom - any openai-compatible backends

deepseek - [DeepSeek API](https://platform.deepseek.com/)

genai - [Vertex AI](https://cloud.google.com/vertex-ai) or [Google AI](https://ai.google.dev/)

github - [Github API](https://docs.github.com/en/github-models/prototyping-with-ai-models#experimenting-with-ai-models-using-the-api)

googleai - [Google AI](https://ai.google.dev/)

groq - [Groq Cloud API](https://console.groq.com)

llamacpp - [Llama.cpp Server](https://github.com/ggerganov/llama.cpp) - [locat setup](https://github.com/ggerganov/llama.cpp/blob/master/docs/build.md) required

mistral - [Mistral API](https://console.mistral.ai/api-keys/)

ollama - [Ollama](https://ollama.com/) - [local setup](https://ollama.com/download) required

openai - [OpenAI API](https://platform.openai.com/)

vertexai - [Vertex AI](https://cloud.google.com/vertex-ai)

xai - [XAI API](https://x.ai/api)

For simplicity, toolmate-sdk uses ollama as the default backend, if parameter backend is not specified. Ollama models are automatically downloaded if they have not already been downloaded.

# Installation

Basic:

> pip install –upgrade toolmate-sdk

Basic installation supports all AI backends mentioned above, except for vertexai.

Extras:

We support Vertex AI via [Google GenAI SDK](https://pypi.org/project/google-genai/). As this package supports most platforms, except for Android Termux, we separate this package google-genai as an extra. To support Vertex AI with toolmate-sdk, install with running:

> pip install –upgrade toolmate-sdk[genai]

# Usage

This SDK is designed to provide a single function for interacting with all AI backends, delivering a unified experience for generating AI responses. The main APIs are provided with the function generate located in this [file](https://github.com/eliranwong/toolmate-sdk/blob/main/toolmate_sdk/__init__.py#L29).

Find documentation at https://github.com/eliranwong/toolmate-sdk/blob/main/docs/README.md

# Examples

The following examples assumes [Ollama](https://ollama.com/) is [installed](https://ollama.com/download):

To import:

> from toolmate_sdk import generate

To generate, e.g.:

> generate(“What is AI?”)

> generate(“What is ToolMate AI?”, tool=”search_google”)

> generate(“How many ‘r’s are there in the word ‘strawberry’?”, tool=”task”)

> generate(“What time is it right now?”, tool=”task”)

> generate(“Open github.com in a web browser.”, tool=”task”)

> generate(“Convert file ‘music.wav’ into mp3 format.”, tool=”task”)

> generate(“Send an email to Eliran Wong at eliran.wong@domain.com to express my gratitude for his work.”, tool=”send_gmail”)

> generate(“Is it better to drink wine in the morning, afternoon, or evening?”, context=”reflect”, stream=True)

> generate(“Is it better to drink wine in the morning, afternoon, or evening?”, context=”think”, follow_up_prompt=[“review”, “refine”], stream=True)

> generate(“Provide a detailed introduction to generative AI.”, system=[“create_agents”, “assign_agents”], follow_up_prompt=”Who is the best agent to contribute next?”, stream=True, model=”llama3.3:70b”)

To work collaboratively with different backends, e.g.

> messages = generate(“What is the most effective method for training AI models?”, backend=”openai”) > messages = generate(messages, backend=”googleai”, follow_up_prompt=”Can you give me some different options?”) > messages = generate(messages, backend=”xai”, follow_up_prompt=”What are the limitations or potential biases in this information?”) > generate(messages, backend=”mistral”, follow_up_prompt=”Please provide a summary of the discussion so far.”)

As you may see, the generate function returns the messages list, which is passed to the next generate function in turns.

Therefore, it is very simple to create a chatbot application, you can do it as few as five lines or less, e.g.:

> messages = [{“role”: “system”, “content”: “You are an AI assistant.”}] > user_input = “Hello!” > while user_input: > messages = generate(messages, follow_up_prompt=user_input, stream=True) > user_input = input(“Enter your query:n(enter a blank entry to exit)n>>> “)

These are just a few simple and straightforward examples. You may find more examples at:

https://github.com/eliranwong/toolmate-sdk/tree/main/toolmate-sdk/examples

# TODO

  • add documentation about tool creation

  • add examples

  • convert availble ToolMate AI tools into tools that runable with this SDK

  • added built-in system messages

  • added built-in predefined contexts

  • added built-in prompts

  • add cli options for running simple inference, tools or testing

  • improve code generation handling

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

toolmate_sdk-0.0.14.tar.gz (45.4 kB view details)

Uploaded Source

Built Distribution

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

toolmate_sdk-0.0.14-py3-none-any.whl (61.8 kB view details)

Uploaded Python 3

File details

Details for the file toolmate_sdk-0.0.14.tar.gz.

File metadata

  • Download URL: toolmate_sdk-0.0.14.tar.gz
  • Upload date:
  • Size: 45.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for toolmate_sdk-0.0.14.tar.gz
Algorithm Hash digest
SHA256 23a35a3fa4000799c507977b7966818670cba02f4a00114485079d9cebc189e1
MD5 41c29aa1613340e30f20bd150daeaabc
BLAKE2b-256 b503e6dd34fdeed690ffc00e677042b0adedaec6b6c0cd9758a44d8ba5866ef8

See more details on using hashes here.

File details

Details for the file toolmate_sdk-0.0.14-py3-none-any.whl.

File metadata

  • Download URL: toolmate_sdk-0.0.14-py3-none-any.whl
  • Upload date:
  • Size: 61.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for toolmate_sdk-0.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 c5a8881bb421875b2c8e64ca4733fad30e0fb08e5227aab8249814994de4869a
MD5 65e3e8c4640846730d027b8c2c842b68
BLAKE2b-256 7ab438f6394191bc98b05068aa04ff0e2d3bf203602b6c0ca9565677e350f3e9

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