Skip to main content Switch to mobile version talkpipe 1.4.0 Python internal and external DSL for writing generative AI analytics
pip install talkpipe==1.4.0 Copy PIP instructions
Build and iterate on AI workflows efficiently.
TalkPipe is a Python toolkit for creating, testing, and deploying workflows that combine generative AI with your data and tools. Write pipelines in Python (the Pipe API, chaining steps with |) or in ChatterLang (a concise text DSL) — both use the same building blocks, with LLMs as one tool among many. Pipelines are streaming generators, so large datasets flow through without being loaded into memory, and a pipeline defined once can run from Python, Jupyter, Docker, chatterlang_script, or chatterlang_serve.
Who it's for: engineers and researchers who want scriptable AI pipelines — RAG, batch scoring, web ingestion, agents, and automation — without giving up normal Python when they need it. If your primary model is a large prebuilt agent platform or GUI-first orchestration, another tool may fit better (or layer one on top); TalkPipe stays close to code and scripts.
Typical vertical flow: ingest → chunk/embed → index (for example LanceDB) → retrieve → prompt → answer, then expose the same script with chatterlang_serve if you want an API. See Example 5: RAG pipeline for a full walkthrough.
This README is a high-level overview. Use the documentation map below or the documentation hub for depth.
No LLM, API key, or server needed (Python 3.11+):
pip install talkpipe chatterlang_script --script 'INPUT FROM echo[data="3,1,2"] | cast[cast_type="int"] | scale[multiplier=10] | print' 30 10 20 That one line is a complete pipeline written in ChatterLang: a source (echo, which starts the stream — here with three items) followed by segments (cast, scale, print), each of which transforms the items flowing past and hands them to the next through |. Every TalkPipe feature — LLM calls, document loading, vector search — is another source or segment you drop into the same chain. The Quick Start below runs the same kind of pipeline from Python and adds an LLM; Getting started is the step-by-step version.
What Can You Do With TalkPipe?
Chat with LLMs - Create multi-turn conversations with OpenAI, Ollama, or Anthropic models in just a few lines of code
Process Documents - Extract text from PDFs, analyze research papers, score content relevance
Build RAG Pipelines - Create end-to-end Retrieval-Augmented Generation workflows with vector databases
Analyze Web Content - Download web pages (respecting robots.txt), extract readable text, and summarize
Build Data Pipelines - Chain together data transformations, filtering, and analysis with Unix-like simplicity
Deploy Anywhere - Run in Jupyter notebooks, as Docker containers, or as standalone Python applications
Three layers; use any mix of them in one project:
Pipe and ChatterLang — Chain sources (which produce items), segments (which transform them), and sinks (segments such as print that write items somewhere) with | in Python, or write ChatterLang scripts for the same concepts (easy to drive from env vars and CI). One word does double duty: a pipeline source starts a pipeline, while the source="ollama" parameter on LLM segments names the model provider.
AI and data primitives — LLMs, full-text search, and vector databases behind one style of component.
Pipelines and applications — Higher-level RAG-style pieces plus CLIs and web apps.
For the full story, see Architecture.
Entry points for different usage scenarios, from interactive development to production deployment:
chatterlang_workbench A browser-based IDE for writing, testing, and running ChatterLang scripts: editor with autocomplete and live error checking, real-time execution, pipeline save/load, next-component suggestions, logging, and documentation lookup.
chatterlang_script Runs ChatterLang scripts from files or directly from the command line, for batch processing and automation.
chatterlang_serve Exposes ChatterLang pipelines as REST APIs or web forms, so workflows can be deployed as web services or user-facing endpoints.
makevectordatabase & serverag Create vector databases from documents and run RAG web servers in two commands—no scripts required.
chatterlang_reference_browser & chatterlang_reference_generator Browse installed ChatterLang sources and segments interactively, or generate reference documentation for all of them in HTML and text formats.
talkpipe_plugins View and manage plugins. TalkPipe's plugin system lets developers register their own sources and segments, so the ecosystem can grow through community contributions and domain-specific extensions.
Container images Pull release images from GitHub Container Registry (multi-platform on each GitHub release).
Applications built on TalkPipe Install them as standalone commands with uv, each into its own environment:
uv tool upgrade upgrades one, uv tool uninstall removes it, and uv tool update-shell puts the commands on your PATH if they are not found. For a pre-release, add --prerelease allow to the install; to go back to the latest release afterwards, reinstall with --reinstall (uv tool install --upgrade never moves a package backwards).
Requirements: Python 3.11 or newer (3.11, 3.12, and 3.13 are the versions tested in CI). Check yours with python3 --version before installing.
pip install talkpipe TalkPipe is provider-neutral: it works with Ollama (local or remote), OpenAI, and Anthropic for chat, and with Ollama, OpenAI, and model2vec (in-process, no server) for embeddings. None of them is required; install the provider(s) you need:
pip install "talkpipe[openai]" # OpenAI pip install "talkpipe[ollama]" # Ollama pip install "talkpipe[anthropic]" # Anthropic Claude pip install "talkpipe[model2vec]" # In-process static embeddings (also in [all]) # Or: pip install "talkpipe[all]" (The quotes matter in zsh, where an unquoted [...] is a glob.)
See LLM providers for what each provider needs and how to select it.
Any provider works in any example. The examples in this README mostly show source="ollama", but that is just a per-segment parameter: swap in source="openai" or source="anthropic" (with a matching model) on any LLM segment — the RAG helpers take the same choice as embedding_source/completion_source. Different segments in one pipeline can even use different providers. Installing talkpipe[all] includes all provider integrations, so switching or mixing needs no further installs.
What each provider needs before its examples run:
OpenAI / Anthropic: an API key in the environment (OPENAI_API_KEY, ANTHROPIC_API_KEY). The providers' own SDKs read it; it does not go in ~/.talkpipe.toml.
Ollama on this machine: Ollama running, with the model pulled (ollama pull llama3.2).
Ollama on another machine: also set TALKPIPE_OLLAMA_SERVER_URL, e.g. export TALKPIPE_OLLAMA_SERVER_URL="http:// :11434" (a bare host/IP with no scheme or port, like "myollamahost", also works). The model must be pulled on that server — run ollama pull llama3.2 there, or OLLAMA_HOST=http:// :11434 ollama pull llama3.2 from your machine.
None of this is needed for the hello world below. See Configuration for the details and for $key substitution in ChatterLang scripts.
Hello world (no LLM server required):
Note: source="eliza" is not an LLM provider. It is a local, deterministic adapter for experimenting with TalkPipe/ChatterLang syntax and multi-turn flow when you do not yet have Ollama/OpenAI/Anthropic access.
Hello, my name is Alice. I am Dr. Eliza. Hi there. What question keeps returning for you? What's my name? Earlier you said your name is Alice. Is that still how you introduce yourself? Reading the example — the same three ideas recur in every example below:
A script that starts with | has no source: its input is whatever you pass to the function. A script that starts with INPUT FROM supplies its own input and is called with no argument. From the shell, chatterlang_script --stdin --script '| ...' feeds a source-less script standard input, one line per item.
single_in=True means "the argument is one item" (without it, a string argument would be treated as a stream of characters); single_out=True means "return the one result itself rather than a one-element list" (it raises if the pipeline produced any other number of results). Leave both off when you pass a list and want a list back.
Tip: from talkpipe.chatterlang import compile is equivalent to the compiler.compile(...) style above — both styles work throughout the docs.
Multi-turn chat (requires an LLM provider):
Prerequisite: as written, this example uses Ollama, a separate application (not just the talkpipe[ollama] Python package). Install and start it from https://ollama.com/download, then pull the model with ollama pull llama3.2. Ollama is not required: to use OpenAI or Anthropic instead, substitute source="openai" or source="anthropic" (see the commented variants below).
Index a list of strings, then ask questions against that vector store (expand with options in Example 5). tmp://my_kb is an in-process store that lives only as long as the interpreter — both halves below must run in the same process; use a directory path (as Example 5 does) to keep the index. toDict[field_list="_:text"] wraps each incoming string as {"text": }, the dictionary shape the RAG segments expect — in a field_list, _ means "the whole item" and a:b means "read a, store it as b":
No Ollama server? Swap embedding_source="model2vec" and embedding_model="minishlab/potion-base-8M" for offline embeddings (included in talkpipe[all]). The first run downloads that model from Hugging Face (a few files, tens of MB); after that it's cached and needs no network — see Precache for offline use to pre-download for air-gapped environments. The ragToText completion step still needs a chat provider: set completion_source="openai" or completion_source="anthropic" with a matching completion_model. (OpenAI embeddings work too: embedding_source="openai", embedding_model="text-embedding-3-small".) See the model2vec guide.
Indexing a large collection inside a container? Give the container VM enough memory first — see Memory for large indexing jobs.
1. The Pipe API (Internal DSL)
TalkPipe's Pipe API is a Pythonic way to build data pipelines using the | operator to chain components. It is an internal DSL: a small pipeline language made of ordinary Python objects, so it lives inside your Python code:
Add new functionality with simple decorators:
ChatterLang is the external DSL: a small language of its own, kept in a string or a file, with a Unix-like syntax for the same pipelines — perfect for rapid prototyping and experimentation. Run a script from the command line with chatterlang_script --script ' ', or compile it in Python with compiler.compile(' ') as shown in the examples below:
chatterlang_script --script 'INPUT FROM echo[data="1,2,hello,3"] | cast[cast_type="int"] | print' This prints 1, 2, and 3 on separate lines: echo splits its data on commas, and cast skips hello, which cannot be converted to an integer.
Registering Custom Components for ChatterLang
To make the uppercase segment from section 1 available in ChatterLang, register it with a decorator:
Variables: Store intermediate results with @variable_name
Loops: Repeat operations with LOOP n TIMES { ... }
Multiple Pipelines: Separate pipelines (and CONST definitions and LOOP blocks) with ; — a newline alone does not end a statement, which is what lets one pipeline span several lines
Configuration values: Read a setting or command-line value with $name
The language reference, starting with a one-page language at a glance, is in ChatterLang.
Example 1: Multi-Agent Debate
Reminder: Examples 1–5 show source="ollama", but any installed provider works in every one of them — swap the source/model parameters as described in the Quick Start.
Problem: Run two LLM personas on one seed topic for several rounds. Result: Printed turns accumulated in @conversation.
Problem: Score a stream of JSONL rows with an LLM against a fixed rubric. Result: A pandas DataFrame with extracted scores per row.
Problem: Fetch a page, strip boilerplate, summarize with an LLM. Result: Model output to stdout (here, three bullet points).
Problem: Score each article on two axes, keep only strong matches. Result: Printed dicts for items whose best score exceeds a threshold.
Problem: Embed texts into a local vector store, then answer questions with retrieval + completion. Result: String answers from ragToText, plus patterns for yes/no (ragToBinaryAnswer) and numeric scores (ragToScore).
Dual-language architecture — Pure Python (Pipe API) for maximum flexibility and IDE support; ChatterLang for concise, portable scripts.
Streaming architecture — Python generators throughout: memory-efficient processing of large datasets, real-time results as data flows, natural integration with streaming sources.
Extensibility first — Simple decorators (@source, @segment, @field_segment) for adding functionality; components are just Python functions, easy to test and debug; mix TalkPipe with any Python code or library.
talkpipe/ ├── app/ # Runnable applications (servers, CLIs) ├── chatterlang/ # ChatterLang parser, compiler, and components ├── data/ # Data manipulation and I/O components ├── llm/ # LLM and embedding integrations (Ollama, OpenAI, Anthropic, model2vec) ├── operations/ # Algorithms and data processing ├── pipe/ # Core pipeline infrastructure ├── pipelines/ # High-level pipeline components (RAG, vector DB) ├── search/ # Search engine integrations (Whoosh, LanceDB) └── util/ # Utility functions and configuration Configuration
TalkPipe uses a flexible configuration system via ~/.talkpipe.toml or environment variables. For LLM and embedding model / source defaults, see Model and source configuration. The example below makes Ollama the default chat provider; default_model_source = "openai" or "anthropic" (with a matching default_model_name) works the same way.
# ~/.talkpipe.toml default_model_name = "llama3.2" default_model_source = "ollama" smtp_server = "smtp.gmail.com" smtp_port = 587 Environment variables use the TALKPIPE_ prefix:
export TALKPIPE_email_password="your-password" export OPENAI_API_KEY="sk-..." Scripts can read any configured value with $name, just as a Python program can read os.environ — a ChatterLang script is a program and runs with your privileges, like a Jupyter notebook. See Security and trust model before running scripts from others or exposing a TalkPipe server.
import talkpipe is fast because the component registry imports a segment or source only when a script or the Pipe API first names it; only catalogue-wide operations (.all, the reference browser, talkpipe_plugins --list) load everything. Keep your own components cheap the same way — import heavy optional dependencies inside the function that needs them. See lazy loading for details (the historical TALKPIPE_LAZY_IMPORT switch no longer changes behaviour).
Contributor-focused glossary, naming conventions, parameter semantics, standard config keys, and segment/source reference notes live in the developer handbook.
Classes: CamelCase (e.g., LLMPrompt)
Decorated functions: camelCase (e.g., @segment def extractText)
ChatterLang names: camelCase (e.g., llmPrompt, toDataFrame)
Sources generate data (see Creating Custom Components above for segments, which transform data):
Units with side effects should pass data through - e.g., writeFile should yield items after writing
Use descriptive parameter names with underscores (e.g., fail_on_error, set_as)
Handle errors gracefully - use fail_on_error parameter pattern
Document with docstrings - they appear in generated documentation
Test with both APIs - ensure components work in both Python and ChatterLang
TalkPipe is under active development. Current priorities:
Enhanced LLM Support: Additional providers, expanded guided generation
Data Connectors: More database integrations, API clients, file formats
Workflow Features: Conditional branching, enhanced error handling, retry logic
Performance: Parallel processing optimization, enhanced lazy loading, better caching
Developer Tools: Better debugging, testing utilities, IDE plugins
RAG & Search: Advanced retrieval strategies, hybrid search, multi-modal embeddings
We welcome contributions! Whether it's new components, bug fixes, documentation, or examples, please check our GitHub repository for contribution guidelines.
The default branch, stable, is release-only: it points at the latest release, so what you see on the repository's front page describes that release. Development happens on main, which is where merge requests go and where unreleased changes and their documentation accumulate — check it out first:
git clone https://github.com/sandialabs/talkpipe.git cd talkpipe && git checkout main Local development uses uv against the committed uv.lock, so contributors share one reproducible set of versions:
uv sync --all-extras CI does not use the lockfile. It installs with pip (pip install -e ".[dev,all]") and resolves dependencies fresh, on purpose: that is what someone running pip install talkpipe gets, so the build breaks when they would break — a dependency problem the lockfile would hide is exactly what we want CI to see.
Two consequences worth remembering:
uv.lock is a development convenience. It pins nothing for users, and it is not a security control — the version floors in pyproject.toml are what actually protect an install. Fix a vulnerable dependency by raising its floor, not by refreshing the lock.
The lock must still stay honest. CI runs uv lock --check, which installs nothing and fails only when uv.lock and pyproject.toml have drifted apart. If you change dependencies in pyproject.toml, run uv lock and commit the result.
Code quality. CI fails on any finding from ruff check ., ruff format --check ., or mypy (the rule set and type-checking config live in pyproject.toml), so run them before pushing — ruff check --fix . && ruff format . fixes most findings. To run the same checks on every commit, opt in once per clone with uv run pre-commit install; pre-commit run --all-files reproduces the CI gate locally.
Releasing. The version comes from the git tag (setuptools_scm); the tag conventions and the publish steps are in RELEASING.md.
TalkPipe 1.0 is a stable release. From 1.0.0 onward we follow semantic versioning:
Public API. Everything a program can reach without a leading underscore in the modules listed under Public surface in the developer handbook, every registered ChatterLang segment and source name and its parameters, the talkpipe.plugins / talkpipe.sources / talkpipe.segments entry-point groups, and the console scripts. Internals of talkpipe.app and anything underscored may change in any release.
Compatibility. Minor releases (1.x) add features and keep the public API working. Anything scheduled for removal first emits a DeprecationWarning for at least one minor release and is removed no earlier than the next major release.
Supported Python: 3.11, 3.12, and 3.13, tested in CI on each.
TalkPipe is a programming language, and its security model is analogous to Jupyter's: a script runs with the privileges of the user who runs it, so run scripts you trust and protect the servers the way you would a notebook server. Details in Security and trust model.
TalkPipe is licensed under the Apache License 2.0. See LICENSE file for details.
Author/Maintainer: Travis Bauer
Apache-2.0 View SPDX License List
dev ollama openai anthropic pypdf pillow model2vec all
Development Status 4 - Beta
Intended Audience Developers
Operating System OS Independent
Programming Language Python :: 3
Topic Scientific/Engineering :: Artificial Intelligence
Software Development :: Libraries
Release files for talkpipe 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 30.1 MB
Release files / talkpipe-1.4.0.tar.gz
Release files / talkpipe-1.4.0-py3-none-any.whl
Security for talkpipe 1.4.0
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Dec 3, 2026 2 release files No provenance
Nov 12, 2026 2 release files No provenance
Oct 24, 2026 2 release files No provenance
Oct 16, 2026 2 release files No provenance
Oct 13, 2026 2 release files No provenance
Sep 25, 2026 2 release files No provenance
Sep 18, 2026 2 release files No provenance
Sep 13, 2026 2 release files No provenance
Sep 12, 2026 2 release files No provenance
Sep 4, 2026 2 release files No provenance
Aug 29, 2026 2 release files No provenance
Aug 21, 2026 2 release files No provenance
Aug 20, 2026 2 release files No provenance
Aug 17, 2026 2 release files No provenance
Aug 16, 2026 2 release files No provenance
Jul 28, 2026 2 release files No provenance
Jul 23, 2026 2 release files No provenance
Jul 20, 2026 2 release files No provenance
Jul 19, 2026 2 release files No provenance
Jul 18, 2026 2 release files No provenance
Jul 17, 2026 2 release files No provenance
Jul 15, 2026 2 release files No provenance
Jul 14, 2026 2 release files No provenance
Jul 12, 2026 2 release files No provenance
Jul 11, 2026 2 release files No provenance
Jul 8, 2026 2 release files No provenance
Jul 2, 2026 2 release files No provenance
Jun 6, 2026 2 release files No provenance
May 24, 2026 2 release files No provenance
May 18, 2026 2 release files No provenance
May 6, 2026 2 release files No provenance
Apr 26, 2026 2 release files No provenance
Apr 8, 2026 2 release files No provenance
Mar 25, 2026 2 release files No provenance
Mar 14, 2026 2 release files No provenance
Mar 12, 2026 2 release files No provenance
Mar 10, 2026 2 release files No provenance
Mar 9, 2026 2 release files No provenance
Feb 18, 2026 2 release files No provenance
Feb 11, 2026 2 release files No provenance
Feb 3, 2026 2 release files No provenance
Jan 10, 2026 2 release files No provenance
Dec 29, 2025 2 release files No provenance
Dec 19, 2025 2 release files No provenance
Dec 18, 2025 2 release files No provenance
Dec 5, 2025 2 release files No provenance
Nov 26, 2025 2 release files No provenance
Nov 21, 2025 2 release files No provenance
Nov 17, 2025 2 release files No provenance
Nov 13, 2025 2 release files No provenance
Nov 12, 2025 2 release files No provenance
Nov 11, 2025 2 release files No provenance
Nov 2, 2025 2 release files No provenance
Oct 30, 2025 2 release files No provenance
Oct 29, 2025 2 release files No provenance
Oct 25, 2025 2 release files No provenance
Oct 24, 2025 2 release files No provenance
Oct 16, 2025 2 release files No provenance
Oct 9, 2025 2 release files No provenance
Oct 3, 2025 2 release files No provenance
Sep 20, 2025 2 release files No provenance
Sep 11, 2025 2 release files No provenance
Sep 8, 2025 2 release files No provenance
Sep 6, 2025 2 release files No provenance
Sep 1, 2025 2 release files No provenance
Aug 23, 2025 2 release files No provenance
Aug 22, 2025 2 release files No provenance
Aug 20, 2025 2 release files No provenance
Aug 18, 2025 2 release files No provenance
Aug 14, 2025 2 release files No provenance
Aug 12, 2025 2 release files No provenance
Aug 4, 2025 2 release files No provenance
Aug 3, 2025 2 release files No provenance
Jul 27, 2025 2 release files No provenance
Jul 20, 2025 2 release files No provenance
Jul 18, 2025 2 release files No provenance
Jul 14, 2025 2 release files No provenance
Jul 5, 2025 2 release files No provenance
Jun 18, 2025 2 release files No provenance
Jun 9, 2025 2 release files No provenance
Jun 6, 2025 2 release files No provenance
Jun 2, 2025 2 release files No provenance
May 6, 2025 2 release files No provenance
Apr 16, 2025 2 release files No provenance
Nov 25, 2024 2 release files No provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation




