Skip to main content

High-performance acceleration for CrewAI - 2-5x faster memory, tools, and task execution with zero code changes

Project description

Fast-CrewAI

Drop-in performance acceleration for CrewAI - Get up to 34x faster serialization, 17x faster tool execution, and 11x faster database search with zero code changes to your existing CrewAI projects.

CI Compatibility Python 3.10-3.13 Rust

Fast-CrewAI is authored by Dipankar Sarkar and maintained by Neul Labs to bring production-ready acceleration to CrewAI workloads.

🚀 Quick Start

Get your CrewAI code running faster in seconds:

# Install the acceleration layer (using uv - recommended)
uv add fast-crewai

# Or with pip
pip install fast-crewai

# Add one line to your existing CrewAI code
import fast_crewai.shim  # Add this before importing CrewAI
from crewai import Agent, Task, Crew  # Your existing code remains unchanged!

That's it! Your existing CrewAI code now benefits from Rust-powered acceleration.

🏎️ What Gets Faster

Component Performance Boost What This Means
Serialization 🚀 34x faster Agent message serialization using serde
Tool Execution 🚀 17x faster Result caching and JSON validation
Database Search 🚀 11x faster FTS5 full-text search with BM25 ranking
Memory Storage TF-IDF search Semantic search using cosine similarity
Task Execution Dependency tracking Topological sort and parallel scheduling

See BENCHMARK.md for detailed performance data.

🤝 How It Works

Fast-CrewAI uses smart monkey patching that seamlessly integrates with your existing CrewAI code:

# Your existing CrewAI code - no changes needed!
from crewai import Agent, Task, Crew  # This automatically gets accelerated!

# Just add this line once at the top of your main file
import fast_crewai.shim  # Activates acceleration for all CrewAI components

The acceleration happens automatically through dynamic inheritance - your tools, tasks, and other components get wrapped with performance improvements while keeping 100% API compatibility.

📦 Installation

Get Started Quickly

# Using uv (recommended)
uv add fast-crewai

# Or with pip
pip install fast-crewai

For Development

# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh

# Clone and setup
git clone https://github.com/neul-labs/fast-crewai.git
cd fast-crewai
uv sync --dev

# Build Rust extensions for maximum performance
uv run maturin develop --release

🧪 Testing & Verification

Verify Fast-CrewAI is working with these tests:

# Run all unit tests
make test

# Compare performance (with/without acceleration) - runs full CrewAI workflows
make test-comparison

# Run extensive performance tests (1000 iterations)
make test-comparison-extensive

# Full compatibility check with CrewAI
make test-compatibility

# Run internal benchmarks
make benchmark

The test-comparison command runs complete CrewAI workflows that engage all acceleration components:

  • Memory acceleration: Through CrewAI's memory systems (RAG storage, short/long-term memory)
  • Database acceleration: Through SQLite operations for memory persistence
  • Tool execution: Through any tools used in the workflow (hooks enabled)
  • Task execution: Through CrewAI's task processing system (hooks enabled)

For example, on basic workflows the comparison typically shows around 13% performance improvement:

==================================================
Workflow Type: basic
Iterations: 3
Baseline (without Fast-CrewAI): 27.88s
Accelerated (with Fast-CrewAI): 24.50s
Time Saved: 3.38s
Performance Improvement: 1.13x faster
Percent Improvement: 13.00%
==================================================

Higher improvements (2-5x) are typically seen with memory-intensive and database-heavy workflows where Fast-CrewAI's Rust acceleration provides greater benefits.

⚙️ Configuration

Fine-tune your acceleration with environment variables:

# Enable all acceleration (default)
export FAST_CREWAI_ACCELERATION=1

# Disable acceleration (for debugging)
export FAST_CREWAI_ACCELERATION=0

# Control specific components
export FAST_CREWAI_MEMORY=true    # Memory acceleration
export FAST_CREWAI_TOOLS=false    # Tool acceleration
export FAST_CREWAI_DATABASE=true  # Database acceleration

📊 Performance Benchmarks

Latest benchmark results (see BENCHMARK.md for full details):

Performance Improvements

Component Improvement Details
Serialization 🚀 34.5x faster 80,525 ops/s (Rust) vs 2,333 ops/s (Python)
Tool Execution 🚀 17.3x faster Result caching with configurable TTL
FTS Database Search 🚀 11.2x faster 10,206 ops/s (FTS5) vs 913 ops/s (LIKE)
Database Query 🚀 1.3x faster Connection pooling with r2d2
Memory Storage Comparable TF-IDF semantic search

Memory Usage

Component Python Rust Savings
Tool Execution 1.2 MB 0.0 MB 99% less
Serialization 8.0 MB 3.4 MB 58% less
Database 0.1 MB 0.1 MB 31% less

Key Features by Component

Database (FTS5)

  • Full-text search with BM25 relevance ranking
  • Automatic index synchronization via triggers
  • Connection pooling for concurrent access

Tool Executor

  • Result caching with TTL expiration
  • Fast JSON validation using serde
  • Execution statistics tracking

Task Executor

  • Dependency tracking with topological sort
  • Cycle detection for circular dependencies
  • Parallel task scheduling via Tokio

Serialization

  • serde-based JSON serialization (34x faster)
  • Lower memory footprint (58% less)

🛠️ Development & Testing

The project includes comprehensive tools for development and performance analysis:

# Run all tests
make test

# Run performance comparisons
make test-comparison                 # Quick comparison
make test-comparison-extensive      # 1000 iterations for detailed analysis

# Run compatibility tests
make test-compatibility             # Verify with latest CrewAI

# Run internal benchmarks
make benchmark                      # Test components in isolation

📚 Learn More

For complete documentation, visit the docs/ directory.

📋 Requirements & Compatibility

Python Version Support

Python Version Status Notes
Python 3.10 ✅ Supported Fully tested
Python 3.11 ✅ Supported Fully tested
Python 3.12 ✅ Supported Fully tested
Python 3.13 ✅ Supported Fully tested
Python 3.9 ⚠️ Limited May work but not tested in CI

Dependencies

  • CrewAI: Any recent version supported
  • Rust toolchain: Optional, for native extensions (provides maximum performance)
    • PyO3 0.23+ is used for Python-Rust bindings
    • Falls back to pure Python if Rust extensions aren't available

Platform Support

Platform Status
Linux (x86_64) ✅ Fully supported
macOS (x86_64) ✅ Fully supported
macOS (ARM64/M1) ✅ Fully supported
Windows (x86_64) ✅ Supported

🤝 Contributing

Contributions are welcome! Check out our development guide for setup instructions and coding standards.

📄 License

MIT License - see LICENSE file for details.

👥 Maintainers

🔧 Support

Fast-CrewAI is in active development. Memory and database acceleration are production-ready, with ongoing optimization for tools and tasks.

Project details


Download files

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

Source Distribution

fast_crewai-0.1.5.tar.gz (151.6 kB view details)

Uploaded Source

Built Distributions

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

fast_crewai-0.1.5-cp313-cp313-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.13Windows x86-64

fast_crewai-0.1.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

fast_crewai-0.1.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

fast_crewai-0.1.5-cp313-cp313-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

fast_crewai-0.1.5-cp313-cp313-macosx_10_12_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

fast_crewai-0.1.5-cp312-cp312-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.12Windows x86-64

fast_crewai-0.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

fast_crewai-0.1.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

fast_crewai-0.1.5-cp312-cp312-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

fast_crewai-0.1.5-cp312-cp312-macosx_10_12_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

fast_crewai-0.1.5-cp311-cp311-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.11Windows x86-64

fast_crewai-0.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

fast_crewai-0.1.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

fast_crewai-0.1.5-cp311-cp311-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

fast_crewai-0.1.5-cp311-cp311-macosx_10_12_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

File details

Details for the file fast_crewai-0.1.5.tar.gz.

File metadata

  • Download URL: fast_crewai-0.1.5.tar.gz
  • Upload date:
  • Size: 151.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.13.1

File hashes

Hashes for fast_crewai-0.1.5.tar.gz
Algorithm Hash digest
SHA256 32181e831e26810f5f4cf711f097d3b62deebd2b3048c13f5fc9b691865eb378
MD5 698d5103af53b69c148e8e7aad5531ca
BLAKE2b-256 b163072011a0f51b3282371ac11a1baaad59428e6fdf01e4e3382b698fe026ca

See more details on using hashes here.

File details

Details for the file fast_crewai-0.1.5-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for fast_crewai-0.1.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 dba48e8cfd1553e3dffa398cce8450a0289ffe0bde1aa4ce73e76b4a0076c89d
MD5 0d29cffc86b2392ac0f5f058282ecd31
BLAKE2b-256 b4cec865366435def5eb0fd2f8820f849ae9e94f5f3902fb690c4de5084e74e1

See more details on using hashes here.

File details

Details for the file fast_crewai-0.1.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fast_crewai-0.1.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6ebd5109731ac3268fabd8b3cdc5596db50d89ad9fe6de12092b61368434280d
MD5 c61f2e60c9587bc84ccc5cbcbf6506c5
BLAKE2b-256 d4d016f266c783ac9191ba135e2aba6dd525a27500a246eddc5691a1e97238ff

See more details on using hashes here.

File details

Details for the file fast_crewai-0.1.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fast_crewai-0.1.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9001454d6368d1af4fcd30227250b27df216d145dd16acf8fd3f4ccae79d58e3
MD5 2ec83c29338486be011839bd8296b726
BLAKE2b-256 99dae76d41519826005843f2ff9e617d72dd9284182c5f42c1b9a7a0a64888c0

See more details on using hashes here.

File details

Details for the file fast_crewai-0.1.5-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fast_crewai-0.1.5-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 72b28b6e8559a7f485ade3c56669e5bb890e616c78c2bbef3ba06261ea828029
MD5 f52b029c82845c0b2bfeedc9300c5c97
BLAKE2b-256 4c42a9de1aed0dcd398efa190bd0e5a39fa002eb25a04a6c982635afbd5b5080

See more details on using hashes here.

File details

Details for the file fast_crewai-0.1.5-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for fast_crewai-0.1.5-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e151354256159b9f1cc21ec207f7b6948de407da0de0a1ae0158ce68b3b91cfe
MD5 54d2c8d6436799e9751d3f404e50689b
BLAKE2b-256 a965bb4ada8a6fc45ac88b144b8e9912209d8701787d9f878fa149216f30fc5f

See more details on using hashes here.

File details

Details for the file fast_crewai-0.1.5-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for fast_crewai-0.1.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1ad2f83e25fc63cba4ad340829b2265338be99d0a5154313fb17b9505c0e4561
MD5 fb810d497d901f6265436d4cf182ac30
BLAKE2b-256 f7e1df4f3277f493486773610cf56450a8555a342ba4ce3b829fca474fc4df52

See more details on using hashes here.

File details

Details for the file fast_crewai-0.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fast_crewai-0.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ce442cf8b818717feedc66d306e58e0f5bc0184465015042fef284a67f05a5bb
MD5 c50ec96accacfbc0b0581b98f7675fa0
BLAKE2b-256 6b8d93f3e100f0e5f5b9b3aaa7c334733fa6b6cea68444bbc174ee8d13d99a8f

See more details on using hashes here.

File details

Details for the file fast_crewai-0.1.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fast_crewai-0.1.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2c4210760ac26cb26276fa187c52b7efb968b4445ad81dda45b0ed5fbbf08b9b
MD5 e61e84e0cf011bec4436c4593b0260ba
BLAKE2b-256 cb12a4a5ad2c9494f13ff2b4f88f95fce77375c69f70c0784a0b1511c9d4c8a2

See more details on using hashes here.

File details

Details for the file fast_crewai-0.1.5-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fast_crewai-0.1.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3efabfe2a7ff15fbf02696ed895460f7fcffaa99bbbad1b75664453c82f9dd1d
MD5 5cda08e9f4c3e921cef9fda9892c4b28
BLAKE2b-256 3e0e3c5e207e5b952ea5284b62c2899fb2080dbb002e30d95f0db877f849de80

See more details on using hashes here.

File details

Details for the file fast_crewai-0.1.5-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for fast_crewai-0.1.5-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 342ff6be40b07e7e5aacbc549aa6d0b6d08e58872efacf65b97d874dee004a05
MD5 36a5025980e399a05efbd56c5d978373
BLAKE2b-256 11e855da81ffd1b09cdbfed6177ff8e1f4d779dfbc8e2a1ef2881fbf9618cee3

See more details on using hashes here.

File details

Details for the file fast_crewai-0.1.5-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for fast_crewai-0.1.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 362f5616b30b446c1d0d6007561659379a0d5aaf82e4990785ce7b93327ca5b3
MD5 1aef0fd6c64cb3ad3d6f6cc2d060f2b4
BLAKE2b-256 c457439105c79b4752aac079deda7b7a544e568b65a35c26f6b85068859479b4

See more details on using hashes here.

File details

Details for the file fast_crewai-0.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fast_crewai-0.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 15a8bc6962035bdb45a93e4389ea2566793cfaf36b1165ac9cf289410ab75050
MD5 1bfa4346b1719e6feabf40d89ce15f92
BLAKE2b-256 4ecd3b6d3866af3a462b5b230b93b9d6611c98cff48cf350a87322241319b963

See more details on using hashes here.

File details

Details for the file fast_crewai-0.1.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fast_crewai-0.1.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0c9ef5f5137090a0648f542d4620b575eed52af94497b67470833e8675b96f39
MD5 59edfd1b8c97a469e717f27fbf23f17e
BLAKE2b-256 0f15153f26ab9722d038091dc2eac57919929f71207c576e24f6daecaff43381

See more details on using hashes here.

File details

Details for the file fast_crewai-0.1.5-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fast_crewai-0.1.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0d7d93773b3b6907a5b512f080fd732b70b8c663c45723501430973a99217c33
MD5 3b0cb660a7cf62186532703822eec02a
BLAKE2b-256 52f8d1f23c28e7e94ef9968c6a1c5a76f721049fa9d3d3e3d8aa239c27e44ace

See more details on using hashes here.

File details

Details for the file fast_crewai-0.1.5-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for fast_crewai-0.1.5-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 11fc1c06bbd569470c457e4d46682e2643f36b12c5d81d91d957fd5523382b21
MD5 49a5b8b41f1462858426729830fec4a3
BLAKE2b-256 199c730adbf18ab3cbe7752939918e535d997e9ac6bba34124ade53fdd524d9c

See more details on using hashes here.

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