feat: add jev agent tool - #1919
ionut-mihalache-uipath wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The new models integrate with existing discriminated unions and are covered by focused validation tests.
Review effort: Balanced
Findings: None
What changed in this PR
Adds model support for the internal Jev classifier tool and its question formats.
Changes:
- Adds Jev tool, question, criteria, and object-builder models.
- Adds validation and parsing tests for Jev configurations.
| File | Description |
|---|---|
packages/uipath/src/uipath/agent/models/agent.py |
Defines Jev classifier and object-builder models. |
packages/uipath/tests/agent/models/test_jev_classifier_tool.py |
Tests parsing, validation, defaults, and argument properties. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| ] | ||
|
|
||
|
|
||
| class AgentInternalJevClassifierSettings(BaseCfg): |
There was a problem hiding this comment.
Moving questions out of settings also removes the only aggregate uniqueness check (and the duplicate-name regression). _QUESTION now validates one item at a time, while inputSchema and argumentProperties remain generic, so two runtime questions with the same name pass every model added here. System One’s wire contract keys questions by name; converting that list to the request object must then either overwrite one question or fail later in the execution layer.
Could this retain a typed question collection/root model with an after-validator, or explicitly require the future execution adapter to reject duplicate names before serialization, with the two-question regression restored? This is the same keyed boundary used by Jev Social’s request builder: the stable question key is also how the matching answer is recovered.
There was a problem hiding this comment.
The check for uniqueness is at runtime. If question names were keys in an object, the input schema would have "additionalProperties: true" for the case when the questions are dynamically asked by the LLM. The langchain clients for gemini drop the "additionProperties" field and this is why we can't to that.
29169cf to
98ec18c
Compare
🚨 Heads up:
|
98ec18c to
ade73c0
Compare
Signed-off-by: Mihalache Marius <ionut.mihalache@uipath.com>
ade73c0 to
818856c
Compare
|



Summary
This PR lets an agent definition declare the experimental Jev Classifier built-in tool (
properties.toolType: "jev-classifier"). The tool sends a text, an object or a list to TypeSafe's Jev model. Jev answers typed questions about it and returns a probability for each answer.This PR only adds models to
uipath.agent.models.agent, soagent.jsonfiles that contain the tool parse. Executing the tool is out of scope here.Changes
AgentInternalToolType.JEV_CLASSIFIERandAgentInternalJevClassifierToolProperties, added to the internal tool properties union.settingsholds onlymodel(defaultjev-latest).state(what Jev evaluates) andquestions(what it answers), are ordinary tool arguments. They are declared in the resource'sinputSchemaand supplied throughargumentProperties, so they are not insettings.state/questionsinsidesettings) still parse. Those keys are kept as ignored extras.Question models (
JevQuestion, a union keyed ontypewith case-insensitive values), for validating thequestionsargument. The limits are TypeSafe's:choiceoptions: [{name, description?}]scorelevels: [str]noulcriteria?: {true?, false?}true/falsematch TypeSafe's APInamematching^[A-Za-z_][A-Za-z0-9_]{0,63}$and non-emptyinstructions.objectBuilderargument properties variant (AgentToolObjectBuilderArgumentProperties). It marks an object argument whose properties each have their own value source, stored under<field>['<property>']. The Jev editor uses it for the state and the questions builder.Testing
tests/agent/models/test_jev_classifier_tool.py. It covers settings and defaults, the case-insensitive tool type, legacy settings extras, all three question types, noul criteria serialization, invalid questions, andobjectBuilderparsing.uv run pytest tests/agent/models: 177 passed.🤖 Generated with Claude Code
https://claude.ai/code/session_014RnRusgxSnX8MbkqXBx4WG