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

Uploaded Python 3

File details

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

File metadata

  • Download URL: agtk-0.1.0.tar.gz
  • Upload date:
  • Size: 113.5 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.0.tar.gz
Algorithm Hash digest
SHA256 a61baa8e868a72476175809f73f32d9f0a2ac0b0a4dfec529190bc315fea0b1e
MD5 ffc96a207f3af9de14d70e425101de4d
BLAKE2b-256 51df868dec8edb496b1773c17c053738a1e100522f0d55c531af0a0f36b32a21

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: agtk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 131.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c6ddbdec8b262fcb971383108f3bd09071678c865143260f69adb336a4fe976
MD5 2fe4bc4628270d1a1786b0b35544a950
BLAKE2b-256 2895db570f7c5b9242bf020388471b0e1c69556a56589c4c49543022baec46b5

See more details on using hashes here.

Provenance

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