Metadata-Version: 2.4
Name: create-agent-template
Version: 0.1.3
Summary: NextJs Style Scaffolder For Production Agentic AI projects in Python
Author: Swikrit
License-Expression: MIT
Project-URL: Homepage, https://github.com/swikrit09/agenttemplategen
Project-URL: Documentation, https://github.com/swikrit09/agenttemplategen#readme
Project-URL: Repository, https://github.com/swikrit09/create-agent-template
Project-URL: Issues, https://github.com/swikrit09/create-agent-template/issues
Keywords: ai,agentic-ai,langgraph,scaffolding,cli,templates
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: typer>=0.12.0
Requires-Dist: questionary>=2.0.1
Requires-Dist: jinja2>=3.1.4
Requires-Dist: pyyaml>=6.0.1
Requires-Dist: rich>=13.7.0
Requires-Dist: click>=8.1.7
Provides-Extra: dev
Requires-Dist: build>=1.2.0; extra == "dev"
Requires-Dist: twine>=6.0.0; extra == "dev"
Requires-Dist: pytest>=8.0.0; extra == "dev"
Dynamic: license-file

# create-agent-template

Scaffold production-ready Agentic AI projects in Python with one command.

`create-agent-template` generates opinionated, extensible project templates built around LangGraph patterns, modern provider support, API-first structure, and practical defaults for real-world teams.

## Quick Demo

![create-agent-template demo](assets/create_agent_template.jpg)

## Why create-agent-template

- Production-oriented templates (not toy examples)
- Consistent project structure across agent architectures
- Interactive setup flow for provider and feature selection
- Optional FastAPI backend, streaming, tests, Docker, and observability hooks
- Ready-to-customize prompts, graph logic, tools, and config files

## Supported Templates

| Template | Best For | Architecture |
|---|---|---|
| `react_agent` | Tool-using assistants with iterative reasoning | ReAct loop with LangGraph + tool execution |
| `rag_agent` | Grounded answers from your documents | Retrieval + grading + generation pipeline with optional guards/cache |
| `multi_agent` | Coordinated specialist workflows | Supervisor graph orchestrating worker agents |
| `conversational` | Alias for conversational assistants | Delegates to `react_agent` generation |
| `hitl` | Human-in-the-loop orchestration baseline | Delegates to `multi_agent` generation |

## Supported LLM Providers

- Groq
- Gemini
- Azure OpenAI
- Ollama

Provider credentials are configured via generated `.env` files.

## Installation

```bash
pip install create-agent-template
```

For local development:

```bash
pip install -e .[dev]
```

## Usage

```bash
create-agent-template my-agent-project
```

If your shell cannot find `create-agent-template`, use:

```bash
python -m create_agent_template my-agent-project
```

Optional output directory:

```bash
create-agent-template my-agent-project --output ./workspace
```

Alias command (equivalent):

```bash
create_agent_template my-agent-project
```

The CLI prompts you to configure:

- Template type
- LLM provider
- API backend and streaming support
- Pre-installed tools
- RAG options (semantic cache and security guards)
- Optional features (Docker, tests, observability, agent description)

## What Gets Generated

Each project includes:

- A runnable `main.py` entrypoint
- Config-first setup (`config.yaml`, `.env.example`)
- Template-specific modules (`agent/`, `rag/`, `agents/`, `tools/`, etc.)
- Optional `api/` routes and schemas
- Optional `tests/`
- Optional Docker artifacts

The generator also initializes git and creates a `data/` directory scaffold.

## Feature Flags (Template Rendering)

The generator conditionally includes files based on selected options:

- `include_api`: includes or skips `api/`
- `include_tests`: includes or skips `tests/`
- `include_docker`: includes or skips Docker artifacts
- `include_guards` (RAG): includes or skips `security/`
- `include_semantic_cache` (RAG): includes or skips semantic cache template

## Example Developer Workflow

```bash
create-agent-template customer-support-agent
cd customer-support-agent
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env
# Add provider credentials
python main.py
```

## Project Quality Notes

- Templates are generated from Jinja files under `create_agent_template/templates/`
- Shared and template-specific rendering are centralized in `create_agent_template/generator.py`
- Generation summary is displayed in rich tables for clarity
- Templates are structured for straightforward extension, not lock-in

## Development

```bash
pip install -e .[dev]
python -m build
python -m twine check dist/*
```

## Troubleshooting (Windows)

If you see:

`create-agent-template : The term 'create-agent-template' is not recognized ...`

then the package is usually installed, but your Python Scripts directory is not on `PATH`.

Check install location:

```powershell
py -m pip show create-agent-template
py -m site --user-base
```

Typical scripts path to add to `PATH`:

`%APPDATA%\Python\Python3x\Scripts`

After updating `PATH`, restart PowerShell and run:

```powershell
create-agent-template --help
```

Fallback that always works when package is installed:

```powershell
py -m create_agent_template --help
```

## Publishing to PyPI

If a version already exists on PyPI, bump `project.version` in `pyproject.toml` before upload.

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

Optional:

```bash
twine upload --skip-existing dist/*
```

## Contributing

1. Fork the repository.
2. Create a branch for your change.
3. Validate generated templates locally.
4. Submit a pull request with a clear summary and sample output.

## License

MIT
