Metadata-Version: 2.4
Name: agtk
Version: 0.2.0
Summary: agtk (Agent Toolkit)
Project-URL: Homepage, https://github.com/Joilence/agent-toolkits
Project-URL: Repository, https://github.com/Joilence/agent-toolkits
Project-URL: Bug Tracker, https://github.com/Joilence/agent-toolkits/issues
Author: Jonathan Yang
License: MIT License
        
        Copyright (c) 2025 Jonathan Yang
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: agent,agentic,llm,mcp
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Utilities
Requires-Python: <3.14,>=3.12
Requires-Dist: anthropic>=0.51.0
Requires-Dist: fastmcp>=2.11.1
Requires-Dist: openai>=1.79.0
Requires-Dist: pip>=25.1.1
Requires-Dist: pluggy>=1.5.0
Description-Content-Type: text/markdown

# 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

<details>

<summary>Develop tools</summary>

```python
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()
```

</details>

<details>

<summary>Use for LLM calls</summary>

```python
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')
)
```

</details>

<details>

<summary>Use in MCP server</summary>

```python
from mcp import FastMCP
from somewhere import min_fs_toolkit

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

</details>

### As CLI

<details>

<summary>Standalone as MCP server</summary>

```bash
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
```

</details>

<details>

<summary>Use with <a href="https://github.com/simonw/llm">simonw/llm</a> (🚧WIP)</summary>

```bash
# install agtk
llm install llm-agtk

# install tools
agtk install <tool_name>

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

</details>

## Contributing

Feel free to submit issues and PRs.

## Credits

Heavily inspired by [simonw/llm](https://github.com/simonw/llm)
