Skip to content

Expose Agent as a CLI for testing during development #1595

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
DouweM opened this issue Apr 25, 2025 · 8 comments
Open

Expose Agent as a CLI for testing during development #1595

DouweM opened this issue Apr 25, 2025 · 8 comments
Labels
Feature request New feature request

Comments

@DouweM
Copy link
Contributor

DouweM commented Apr 25, 2025

Description

It'd be nice to have the ability to do agent.to_cli() and get an experience similar to https://ai.pydantic.dev/cli/ for testing out an agent without having to build a full chat UI.

References

As discussed in https://pydanticlogfire.slack.com/archives/C083V7PMHHA/p1745525917655549.

@DouweM
Copy link
Contributor Author

DouweM commented Apr 25, 2025

cc @samuelcolvin as you've been working on the CLI

@DouweM DouweM added the Feature request New feature request label Apr 25, 2025
@Kludex
Copy link
Member

Kludex commented Apr 28, 2025

I want this as well.

@benomahony
Copy link

This could be cool inspiration: https://github.com/darrenburns/elia

@AndrewHannigan
Copy link
Contributor

+1 I'm also looking for this

@Kludex
Copy link
Member

Kludex commented May 4, 2025

Maybe the right approach is pai run main:agent?

Just a thought... 🤔

@AndrewHannigan
Copy link
Contributor

AndrewHannigan commented May 4, 2025

This PR is ready for review, it implements this requested feature as a method on Agent. @Kludex any concerns with this approach?

@AndrewHannigan
Copy link
Contributor

AndrewHannigan commented May 5, 2025

I've added a pai --agent flag as well that supports module:variable syntax as you suggested @Kludex. I can see that being helpful to quickly interact with an agent as a CLI without having to modify the module you are importing the agent from.

@samuelcolvin
Copy link
Member

samuelcolvin commented May 5, 2025

We probably need to get #1504 merged first, as it'll conflict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request New feature request
Projects
None yet
Development

No branches or pull requests

5 participants