From de6058f1098d33e52b5a27429f50d31941033a0e Mon Sep 17 00:00:00 2001 From: Mai Development Date: Tue, 27 Jan 2026 11:59:37 -0500 Subject: [PATCH] feat(01-01): create Python project foundation with dependencies - Created pyproject.toml with lmstudio, psutil, pydantic dependencies - Created requirements.txt as fallback for pip install - Created src/models/__init__.py with proper imports - Set up PEP 518 compliant package structure - Fixed .gitignore to allow src/models/ directory --- pyproject.toml | 48 ++++++++++++++++++++++++++++++++++++++++++ requirements.txt | 5 +++++ src/__init__.py | 12 +++++++++++ src/models/__init__.py | 6 ++++++ 4 files changed, 71 insertions(+) create mode 100644 pyproject.toml create mode 100644 requirements.txt create mode 100644 src/__init__.py create mode 100644 src/models/__init__.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..deec3c6 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,48 @@ +[build-system] +requires = ["setuptools>=61.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "mai" +version = "0.1.0" +description = "Autonomous conversational AI agent with local model inference" +readme = "README.md" +requires-python = ">=3.8" +license = {text = "MIT"} +authors = [ + {name = "Mai Project", email = "mai@example.com"} +] +keywords = ["ai", "agent", "local-llm", "conversation"] +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", +] + +dependencies = [ + "lmstudio>=1.0.1", + "psutil>=6.1.0", + "pydantic>=2.10", + "pyyaml>=6.0", +] + +[project.optional-dependencies] +gpu = [ + "gpu-tracker>=5.0.1", +] + +[project.urls] +Homepage = "https://github.com/mai/mai" +Repository = "https://github.com/mai/mai" +Issues = "https://github.com/mai/mai/issues" + +[tool.setuptools.packages.find] +where = ["src"] + +[tool.setuptools.package-data] +mai = ["config/*.yaml"] \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..3e64d53 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +lmstudio>=1.0.1 +psutil>=6.1.0 +pydantic>=2.10 +pyyaml>=6.0 +gpu-tracker>=5.0.1 \ No newline at end of file diff --git a/src/__init__.py b/src/__init__.py new file mode 100644 index 0000000..fba2ba8 --- /dev/null +++ b/src/__init__.py @@ -0,0 +1,12 @@ +"""Mai - Autonomous Conversational AI Agent + +A local-first AI agent that can improve her own code through +safe, reviewed modifications. +""" + +__version__ = "0.1.0" +__author__ = "Mai Project" + +from .models import LMStudioAdapter, ResourceMonitor + +__all__ = ["LMStudioAdapter", "ResourceMonitor"] diff --git a/src/models/__init__.py b/src/models/__init__.py new file mode 100644 index 0000000..21c0748 --- /dev/null +++ b/src/models/__init__.py @@ -0,0 +1,6 @@ +"""Model interface adapters and resource monitoring.""" + +from .lmstudio_adapter import LMStudioAdapter +from .resource_monitor import ResourceMonitor + +__all__ = ["LMStudioAdapter", "ResourceMonitor"]