0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Github CLIのagent-taskを試してみた!

Posted at

はじめに

Github CLIでagent-taskが追加されていたので試してみました。
agent-taskの実行はGithub Copilotのプランが「GitHub Copilot Pro」、「GitHub Copilot Pro+」、「GitHub Copilot Business」、「GitHub Copilot Enterprise」のいずれかでなければなりません。

agent-task create

エージェントタスクを作成するコマンドです。

$ gh agent-task create "build me a new app"

https://github.com/soukadao/book-manager-app/pull/1/agent-sessions/44c0ec2e-fada-4057-a483-aaa8188fec46

タスク実行の流れ

タスクが作成されるとGitHub Actionsが自動的に実行されます。

GitHub Actionsの実行画面

プルリクエストの変化

タスクの進行に伴い、プルリクエストの状態が変化していきます。

プルリクエスト作成時:

プルリクエスト作成直後の画面

タスク実行中:

タスク実行中のプルリクエスト画面

タスク完了後:

タスク完了後のプルリクエスト画面

実装結果の確認

エージェントが作成したアプリケーションを起動してみます。

アプリケーションの起動画面

agent-task list

エージェントタスクのリストを表示するコマンドです。

$ gh agent-task list

SESSION NAME                PULL REQUEST  REPO                       SESSION STATE  CREATED               
Building a new application  #1            soukadao/book-manager-app  Queued         less than a minute ago

agent-task view

エージェントタスクの詳細を表示します。

$ gh agent-task view 1
In progress • Building a new application
Started on behalf of soukadao about 7 minutes ago
Used 1 premium request(s)

soukadao/book-manager-app#1 • [WIP] Add new application project

For detailed session logs, try:
gh agent-task view '44c0ec2e-fada-4057-a483-aaa8188fec46' --log

View this session on GitHub:
https://github.com/soukadao/book-manager-app/pull/1/agent-sessions/44c0ec2e-fada-4057-a483-aaa8188fec46

まとめ

今回はエージェントに簡単なタスクを投げてみましたが、アプリケーションが起動して表示できる状態にまで実装されていました。
エージェントをCLIから実行できるため、Claude Codeなどの開発ツールと組み合わせることで、さらなる開発効率の向上が期待できそうです。

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?