Metadata-Version: 2.4
Name: agentcad-backend
Version: 0.1.5
Summary: AG2-powered CadQuery generation backend
Author: AgentCAD contributors
License-Expression: LicenseRef-Proprietary
Keywords: cadquery,fastapi,cad,ag2,agentcad
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: ag2[openai]>=0.9.0
Requires-Dist: cadquery>=2.5.0
Requires-Dist: fastapi>=0.115.0
Requires-Dist: pillow>=10.4.0
Requires-Dist: python-dotenv>=1.0.1
Requires-Dist: python-multipart>=0.0.9
Requires-Dist: sqlmodel>=0.0.22
Requires-Dist: uvicorn[standard]>=0.30.0
Provides-Extra: dev
Requires-Dist: build>=1.2.1; extra == "dev"
Requires-Dist: httpx>=0.27.0; extra == "dev"
Requires-Dist: pytest>=8.2.0; extra == "dev"
Requires-Dist: ruff>=0.6.0; extra == "dev"
Requires-Dist: twine>=5.1.1; extra == "dev"

# AgentCAD Backend

AG2-powered FastAPI backend for generating CadQuery models and exporting STEP files.

## Install

```bash
pip install agentcad-backend
```

For local development from this repository:

```bash
cd backend
pip install -e ".[dev]"
```

## Run

```bash
agentcad-backend-server --host 127.0.0.1 --port 8000
```

The package also includes a small CLI entry point:

```bash
agentcad-backend-cli --help
```

The package also exposes the ASGI app at:

```text
agentcad_backend.main:app
```

## Configuration

Configuration is read from environment variables or a `.env` file in the backend
directory.

- `OPENAI_API_KEY`: enables AG2/OpenAI generation. Without it, the backend returns
  deterministic fallback geometry.
- `OPENAI_MODEL`: overrides the model used by the CAD and animation agents.
- `AGENT_TEMPERATURE`: adjusts agent temperature where supported.

## Build and Publish

```bash
python -m build
python -m twine check dist/*
python -m twine upload dist/*
```

GitHub Actions publishes tagged backend releases automatically. Bump the version
in `pyproject.toml`, commit the change, then push a matching tag:

```bash
git tag backend-v0.1.1
git push origin backend-v0.1.1
```
