Metadata-Version: 2.4
Name: sutra-ai
Version: 0.1.3
Summary: CLI-first executor for small sequential Ollama agent pipelines.
Author: Rajat Pandey
License-Expression: MIT
Project-URL: Homepage, https://github.com/SutraLabs/sutra
Project-URL: Repository, https://github.com/SutraLabs/sutra
Project-URL: Issues, https://github.com/SutraLabs/sutra/issues
Project-URL: Changelog, https://github.com/SutraLabs/sutra/blob/main/CHANGELOG.md
Keywords: pipeline,cli,ollama
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.31.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Provides-Extra: ui
Requires-Dist: fastapi>=0.110; extra == "ui"
Requires-Dist: uvicorn>=0.29; extra == "ui"
Requires-Dist: jinja2>=3.1; extra == "ui"
Provides-Extra: pdf
Requires-Dist: pypdf>=4.0.0; extra == "pdf"
Provides-Extra: rag
Requires-Dist: numpy>=1.26; extra == "rag"
Requires-Dist: sentence-transformers>=2.2.2; extra == "rag"
Requires-Dist: reportlab>=4.0.0; extra == "rag"
Requires-Dist: pypdf>=4.0.0; extra == "rag"
Dynamic: license-file

**Sutra**

Sutra is a small framework for running sequential LLM pipelines locally.
This project is not affiliated with, endorsed by, or associated with any company or product named Sutra or Sutra AI.

## Install
```bash
pip install sutra-ai
```

## Quick start
1. Create a demo project (menu lets you pick Hello World, support triage, or the interactive wizard):
   ```bash
   sutra create demo "Support ticket helper" --yes
   ```
2. Run the generated pipeline with a short question:
   ```bash
   sutra run projects/demo/pipeline.py --text "My internet is down"
   ```
3. Verify everything still works by running the doctor self-test:
   ```bash
   sutra doctor --selftest
   ```

You can also open the demo pipeline directly with Python:
```bash
python projects/demo/pipeline.py --text "My internet is down"
```

After `sutra create` you will see guidance such as "What happens next?" and reminders like `ollama pull <model>` if the model is missing.

For formal docs and release notes, visit the GitHub repo or PyPI page:
```bash
echo https://github.com/SutraLabs/sutra
echo https://pypi.org/project/sutra-ai/
```

## Example output
The demo pipeline writes an `answer` entry:
```json
{
  "answer": [{"answer": "Thanks for the question."}]
}
```

## Concepts
- **Agent**: one actor (model + prompt) that enforces `expects_json` and `required_keys`.
- **Step**: runs an agent and feeds its outputs to the next step.
- **Pipeline**: a list of steps wired together; it always exposes `build()` and `DEFAULT_INPUT`.

## Commands (kid-friendly)
- `sutra create <name> <description>`: menu lets you pick Hello World, support triage, or the input wizard.
- `sutra run <pipeline.py> --text "Hey!"` (or `sutra run <pipeline.py> "Hey!"`): feeds text to the first agent.
- `sutra --version`: prints the installed `sutra-ai` version.
- `sutra doctor [--selftest]`: checks Ollama connectivity; `--selftest` also tries to import and run a generated pipeline.
- `sutra help`: shows the CLI usage and the names of supported commands.

## Requirements
- Python >=3.10
- Ollama server at http://localhost:11434
- Model requirement: `ollama pull llama3.1:latest`

## What Sutra is / is not
- Is: a CLI-driven pipeline runner that enforces JSON contracts.
- Is: a local workflow for orchestrating Ollama-powered agents.
- Is not: an autonomous planner with self-directed agents.
- Is not: a hosted API service.

## Links
- GitHub: https://github.com/SutraLabs/sutra
- Issues: https://github.com/rajat4493/SutraFramework/issues
- Changelog: https://github.com/rajat4493/SutraFramework/blob/main/CHANGELOG.md
- PyPI: https://pypi.org/project/sutra-ai/0.1.0/
