Agent4
Agent4 is a rebuilt learning and assessment platform for SolidWorks modeling and ANSYS simulation education.
It separates the product into these roles:
- Knowledge standards: standard answers, extracted skillflows, teaching scripts, and assessment rules.
- Learning controller: teaching and testing sessions.
- C# backend: learning/testing API, SolidWorks extraction orchestration, and method-sensitive grading.
- Extractors: SolidWorks part and assembly feature extraction tools.
- Grader: compares student extracted operations with standard answers.
- Web workbench: teaching/testing UI.
Current Scope
This first rebuild focuses on SolidWorks feature-process learning:
- Search standard answers from the reducer knowledge framework and local skillflow JSON files.
- Start a teaching session from a standard answer.
- Generate step voice text from the expected SolidWorks feature operation.
- Accept observed student steps or extract a submitted
.SLDPRT. - Compare feature method and core parameters.
- Start a testing session and produce a grade report.
Run Backend
cd <repository-root>
.\run_backend.ps1
Backend URL:
http://127.0.0.1:7200
Local Configuration
Copy .env.example to .env and fill in only the paths available on the
current machine. Keep project_paths.json, appsettings.Local.json, and
.env local; they are intentionally ignored by Git. Large CAD/knowledge
assets are also distributed separately and are not required for a source
checkout.
The default backend is now the C# API:
backend-csharp/Agent4.Api
The earlier Python FastAPI backend remains as a fallback/reference and can be started with:
.\run_backend_python.ps1
Important APIs
GET /health
GET /api/standards?query=榻胯疆
GET /api/standards/{standard_id}
POST /api/teaching/sessions
POST /api/teaching/sessions/{session_id}/observations
POST /api/teaching/sessions/{session_id}/audit-part
POST /api/testing/sessions
POST /api/testing/sessions/{session_id}/submit
Extractor Tools
The rebuilt project copies the existing extraction tools into:
tools/modeling-process/PartFeatureAudit
tools/modeling-process/AssemblyKnowledgeAudit
PartFeatureAudit is the core for method-sensitive judgment. It can distinguish feature methods such as boss extrude, cut extrude, shell, loft, sweep, hole wizard, mirror, fillet, chamfer, linear pattern, and circular pattern.
Import Standard Records
Extracted records such as *_modeling_plan.json, *_skill_flow.json, and
*_skill_flow_validation.json should be imported as standard-answer assets:
cd <repository-root>
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements.txt
.\.venv\Scripts\python.exe scripts\import_standard_records.py --source "<extracted-records-directory>" --target "$(Get-Location)\data\standards"
The importer copies records into categorized folders and writes:
data/standards/manifest.json
The manifest is the main lookup index for teaching and testing. The raw JSON files remain the authority for executable and comparable feature traces.
Architecture Direction
Agent4 should judge student work from extracted SolidWorks feature traces, not from UI button clicks.
standard answer skillflow
-> expected feature trace
student model or operation
-> extracted feature trace
grader
-> teaching feedback or test score
Final geometry comparison is secondary. Feature method correctness is primary for teaching.