What is Thinkwell?
Thinkwell is a TypeScript framework built to make scripting AI agents easy. With Thinkwell, you can write scripts that seamlessly combine traditional programming logic with the creative problem-solving capabilities of large language models. Your code stays in control while the AI handles the parts that benefit from reasoning and natural language understanding.How It Works
Thinkwell uses the Agent Client Protocol (ACP) to connect to AI agents like Claude Code, Codex, Gemini CLI, and others. This means you write one script and can run it against different AI backends. Here’s a simple example:Why Thinkwell?
Zero-config. Run TypeScript files directly withthinkwell script.ts. Schemas are generated on the fly.
Tools that just work. Give the agent access to your functions with a simple decorator pattern. Thinkwell handles the protocol details.
Agent-agnostic. Write your logic once, then swap between Claude Code, Codex, or other ACP-compatible agents without changing your code.
Type safety from end to end. Define your expected outputs as TypeScript interfaces and get compile-time checking plus runtime validation. No more hand-crafting MCP schemas or parsing prompt results.
