Simon Willison Blog の llm-coding-agent 0.1a0 リリース
Simon Willison が自身の LLM ライブラリを基盤に、Claude Code スタイルのコーディングエージェント「llm-coding-agent」を実験的にリリースし、その開発プロセスと機能を紹介した。
キーポイント
AI による自己開発の実証
Simon Willison が AI エージェント(Claude Code)にプロジェクトの仕様作成から TDD による実装までを指示し、実際にコードベースを生成させた事例。
具体的なツール機能の提供
ファイル編集(文字列置換)、シェルコマンド実行など、コーディングエージェントとして必要な基本ツールが実装された。
Python API と CLI の公開
PyPI にプレリリース版が公開され、CLI コマンドや Python クラス(CodingAgent)を用いたプログラムからの利用が可能になった。
影響分析・編集コメントを表示
影響分析
このニュースは、LLM を単なるチャットボットとしてではなく、自律的にソフトウェアを開発・実行するエージェントとして機能させるための具体的なアーキテクチャと実装例を示した点で重要です。特に、開発者自身が AI に開発を依頼し、その成果物を即座に公開・評価できる「AI による自己進化」のプロセスは、今後開発ワークフローがどう変わるかを示唆しています。
編集コメント
開発者が AI に開発を任せるという「メタ開発」の実例であり、LLM エージェントの自律性と実用性の限界と可能性を浮き彫りにする興味深いケーススタディです。
リリース: llm-coding-agent 0.1a0
これは Fable 5 の別の実験です。私の LLM ライブラリ がよりエージェントフレームワークへと進化を遂げた今、それを基盤としたシンプルなコーディングエージェントがどのようなものかを見てみる時が来ました。
私は python-lib-template-repository GitHub テンプレートリポジトリを使用して、新しい Python ライブラリ を作成し、以下の 2 つのプロンプトを実行しました(Claude Code for web のトランスクリプトはこちら):
このプロジェクトのための spec.md を記述してください - これは PyPI からの最新の「llm」アルファ版に依存し、ファイルの読み取りと編集、コマンドの実行を行うツールを備えた、Claude Code スタイルのコーディングエージェントを実装します。
次に:
spec ファイルをコミットし、その後、合理的な一連のコミット(それぞれに合格するテストと更新されたドキュメントを含む)を用いて red/green TDD で構築してください - 環境内の OpenAI API キーを使用して、時々手動でテストしてください。
これが 結果として得られた README ファイル と コミットのシーケンス です。
私は slop-alpha を PyPI にリリースしましたので、新しいエージェントは以下のように実行できます:
uvx --prerelease=allow --with llm-coding-agent llm code
初回試行としてはかなり良い出来です!以下は、Fable で作成された README です。ここでは llm code --yolo や llm code --allow "pytest*" --allow "git diff*" といったレシピの一覧が記載されています。
また、この README では、私が要求したわけではないものの実装されていて大変嬉しく思っている CodingAgent(model="gpt-5.5", root="/path", approve=True).run("Fix the failing test in tests/test_parser.py") クラスを中心とした Python API も紹介されています。
以下は、そのエージェントが実装したツール群のリストです(uvx ... llm tools コマンドで表示):
CodingTools_edit_file(path: str, old_string: str, new_string: str, replace_all: bool = False) -> str
ファイル内の正確な文字列を置換します。
old_string は、空白文字も含めてファイルの内容と完全に一致している必要があり、replace_all が true でない限り一意の場所を特定する必要があります。変更の差分(diff)を返すため、検証が可能になります。
CodingTools_execute_command(command: str, timeout: int = 120) -> str
セッションのルートディレクトリでシェルコマンドを実行します。
標準出力と標準エラーを結合した結果に、終了コードの行を続けて返します。timeout は秒単位(最大 600)です。タイムアウトが発生した場合、プロセスツリー全体が強制終了されます。
CodingTools_list_files(pattern: str = '**/*', path: str = '.') -> str
glob パターンに一致するファイルを一覧表示し、新しい順に並べます。
隠しディレクトリ、node_modules、__pycache__、および git リポジトリ内では .gitignore でカバーされているファイルをスキップします。検索ディレクトリからの相対パスを最大 200 件まで返します。
CodingTools_read_file(path: str, offset: int = 0, limit: int = 2000) -> str
テキストファイルを読み取り、cat -n のように行番号付きで返します。
パスはセッションルート相対です。一度に読み込めないほど大きなファイルをページ表示するために、offset(0 ベースの最初の行)と limit(最大行数)を使用してください。
CodingTools_search_files(pattern: str, path: str = '.', glob: str = None, max_results: int = 100) -> str
ファイル内容から正規表現を検索します。
一致結果を path:line_number:line の形式で返し、max_results で上限を設定します。検索対象ファイルを制限するには glob(例:"*.py")を使用してください。
CodingTools_write_file(path: str, content: str) -> str
指定された内容でファイルを作成または上書きします。
必要な場合は親ディレクトリも作成されます。既存ファイルの修正には edit_file を優先して使用してください。
llm code --yolo を実行し、その後以下のようにプロンプトを入力して試してみました:
mkdir /tmp/demo と実行し、そのフォルダ内で ASCII アートで時刻を表示するシンプルな SwiftUI CLI アプリを作成してください
こちらがそのトランスクリプトです。ここでは GPT-5.5 の推論ノートで「SwiftUI は真の CLI には適さない」と指摘された後、swift run AsciiTime で以下を出力するアプリが構築されています:
█ █████ ████ █ █ ███
██ █ █ █ ██ █ ██ █ █
█ ████ ███ █ █ █
█ █ █ █ █ █ █ █
███ ████ ████ ███ ███ █████
Tags: projects, ai, generative-ai, llm, llm-tool-use, coding-agents, claude-code, claude-mythos-fable
原文を表示
Release: llm-coding-agent 0.1a0
Another Fable 5 experiment. Now that my LLM library has evolved into more of an agent framework it's time to see what a simple coding agent would look like built on it.
I started a new Python library using my python-lib-template-repository GitHub template repository, then ran these two prompts (here's the Claude Code for web transcript):
Write a spec.md for this project - it will depend on the latest “llm” alpha from PyPI and implement a Claude code style coding agent complete with tools for reading and editing files and executing commands
Then:
Commit the spec, then build it using red/green TDD in a series of sensible commits (each with passing tests and updated docs) - occasionally manually test it using the OpenAI API key in your environment
Here's the resulting README file and the sequence of commits.
I've shipped a slop-alpha to PyPI, so you can run the new agent like this:
uvx --prerelease=allow --with llm-coding-agent llm code
It's pretty good for a first attempt! Here's the (Fable-authored) README, which lists recipes like llm code --yolo and llm code --allow "pytest*" --allow "git diff*".
It also presents a Python API based around a CodingAgent(model="gpt-5.5", root="/path", approve=True).run("Fix the failing test in tests/test_parser.py") class which I didn't ask for but I'm delighted to see implemented.
Here's the suite of tools it implemented, listed using uvx ... llm tools:
CodingTools_edit_file(path: str, old_string: str, new_string: str, replace_all: bool = False) -> str
Replace an exact string in a file.
old_string must match the file contents exactly (including
whitespace) and must identify a unique location unless replace_all
is true. Returns a diff of the change so it can be verified.
CodingTools_execute_command(command: str, timeout: int = 120) -> str
Run a shell command in the session root directory.
Returns combined stdout and stderr followed by an Exit code line.
timeout is in seconds (maximum 600); on timeout the whole process
tree is killed.
CodingTools_list_files(pattern: str = '**/*', path: str = '.') -> str
List files matching a glob pattern, newest first.
Skips hidden directories, node_modules, __pycache__ and (in a git
repository) anything covered by .gitignore. Returns at most 200
paths relative to the searched directory.
CodingTools_read_file(path: str, offset: int = 0, limit: int = 2000) -> str
Read a text file, returning numbered lines like cat -n.
Paths are relative to the session root. Use offset (0-based first
line) and limit (max lines) to page through files too large to read
in one call.
CodingTools_search_files(pattern: str, path: str = '.', glob: str = None, max_results: int = 100) -> str
Search file contents for a regular expression.
Returns matches as path:line_number:line, capped at max_results.
Use glob (e.g. "*.py") to restrict which files are searched.
CodingTools_write_file(path: str, content: str) -> str
Create or overwrite a file with the given content.
Parent directories are created as needed. Prefer edit_file for
modifying existing files.
I tried it out by running llm code --yolo and then prompting:
mkdir /tmp/demo and then in that folder create a simple swiftui CLI app for telling the time in ascii art
Here's the transcript, in which GPT-5.5 reasoning notes that "SwiftUI isn't suitable for a true CLI" and then builds an app that outputs this on swift run AsciiTime:
█ █████ ████ █ █ ███
██ █ █ █ ██ █ ██ █ █
█ ████ ███ █ █ █
█ █ █ █ █ █ █ █
███ ████ ████ ███ ███ █████
Tags: projects, ai, generative-ai, llm, llm-tool-use, coding-agents, claude-code, claude-mythos-fable
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み