Skip to content

Release Notes — chak 0.3.5

Choose a tag to compare

@zhixiangxue zhixiangxue released this 28 Apr 06:16
· 20 commits to main since this release

Release Notes — chak 0.3.5

New: SQL Tool

Query and modify SQLite, PostgreSQL, and MySQL databases directly from an agent conversation.
The DB URI is passed per-call, so the LLM can work with any number of databases in a single conversation.

from chak.tools.std import SQL

conv = chak.Conversation(
    "anthropic/claude-sonnet-4-6",
    api_key="...",
    tools=[SQL()],
)
response = await conv.asend(
    "List the tables in sqlite:///shop.db and show me the 10 most recent failed orders."
)

Four methods: tables(uri)schema(uri, table)query(uri, sql)execute(uri, sql).
SQLite needs no extra deps (built-in). PostgreSQL: pip install psycopg2-binary. MySQL: pip install pymysql.

New: Excel Tool

Read and write .xlsx and .csv spreadsheets. File path is passed per-call.

from chak.tools.std import Excel

conv = chak.Conversation(
    "anthropic/claude-sonnet-4-6",
    api_key="...",
    tools=[Excel()],
)
response = await conv.asend(
    "Read ./sales.xlsx, find all entries not updated in the last 10 days, and write a summary sheet."
)

Three methods: sheets(path)read(path, sheet)write(path, data, sheet).
Requires: pip install openpyxl (or pip install chakpy[tools]).

FileSystem Enhancements

Three new methods on FileSystem:

  • move(src, dst) — move or rename files and directories (cross-platform via shutil.move)
  • find(path, pattern, file_type) — recursive glob search for files or directories
  • grep(path, pattern, file_pattern) — regex search across file contents, returns file:line: content format

All three use Python stdlib — no extra dependencies.

Other Changes

  • examples/tool_calling_std.py: updated to cover all 10 built-in tools, including sql and excel demo modes.
  • pyproject.toml [tools] extra: openpyxl>=3.1.0 added.