Skip to main content

agtk (Agent Toolkit)

Project description

agtk (Agent Toolkit)

  • A minimal library to let you focus on building LLM tools. It automatically enables the tools to be used by LLM calls, MCP clients, etc.
  • A minimal CLI to install tools and run as MCP server.

Usage

As Package

Develop tools
import agtk

class MinimalFsToolkit(agtk.Toolkit):

    @agtk.tool_def(
        name="read_file",
        description="Read content from a file"
    )
    def read_file(self, file_path: str):
        return open(file_path).read()

    @agtk.tool_def(
        name="write_file",
        description="Write content to a file"
    )
    def write_file(self, file_path: str, content: str):
        with open(file_path, "w") as f:
            f.write(content)

min_fs_toolkit = MinimalFsToolkit()
Use for LLM calls
import litellm
from somewhere import min_fs_toolkit

response = litellm.completion(
    model='openai/gpt-4o-mini',
    messages=[
        { "role": "user",  "content": "hi there, what tools do you have?"}
    ],
    tools=min_fs_toolkit.as_params('openai')
)
Use in MCP server
from mcp import FastMCP
from somewhere import min_fs_toolkit

# Use in mcp
mcp = FastMCP()
min_fs_toolkit.register(mcp)
mcp.run()

As CLI

Standalone as MCP server
uv tool install git+https://github.com/Joilence/agent-toolkits

# Check commands
agtk --help

# Install a tool (uses pip install under the hood)
agtk install <package_name_or_git_url>

# List installed tools
agtk list
# List installed tools with details (description and parameters)
agtk list --detail

# Start MCP server with installed tools
agtk mcp
Use with simonw/llm (🚧WIP)
# install agtk
llm install llm-agtk

# install tools
agtk install <tool_name>

# use tools
llm --agtk "what tools do you have?"

Contributing

Feel free to submit issues and PRs.

Credits

Heavily inspired by simonw/llm

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

agtk-0.2.1.tar.gz (131.4 kB view details)

Uploaded Source

Built Distribution

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

agtk-0.2.1-py3-none-any.whl (151.0 kB view details)

Uploaded Python 3

File details

Details for the file agtk-0.2.1.tar.gz.

File metadata

  • Download URL: agtk-0.2.1.tar.gz
  • Upload date:
  • Size: 131.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agtk-0.2.1.tar.gz
Algorithm Hash digest
SHA256 54a0c7c704496f3e4286ea535fcfe2be76352de507a6c11f1188c761edd2a4e9
MD5 ee3b6ac694192da7bf72af8e74347c34
BLAKE2b-256 c67b4a3b7f4afcae78eea4554d4ffb83ebf798805b197728b629d46060a336ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for agtk-0.2.1.tar.gz:

Publisher: publish.yml on Joilence/agent-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agtk-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: agtk-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 151.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agtk-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aebc195bcf75130d718021d65800bba34b5a9c91e5e3355f5da070b247fa30bd
MD5 7596eea7767bd8a77b74e6866a531095
BLAKE2b-256 a6be03d9c204f7418f5973ebfde024c6b79af2bf282147d03524778498724a46

See more details on using hashes here.

Provenance

The following attestation bundles were made for agtk-0.2.1-py3-none-any.whl:

Publisher: publish.yml on Joilence/agent-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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