kantan-agents-tools
A ready-to-use basic tool pack for kantan-agents (Web/Browser/FS/Exec).
All tool usage is controlled through tool_rules for consistent safety and reproducibility.
What problems it solves
- You need a ready-to-use set of basic tools for kantan-agents to start fast.
- Tool interfaces and configs vary across providers, increasing learning cost.
- Agents can accidentally touch unexpected paths, domains, or commands.
- It is hard to trace what ran and which limits were applied.
kantan-agents-tools bundles basic tools and centralizes allow/deny, input validation, and policy/limits under tool_rules
so you can safely repeat "research -> fetch -> operate -> edit -> execute".
Tool list
Web
kantan_web_search: return candidate URLs from searchkantan_web_fetch: fetch HTML/text from a URLkantan_web_extract: extract main text from HTML
Browser
kantan_browser_open: open dynamic pages and return apage_idkantan_browser_act: run actions like click/input/waitkantan_browser_extract: extract text/links/tables from DOM
FileSystem
kantan_fs_list: list directory entrieskantan_fs_search: search file contentskantan_fs_read: read a file safelykantan_fs_write: create/overwrite/append a filekantan_fs_apply_patch: apply a unified diff
Exec
kantan_shell_run: run a command
About the kantan stack
The kantan stack separates the LLM, agent runtime, tools, and your app into thin layers:
kantan-llm: minimal interface for LLM callskantan-agents: agent runtime andtool_rulesgovernancekantan-agents-tools: this basic tool pack- your app: workflow and domain logic
This separation keeps safety and reproducibility while allowing clean replacement and extension.
Install
# 基本ツールを追加 / Add core tools.
uv add kantan-agents kantan-agents-tools
# ブラウザ系ツールを使う場合 / When using browser tools.
uv add playwright
python -m playwright install chromium
Quick Start (Agent)
kantan-agents discovers tool providers via entry points.
Use tool_rules to allow tools and to configure validation + tool settings.
from kantan_agents import Agent, ToolRulesMode, get_context_with_tool_rules
agent = Agent(
name="tools-agent",
instructions="Use kantan_web_search to find references.",
model="gpt-5-mini", # モデルを明示 / Explicit model.
)
context = get_context_with_tool_rules(ToolRulesMode.RECOMMENDED) # 推奨ルールを作成 / Build recommended rules.
context["tool_rules"]["allow"] = ["kantan_web_search"] # 検索のみ許可 / Allow search only.
context["tool_rules"]["params"] = {
"kantan_web_search": {
"max_results": {"type": "integer", "minimum": 1, "maximum": 5}, # 入力バリデーション / Input validation.
"policy": {"allowed_domains": ["example.com"], "search_provider": "auto"}, # 許可ドメイン / Allowed domains.
"limits": {"max_fetch_bytes": 512000, "max_output_chars": 20000, "max_matches": 200}, # 出力上限 / Output limits.
"request_id": "req-001", # 追跡ID / Request ID.
}
}
result = agent.run("Search for kantan-agents.", context=context)
print(result["result"].final_output) # 結果を表示 / Print the result.
Notes:
tool_rules.paramsis used for both input validation and tool settings.- Reserved keys for tool settings:
policy/limits/tracer/request_id.
Direct Call (Non-agent)
from kantan_agents_tools import default_toolset
toolset = default_toolset()
print(toolset.fs_list("."))
Testing
uv run pytest
Docs
docs/tool_usage.mddocs/spec.mddocs/architecture.md
Release files for kantan-agents-tools 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kantan_agents_tools-0.1.2.tar.gz | 26.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kantan_agents_tools-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 53.2 kB
Release files / kantan_agents_tools-0.1.2.tar.gz
| Download URL | kantan_agents_tools-0.1.2.tar.gz |
|---|---|
| Size | 26.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d3b511a53d0d0f16cea0e0251dfa4a4d0ccf2e9922b6b22b226eec8bf60a1a25
|
|
BLAKE2b-256 checksum How to use checksums |
66795cf47c9840b904db56f76cbfb89d26b2bc43bd0a434242311d47650393bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / kantan_agents_tools-0.1.2-py3-none-any.whl
| Download URL | kantan_agents_tools-0.1.2-py3-none-any.whl |
|---|---|
| Size | 26.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0f32f0b09e096f351c343cac5a3c750c05aba9b07a73aec49ccbb0ac2d8f5039
|
|
BLAKE2b-256 checksum How to use checksums |
de1e036e64754bfb00e747b92c01e645332bb24b1a8f3b6525ef893d3caa581c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|