Skip to main content
infy is a zero-dependency Python framework. The core installs on a bare interpreter with no third-party runtime dependencies. Provider SDKs, pydantic, and the compiled Rust core are all optional extras you add only when you need them.

Requirements

  • Python 3.10, 3.11, 3.12, or 3.13.
  • pip. No system libraries are required for the core.
infy ships a compiled Rust extension (infy_core) that accelerates the hot paths (JSON parsing, similarity, tokenization). Every module that uses it falls back to a pure-Python implementation when the extension is absent, so the framework is fully functional either way.

Install the core

This installs the pure-Python framework and the Rust extension when a wheel is available for your platform, with a pure-Python fallback otherwise. The core covers the ChatModel protocol, runnables, structured output, create_agent, the StateGraph runtime, and the governance layer.

Add provider extras

Each model provider ships its SDK as an optional extra. Install only the ones you use.
The extras map to these packages:
Combine extras in one install, for example pip install "infy[openai,pydantic]". Quote the specifier so your shell does not interpret the brackets.
The all extra installs the four provider SDKs. It does not include pydantic. Add pydantic explicitly when you want validated structured output: pip install "infy[all,pydantic]".

Install from source (alpha)

infy is in alpha. Until the first tagged PyPI release, install from source.
The core includes a Rust extension, so a source install builds it with maturin. A release build is required for the full test suite and for accurate performance.
1

Clone the repository

2

Install with dev dependencies

The dev extra adds pytest, pytest-asyncio, ruff, mypy, and pydantic.
3

Build the Rust core

Build in release mode. Debug builds fail the performance checks.

Verify the install

If your Rust toolchain was unavailable during a source install, imports still succeed on the pure-Python fallback. The compiled infy_core extension only changes performance, not behavior.

Next steps

Quickstart

Send your first message and stream a response.

Providers

Configure OpenAI, Anthropic, Gemini, and Ollama.

Agents

Build a tool-calling agent with create_agent.

Governance

Policy-check tool calls and write a tamper-evident audit.