Skip to main content

CLI-first executor for small sequential Ollama agent pipelines.

Project description

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

pip install sutra-ai

Quick start

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

You can also open the demo pipeline directly with Python:

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:

echo https://github.com/SutraLabs/sutra
echo https://pypi.org/project/sutra-ai/

Example output

The demo pipeline writes an answer entry:

{
  "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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sutra_ai-0.1.3.tar.gz (40.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sutra_ai-0.1.3-py3-none-any.whl (34.7 kB view details)

Uploaded Python 3

File details

Details for the file sutra_ai-0.1.3.tar.gz.

File metadata

  • Download URL: sutra_ai-0.1.3.tar.gz
  • Upload date:
  • Size: 40.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for sutra_ai-0.1.3.tar.gz
Algorithm Hash digest
SHA256 adc346df07db984461b86c843432e8308224e75d41b803148354fff8d6754140
MD5 97583a2e06095e04349f34861fa4c7cd
BLAKE2b-256 f391acbe0d17a7a9d080819c7bcb2113d97d8222ef88826ede308c8978ed77a3

See more details on using hashes here.

File details

Details for the file sutra_ai-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: sutra_ai-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 34.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for sutra_ai-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8096f9795640c1d0944dd94f2de6c2a8e270865702fcdc7cee1a3623816e8479
MD5 808c8770241d096309d93124c07db6b9
BLAKE2b-256 f7464d130515631390b930093e45b70e5e035e25d54bf9fb0236e16a823ffbf1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page