Skip to content

Interactive Wizard #235

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
wants to merge 39 commits into
base: main
Choose a base branch
from
Open

Interactive Wizard #235

wants to merge 39 commits into from

Conversation

tcdent
Copy link
Collaborator

@tcdent tcdent commented Jan 24, 2025

Uses curses to build a fullscreen interactive wizard. Moves the command to $ agentstack wizard

TODO

  • Views for selecting tools and creating tasks.
  • Finish state management for stepping through the workflow.
  • Warning message when the user's terminal is too small to render.
  • radio button selections are not getting saved
  • move wizard layout from tui to cli/wizard.py
  • mypy does not pass
  • live resize
  • add background color
  • alias agentstack init --wizard
  • clicking the last visible element in an overflow select box selects the wrong element
  • allow skipping adding a tool to an agent
  • allow adding multiple tools to an agent
  • descriptions for tool categories
  • descriptions for preferred models
  • descriptions for frameworks
  • fix column sizing on text forms
  • center agentstack logo
  • render at 80x24
  • 16 color support

Run in 256 color mode, if not enabled by default:

export TERM=xterm-256color; agentstack wizard

Run in 16 color mode:

export TERM=xterm-16color; agentstack wizard

Copy link

codecov bot commented Jan 25, 2025

Codecov Report

Attention: Patch coverage is 3.40031% with 1250 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
agentstack/tui.py 0.00% 805 Missing ⚠️
agentstack/cli/wizard.py 0.00% 429 Missing ⚠️
agentstack/main.py 0.00% 9 Missing ⚠️
agentstack/cli/init.py 0.00% 3 Missing ⚠️
agentstack/frameworks/__init__.py 60.00% 2 Missing ⚠️
agentstack/_tools/__init__.py 93.33% 1 Missing ⚠️
agentstack/cli/cli.py 66.66% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@tcdent tcdent marked this pull request as draft January 25, 2025 00:26
@bboynton97
Copy link
Contributor

do we want to nuke agentstack init --wizard <name>?

@bboynton97
Copy link
Contributor

bboynton97 commented Jan 28, 2025

➜ agentstack wizard
/Users/braelynboynton/Developer/agentstack/AgentStack/agentstack/cli/cli.py:16: SyntaxWarning: invalid escape sequence '\ '
  LOGO = """\
An error occurred: 
Terminal window is too small. Resize to at least 80x30.

lmao we should probably handle this better

Edit: Actually my window is very large but still running into this. It could be because its a terminal within JetBrains?

@bboynton97
Copy link
Contributor

image super duper nit but the colors are unreadable with some terminal backgrounds. idk if there's any way to get around this though

@bboynton97
Copy link
Contributor

i got stuck in some kind of loop on adding tools where i could only add stripe and could never complete the process of adding tools to the agent

@tcdent
Copy link
Collaborator Author

tcdent commented Jan 29, 2025

do we want to nuke agentstack init --wizard ?

or alias it cuz a lot of tutorials reference it

Terminal window is too small. Resize to at least 80x30.

pretty sure I can get live resizing working, so it'll stay running.

Edit: Actually my window is very large but still running into this. It could be because its a terminal within JetBrains?

I wondered if we'd be getting into real frontend problems with this; testing across platforms, etc.

super duper nit but the colors are unreadable with some terminal backgrounds. idk if there's any way to get around this though

I had meant to set a background color; can fix

i got stuck in some kind of loop on adding tools where i could only add stripe and could never complete the process of adding tools to the agent

one little bug in the menus rn. if you click it'll work correctly. working on a fix.

@tcdent tcdent marked this pull request as ready for review January 30, 2025 00:01
@tcdent tcdent changed the title [WIP] Interactive Wizard Interactive Wizard Feb 6, 2025
@tcdent tcdent requested a review from bboynton97 February 6, 2025 22:04
@areibman
Copy link
Contributor

(salary_agent) (base) ➜  findmydate git:(salary_agent) agentstack init
/Users/reibs/Projects/AgentStack/agentstack/cli/cli.py:12: SyntaxWarning: invalid escape sequence '\ '
  LOGO = """\
    ___       ___       ___       ___       ___       ___       ___       ___       ___       ___
   /\  \     /\  \     /\  \     /\__\     /\  \     /\  \     /\  \     /\  \     /\  \     /\__\
  /::\  \   /::\  \   /::\  \   /:| _|_    \:\  \   /::\  \    \:\  \   /::\  \   /::\  \   /:/ _/_
 /::\:\__\ /:/\:\__\ /::\:\__\ /::|/\__\   /::\__\ /\:\:\__\   /::\__\ /::\:\__\ /:/\:\__\ /::-"\__\
 \/\::/  / \:\:\/__/ \:\:\/  / \/|::/  /  /:/\/__/ \:\:\/__/  /:/\/__/ \/\::/  / \:\ \/__/ \;:;-",-"
   /:/  /   \::/  /   \:\/  /    |:/  /   \/__/     \::/  /   \/__/      /:/  /   \:\__\    |:|  |
   \/__/     \/__/     \/__/     \/__/               \/__/               \/__/     \/__/     \|__|

----------------------------------------------------
The easiest way to build a robust agent application!
----------------------------------------------------
Provide a project name. This will be used to create a new directory in the current path and will be used as the project name. 🐍 Must be snake_case.
[?] Project name (snake_case):

Error on agentstack init

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

Successfully merging this pull request may close these issues.

4 participants