Metadata-Version: 2.5
Name: langchain-ictexam
Version: 0.1.0
Summary: LangChain tools for ICTExam — parse question papers with AI, publish exams, and read gradebooks and item analysis over the REST API
Project-URL: Homepage, https://www.ictlms.net
Project-URL: Repository, https://github.com/ictinnovations/langchain-ictexam
Project-URL: ICT Innovations, https://www.ictinnovations.com/
Author-email: ICT Innovations <tahir@ictinnovations.com>
License-Expression: MIT
License-File: LICENSE
Keywords: assessment,edtech,exam,grading,ictexam,langchain,lti,moodle
Requires-Python: <4.0,>=3.9
Requires-Dist: langchain-core>=0.3.0
Requires-Dist: requests>=2.31.0
Description-Content-Type: text/markdown

# langchain-ictexam

LangChain tools for [ICTExam](https://www.ictlms.net), the AI-powered exam
authoring, delivery and auto-grading platform from
[ICT Innovations](https://www.ictinnovations.com/). Give an agent the ability to
turn a question paper into a structured exam, publish it, and read the marks and
per-question analysis back out.

## Install

```bash
pip install langchain-ictexam
```

## Quick start

```python
from langchain_ictexam import ICTExamToolkit

toolkit = ICTExamToolkit.from_credentials(
    base_url="https://app.ictlms.net",   # your ICTExam site
    email="teacher@example.com",
    password="...",
)
tools = toolkit.get_tools()
```

Behind the usual reverse proxy the API lives under `/api` (the default). If you
talk straight to the backend port, pass `api_prefix=""`.

Plug the tools into any LangChain agent:

```python
from langchain.agents import create_react_agent  # or your agent of choice

agent = create_react_agent(model, tools)
agent.invoke({"messages": "Parse ./midterm.pdf, publish it, then show the gradebook."})
```

## Tools

| Tool | What it does |
|------|--------------|
| `list_exams` | List exam papers (id, title, status, class, subject) |
| `get_exam` | One paper's settings, share links and questions |
| `list_classes` | Classes (course groups) |
| `list_subjects` | Subjects, each tied to a class |
| `get_gradebook` | Per-exam totals and student marks |
| `get_item_analysis` | Per-question difficulty, p-value and average mark |
| `parse_question_paper` | Upload a PDF/DOCX and AI-extract the questions |
| `publish_exam` | Publish a paper; returns student and teacher share URLs |
| `unpublish_exam` | Set a paper back to draft |

## Authentication

Sign in with any teacher or admin account. The client holds the session cookie
and echoes the CSRF token on writes for you — nothing else to configure.

## About

ICTExam grades objective, fill-in-the-blank and short-answer questions
deterministically; with an AI key configured on the server it also does
rubric-graded essay and image/vision marking. It ships with a native Moodle
activity module (LTI 1.3, grade passback and roster sync). Learn more at
[ictlms.net](https://www.ictlms.net) and [ictinnovations.com](https://www.ictinnovations.com/).

MIT licensed.
