feat: ask_user (Q&A) + Monty run_python + SkillsToolset support#88
Open
OchnikBartek wants to merge 2 commits into
Open
feat: ask_user (Q&A) + Monty run_python + SkillsToolset support#88OchnikBartek wants to merge 2 commits into
OchnikBartek wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds three PydanticAI-only agent capabilities to the generated template, stacked on #83:
ask_user— the agent pauses a run to ask the user one or more questions, then resumes with their answers (interactive multi-step card).run_python— a Monty-sandboxed code-execution tool: compute, transform data, and emit live charts/maps in a single turn.SkillsToolset— loadsSKILL.mdfiles frombackend/skills/as agent tools (loader only; drop in your own skills).Changes
ask_user (Q&A)
ask_usertool: agent pauses, WebSocket session pauses/resumes, frontendQuestionPromptmulti-step card collects answersask_user_responseframe (duplicate / post-reconnect) instead of surfacing a spurious "Empty message" errorCode execution (Monty)
enable_code_executionflag gating arun_pythontool backed bypydantic-montycreate_chart/create_map/current_datetimeemit live, persisted cards viaemit_tool_eventAgentSessionstreams in-sandbox tool calls as the sametool_call/tool_resultevent pair as direct callsSkills (SkillsToolset)
enable_skillsflag + CLI--skills+ interactive promptassistant.py:SkillsToolsetregistration (PydanticAI, gated onbackend/skills/existing — no-ops when empty)pyproject:pydantic-ai-skillsdepload_skill/list_skillstool-call renderingCI / tests
pydantic_ai_code_executionandpydantic_ai_skillsso both paths are linted + type-checked (previously uncovered)uvxin the generated-project tests (matches the post-gen hook; avoids a strayVIRTUAL_ENVbreaking local runs)Testing
pydantic_aiwith--code-executionand with--skills(+ charts/AntV); compile, pass ruff + tytest_template_integration.pygreen (CrewAI ty skipped — known py3.14 limitation)test_config.py/test_cli.py/test_prompts.py— 227 passedmake lint(generator + generated backend)