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

Uploaded Python 3

File details

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

File metadata

  • Download URL: agtk-0.2.0.tar.gz
  • Upload date:
  • Size: 127.2 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.0.tar.gz
Algorithm Hash digest
SHA256 9dc6ee689e946a41fea136a02169d868ca1e0e1d3984a0934b83e078a6a148d6
MD5 3688b3525f880a2b6828d225ed2dab65
BLAKE2b-256 28de4302b9927272c4e94a446d19a5fbbbf65cd40c48e48364a8521da8d4362f

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: agtk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 146.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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a64e9f7e037019ee7cf61f2db2dd761237b2b000d70cbd76f96c31ef73cb738e
MD5 df2f50b1c32fe574f05dbe1f0869265f
BLAKE2b-256 6ea66ade0567833133f80cf5a73fd9ee9103394eef90feb032234216e8b68b7d

See more details on using hashes here.

Provenance

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