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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for agtk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1dcb6a300ced8c534a78978e7b7e662382224663bbd94524ea785b7971f0faff
MD5 208d693dd6d90b8e8d963b75680e9dd1
BLAKE2b-256 61fbff6b421f4e754ee8e30f6fc5083dadfcfeb940a945001e66016587bb1947

See more details on using hashes here.

Provenance

The following attestation bundles were made for agtk-0.1.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.1.1-py3-none-any.whl.

File metadata

  • Download URL: agtk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 145.5 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 14eff9fd935d19359878bcd442fcb90aaf5be0567499af95f7ea56ac8b4313ce
MD5 26bd179216bba32c7a52f575a9097b53
BLAKE2b-256 86206487b15f1a6579abac38153e30e1c54fdd05b5b1f31a208fa4092cf60f37

See more details on using hashes here.

Provenance

The following attestation bundles were made for agtk-0.1.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