The provider-agnostic AI toolkit for Python: pipelines and agents your coding agent can write, that run unchanged from a laptop to production, on any model.
pip install yait-aichain==4.1.0 Copy PIP instructions
Let your coding agent write your agents. Ship the code you tested. Leave any provider with one word. Pipelines and agents, small enough for Claude Code, Codex or Cursor to learn from one file and build on.
from yait_aichain import Model, Skill skill = Skill( model = Model("claude-haiku-5-5"), # change this one word to switch providers input = {"messages": [{"role": "user", "parts": ["Summarise: {text}"]}]}, ) result = skill.run(variables={"text": "..."}) Change "claude-haiku-5-5" to "gpt-6-luna", "gemini-3-flash-preview" or "grok-4.3" — nothing else changes.
Your coding agent writes the agents. The whole contract is one 26 KB llms.txt, and the plugin for Claude Code, Codex and Cursor carries it with twenty worked recipes. Measured on tasks the docs were not written against: on twenty, a small model with the docs passed 15 in all three tries and Claude Code passed 19; on eleven for what 3.x added, both passed all eleven; and without the docs the same small model passed none of an earlier twenty (the measurements).
The code you tested is the code you ship. Only what you inject changes between a laptop and production: where state is stored, whose keys are used, what starts the run. A chain or an agent that waits for a person or a webhook parks, and resumes later in another process. An agent's state is its conversation, so one turn fits one serverless call. Spending stops at a ceiling in dollars, and keys can be resolved per request, per tenant.
No provider owns your code. Switching provider is changing the model name. When the new one cannot do what you asked — no top_k, no seed, a different image size — the result says what was adapted or dropped, instead of leaving you to find out from the output.
pip install yait-aichain One required dependency, urllib3 (and tomli on Python 3.10). Extras when you use what needs them: [yaml] to save and load, [mcp] for MCP servers, [fetch] to read pages locally — Installation. Keys, only for the providers you use:
export ANTHROPIC_API_KEY="…" export BFL_API_KEY="…" export DEEPSEEK_API_KEY="…" export GOOGLE_AI_API_KEY="…" export MOONSHOT_API_KEY="…" export META_API_KEY="…" export MINIMAX_API_KEY="…" export MISTRAL_API_KEY="…" export OPENAI_API_KEY="…" export PERPLEXITY_API_KEY="…" export DASHSCOPE_API_KEY="…" export RECRAFT_API_TOKEN="…" export STEPFUN_API_KEY="…" export XAI_API_KEY="…" export MIMO_API_KEY="…" export ZAI_API_KEY="…" export BRAVE_SEARCH_API_KEY="…" export COHERE_API_KEY="…" export EXA_API_KEY="…" export FIRECRAWL_API_KEY="…" export GOOGLE_API_KEY="…" export GOOGLE_CLOUD_API_KEY="…" export PARALLEL_API_KEY="…" export TAVILY_API_KEY="…" export TYPESAFE_API_KEY="…" export VOYAGE_API_KEY="…" Use it from Claude Code, Codex or Cursor One plugin carries the skill that teaches a coding agent to build on this library: SKILL.md, llms.txt and twenty worked recipes, generated by .github/scripts/skill.py from the files this repository tests.
/plugin marketplace add yaitio/aichain /plugin install yait-aichain@yait Codex — add the repository as a marketplace, then install yait-aichain from it:
codex plugin marketplace add yaitio/aichain Cursor — Customize → From GitHub Repository → yaitio/aichain, then install yait-aichain.
The skill alone works too: copy plugin/skills/yait-aichain/ into ~/.agents/skills/, which Codex and Cursor both read, or into ~/.claude/skills/ for Claude Code.
Every release is in CHANGELOG.md — what changed, and why it changed. Releases before 2.0 are recorded incompletely; the file says which ones and why they were not reconstructed.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
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.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.




