Skip to main content

Fast, lightweight AI agents powered by a Rust core

Project description

ferrant Python wrapper

This directory is an optional, thin Python binding around the Rust ferrant crate. The agent loop, providers, MCP, graph scheduler, persistence, streaming, and retrieval remain implemented in Rust. Installing this package does not change the Rust crate or its examples.

pip install ferrant

Then import it directly:

import asyncio
import os
from ferrant import Agent

async def main():
    agent = Agent.openai("gpt-5-nano", os.environ["OPENAI_API_KEY"])
    print(await agent.run("Explain Rust ownership in one paragraph."))

asyncio.run(main())

For local wrapper development, use maturin develop --release from this directory. End users do not need Maturin or a Rust toolchain when installing a prebuilt wheel.

The wheel uses PyO3's stable ABI for Python 3.9+. Rust futures are exposed as normal asyncio awaitables. Python custom-tool and graph-node callbacks are synchronous by design; keep expensive execution in Rust tools, MCP servers, or model calls.

See examples/ for Python counterparts of every top-level Rust example and matched advanced workflow examples.

The exposed surface covers OpenAI-compatible and Anthropic agents, Python tools, MCP-discovered tools, coordinator teams, multimodal input/output, streaming callbacks, schema-validated output, persistent retrieval, and durable workflow graphs with routes, parallel joins, retry/timeout policies, interrupts, resume, and recovery.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

ferrant-0.1.4-cp39-abi3-win_amd64.whl (4.4 MB view details)

Uploaded CPython 3.9+Windows x86-64

ferrant-0.1.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

ferrant-0.1.4-cp39-abi3-macosx_11_0_arm64.whl (4.6 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

File details

Details for the file ferrant-0.1.4-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: ferrant-0.1.4-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 4.4 MB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ferrant-0.1.4-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 5bd7ed9c611c0790180e375d554b864d3411012fedac7f68b1d8e52fb8ed83ec
MD5 9f32b42422604b9f70d0aff88e5bb9ee
BLAKE2b-256 b819b37a89b7e8b2a349d1962e7ac454641eef275229134e8c0dc334ac707faf

See more details on using hashes here.

Provenance

The following attestation bundles were made for ferrant-0.1.4-cp39-abi3-win_amd64.whl:

Publisher: python-wheels.yml on avinash31d/ferrant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ferrant-0.1.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ferrant-0.1.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e9cd92c02c4fd2f9c41f232f5e0e3819c889e95368a8971dd4cc9acbaf4c15ec
MD5 48c0897991ac4e38a1800aa55868f1a3
BLAKE2b-256 d3c840946cb34840df1c8e9cf20512b9697b34b4c26306b158cf868e924196e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for ferrant-0.1.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-wheels.yml on avinash31d/ferrant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ferrant-0.1.4-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ferrant-0.1.4-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 16749b6e27cbed5589f028235e26526c0d9bd57489cce251143235a00f39135a
MD5 e0424d832dd62033ed69d0071df30b36
BLAKE2b-256 6224d31a30902787f875063455d13749ef5fb734eb832734fd3e2b89ade58103

See more details on using hashes here.

Provenance

The following attestation bundles were made for ferrant-0.1.4-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: python-wheels.yml on avinash31d/ferrant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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