Skip to content

feat: ask_user (Q&A) + Monty run_python + SkillsToolset support#88

Open
OchnikBartek wants to merge 2 commits into
feat/advanced-chartsfrom
feat/qa-and-monty
Open

feat: ask_user (Q&A) + Monty run_python + SkillsToolset support#88
OchnikBartek wants to merge 2 commits into
feat/advanced-chartsfrom
feat/qa-and-monty

Conversation

@OchnikBartek

@OchnikBartek OchnikBartek commented Jun 9, 2026

Copy link
Copy Markdown
Member

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 — loads SKILL.md files from backend/skills/ as agent tools (loader only; drop in your own skills).

Changes

ask_user (Q&A)

  • ask_user tool: agent pauses, WebSocket session pauses/resumes, frontend QuestionPrompt multi-step card collects answers
  • Drop a stray ask_user_response frame (duplicate / post-reconnect) instead of surfacing a spurious "Empty message" error

Code execution (Monty)

  • enable_code_execution flag gating a run_python tool backed by pydantic-monty
  • In-sandbox create_chart / create_map / current_datetime emit live, persisted cards via emit_tool_event
  • AgentSession streams in-sandbox tool calls as the same tool_call/tool_result event pair as direct calls

Skills (SkillsToolset)

  • enable_skills flag + CLI --skills + interactive prompt
  • assistant.py: SkillsToolset registration (PydanticAI, gated on backend/skills/ existing — no-ops when empty)
  • pyproject: pydantic-ai-skills dep
  • Frontend: load_skill / list_skills tool-call rendering

CI / tests

  • New matrix configs pydantic_ai_code_execution and pydantic_ai_skills so both paths are linted + type-checked (previously uncovered)
  • Run ruff via uvx in the generated-project tests (matches the post-gen hook; avoids a stray VIRTUAL_ENV breaking local runs)

Testing

  • Matrix tests: generated pydantic_ai with --code-execution and with --skills (+ charts/AntV); compile, pass ruff + ty
  • test_template_integration.py green (CrewAI ty skipped — known py3.14 limitation)
  • Unit tests: test_config.py / test_cli.py / test_prompts.py — 227 passed
  • Linting passes: make lint (generator + generated backend)
  • Frontend build verified locally
  • Generated projects still work: PydanticAI + code-execution + skills + AntV

@OchnikBartek OchnikBartek requested a review from DEENUU1 June 9, 2026 13:45
@OchnikBartek OchnikBartek self-assigned this Jun 9, 2026
@OchnikBartek OchnikBartek added the enhancement New feature or request label Jun 9, 2026
@OchnikBartek OchnikBartek changed the title feat: add ask_user (Q&A) tool + Monty run_python code execution feat: ask_user (Q&A) + Monty run_python + SkillsToolset support Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant