Prompts become code units.
Wrap prompt behavior with @prompt_job, give it an identity, and keep it reusable instead of scattering strings across handlers and services.
TinyTune gives prompts a place to live: composable prompt jobs, explicit pipelines, model-agnostic contexts, and plain Python tools.
from tinytune import GPTContext, Pipeline, prompt_job, Message context = GPTContext("o1-mini", OPENAI_API_KEY) @prompt_job(id="summarize", context=context) def summarize(id, context, prevResult): return (context .Prompt(Message("user", "Summarize the signal.")) .Run(stream=True) .Messages[-1]) pipeline = Pipeline(context) pipeline.AddJob(summarize) result = pipeline.Run()
Prompts start as strings. Then they gain context, retries, steps, tools, and dependencies. TinyTune gives that logic a small set of primitives without asking your application to become an agent platform.
Wrap prompt behavior with @prompt_job, give it an identity, and keep it reusable instead of scattering strings across handlers and services.
A pipeline is a sequence you can read. Each job can receive the previous result, making multi-step LLM work explicit instead of hidden behind magic.
Decorate regular functions as tools and plug real application capability into your LLM flow without inventing another runtime or DSL.
TinyTune is deliberately legible. The core concepts map directly to things you already have: a model context, a unit of prompt work, a sequence, and callable functions.
Owns model interaction and message history while keeping the rest of your workflow independent of a specific backend.
Packages one prompt-driven task into a reusable function with a stable identity and context.
Runs jobs in sequence and passes results forward, so multi-step behavior remains inspectable.
Turns a Python function into capability your LLM workflow can reason about and invoke.
Business logic coupled to one provider, ad-hoc sequencing, duplicated context handling, and glue that gets harder to reason about every time the workflow grows.
Jobs describe work. Pipelines describe order. Contexts describe model interaction. Tools describe capability. The rest stays your application.
No generated project. No runtime service. No ceremony before your first prompt pipeline.