Metadata-Version: 2.5
Name: study-mate-agent
Version: 0.1.2
Summary: AI tutor and assistant agents for study support
License: MIT
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.11
Requires-Dist: openai-agents>=0.12.5
Requires-Dist: openai>=2.30.0
Requires-Dist: pydantic>=2.0.0
Description-Content-Type: text/markdown

# study-mate-agent

AI tutor and assistant agents for study support.

## Installation

```bash
pip install study-mate-agent
```

## Quick Start

```python
import asyncio
import uuid
from study_mate_agent import (
    TeachingTutorOpenAIAgent,
    LectureAssistantOpenAIAgent,
    EmbedderClient,
    EmbedChunkModel,
    Message,
    MessageRole,
)


class DummyEmbedderClient(EmbedderClient):
    async def embed_query(self, bucket_id: uuid.UUID, query: str) -> list[EmbedChunkModel]:
        return []

    async def embed_hybrid_query(self, bucket_id: uuid.UUID, query: str) -> list[EmbedChunkModel]:
        return []


async def main():
    embedder = DummyEmbedderClient()
    bucket_id = uuid.uuid4()

    # Teaching Tutor Agent with custom parameters
    tutor_agent = TeachingTutorOpenAIAgent(
        agent_model="gpt-6-luna",
        embedder_client=embedder,
        max_searches=5,
        temperature=0.0,
        additional_rules="답변은 3문장 이내로 핵심만 전달하세요.",
    )

    messages = [
        Message(role=MessageRole.user, content="이번 주차 핵심 개념 알려줘"),
    ]

    response = await tutor_agent.create(
        bucket_id=bucket_id,
        messages=messages,
        course_name="컴퓨터구조",
        week_number=1,
        week_topic="CPU 파이프라인",
        max_turns=3,
    )
    print(response.llm_client_model.text)


if __name__ == "__main__":
    asyncio.run(main())
```

## Parameters

### `TeachingTutorOpenAIAgent`
- `agent_model`: Model name (default: `"gpt-6-luna"`).
- `embedder_client`: `EmbedderClient` instance.
- `max_searches`: Max search attempts per turn (default: `5`).
- `temperature`: Model temperature (default: `0.0`).
- `tool_choice`: OpenAI tool choice option (default: `"required"`).
- `system_prompt_template`: Custom prompt template string or template file path.
- `additional_rules`: Additional instruction rules injected into the prompt.

### `LectureAssistantOpenAIAgent`
- `agent_model`: Model name (default: `"gpt-6-luna"`).
- `embedder_client`: `EmbedderClient` instance.
- `timezone`: Timezone for reference date calculation (default: `"Asia/Seoul"`).
- `temperature`: Model temperature (default: `0.0`).
- `tool_choice`: OpenAI tool choice option (default: `"required"`).
- `system_prompt_template`: Custom prompt template string or template file path.
- `additional_rules`: Additional instruction rules injected into the prompt.

### `StudyWeekOpenAIAgent`
- `openai_model`: Model name (default: `"gpt-6-luna"`).
- `semester_start_date`: Semester start date as `"YYYY-MM-DD"` or `datetime` (default: `"YYYY-03-03"`).
- `timezone`: Timezone for current week calculation (default: `"Asia/Seoul"`).
- `system_prompt`: Custom system prompt string.

## License

MIT License
