Skip to content

Release Notes - v0.3.2

Choose a tag to compare

@zhixiangxue zhixiangxue released this 22 Apr 05:53
· 23 commits to main since this release

chakpy 0.3.2 Release Notes

Date: 2026-04-22


1. Built-in Standard Tools (chak.tools.std)

chak now ships 7 atomic tools out of the box. Import and pass them directly into tools=[] — no wrapping, no extra setup required.

from chak.tools.std import Bash, Python, FileSystem, Web, Search, Http, Pdf
Tool Class What it does
Shell Bash Run shell commands (PowerShell on Windows, bash on Unix)
Code Interpreter Python Execute Python snippets in the active venv
File System FileSystem Read, write, edit, list, search, and delete files/directories
Web Web Fetch and parse web pages (Firecrawl → Jina → httpx fallback)
Search Search Search the web (Tavily → Brave → DuckDuckGo fallback)
HTTP Client Http Full HTTP client — GET / POST / PUT / PATCH / DELETE
PDF Pdf Extract text and tables from PDFs (local path or URL)

These tools are intentionally minimal and composable. Mix them freely with custom tools.

Migration note: Bash and Python were previously importable from chak.tools.exec. They have moved to chak.tools.std. Update your imports:

# Before
from chak.tools.exec import Bash, Python

# After
from chak.tools.std import Bash, Python

Security: Bash now supports three layers of access control via constructor parameters:

  • deny_patterns — block dangerous commands by regex (e.g. rm -rf)
  • sensitive_files — block commands referencing sensitive filenames (e.g. .env, id_rsa)
  • working_dir — restrict path access to a specific directory; blocks traversal and absolute paths outside it

All three default to a conservative built-in list. Pass deny_patterns=[] or sensitive_files=[] to disable.


2. Tool call results now carry attachments

When a tool returns one or more attachment:// URIs, chak automatically resolves them into typed Attachment objects (PDF, Image, DOC, etc. based on file extension) and attaches them to the resulting AIMessage.attachments.

This means HumanMessage.attachments (user-provided files) and AIMessage.attachments (tool-produced files) share the same type signature — no extra field, no special handling needed.

Attachment base class also gains a link property for canonical rendering:

att.link  # "[attachment://https://s3.amazonaws.com/bucket/report.pdf]"

3. Conversation persistence

Conversation now supports serializing and restoring message history:

# Save
data = conv.dump()

# Restore
conv2 = chak.Conversation("openai/gpt-4o", api_key="...")
conv2.load(data)

Useful for resuming sessions, persisting history to storage, or transferring state between processes.


4. Bug fixes

  • ClaudeSkill + returns= conflict: Resolved a mutual exclusion issue where using ClaudeSkill and returns= together caused incorrect execution ordering. Fixed via two-phase execution.
  • Bash encoding: Fixed a character encoding issue on Windows that caused garbled output in certain shell command results.