Metadata-Version: 2.4
Name: crewai-ainative
Version: 0.1.0
Summary: Configure crewai to use AINative's free LLMs + ZeroMemory — no OpenAI key needed.
Author-email: AINative Studio <dev@ainative.studio>
License: MIT
Project-URL: Homepage, https://github.com/AINative-Studio/crewai-ainative
Project-URL: Documentation, https://docs.ainative.studio
Project-URL: Repository, https://github.com/AINative-Studio/crewai-ainative
Project-URL: Issues, https://github.com/AINative-Studio/crewai-ainative/issues
Keywords: crewai,crewai-plugin,multi-agent,ai-agents,ainative,free-llm,zerodb,zeromemory,auto-provisioning,agent-memory,llama,claude,cursor
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.28
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Dynamic: license-file

# crewai-ainative

Configure [crewai](https://github.com/crewAIInc/crewAI) to use AINative's free LLMs + ZeroMemory. No OpenAI key needed.

**Zero setup.** Works with Llama 3.3 70B, Qwen3, DeepSeek 4, and Kimi K2 — all free.

## Install

```bash
pip install crewai-ainative
```

## Quick Start

```python
from crewai_ainative import configure_crew
from crewai import Agent, Task, Crew

configure_crew()  # Auto-provisions free API key, sets env vars

agent = Agent(
    role="Researcher",
    goal="Research AI trends",
    backstory="Expert AI researcher with deep knowledge",
)

task = Task(
    description="Research the latest trends in multi-agent AI systems",
    agent=agent,
    expected_output="A summary of key trends",
)

crew = Crew(agents=[agent], tasks=[task])
result = crew.kickoff()
```

## How It Works

`crewai-ainative` is a companion package (NOT a fork) that configures crewai to use AINative's free, OpenAI-compatible API. It sets the environment variables crewai reads (`OPENAI_API_KEY`, `OPENAI_API_BASE`, `OPENAI_MODEL_NAME`) to route all LLM calls through AINative.

On first use, the package auto-provisions a free API key (72-hour TTL). Claim your account at [ainative.studio/signup](https://ainative.studio/signup) for permanent access.

## Available Models

```python
from crewai_ainative import configure_crew

configure_crew(model="llama")     # meta-llama/Llama-3.3-70B-Instruct (default)
configure_crew(model="qwen")      # qwen3-coder-flash
configure_crew(model="deepseek")  # deepseek-4-flash
configure_crew(model="kimi")      # kimi-k2
```

Or pass any full model ID:

```python
configure_crew(model="meta-llama/Llama-4-Scout-17B-16E-Instruct")
```

## ZeroMemory Integration

Store and recall agent memories across crew runs:

```python
from crewai_ainative import configure_crew, get_memory_config

configure_crew()
memory_config = get_memory_config(entity="my-research-crew")
# memory_config has api_key and memory_api_base for ZeroDB integration
```

## Explicit API Key

```python
configure_crew(api_key="your-key-here")
```

Or set the environment variable:

```bash
export AINATIVE_API_KEY=your-key-here
```

## API Key Resolution Order

1. Explicit `api_key` parameter
2. `AINATIVE_API_KEY` environment variable
3. `ZERODB_API_KEY` environment variable
4. `~/.zerodb/credentials.json` (shared with zerodb ecosystem)
5. Auto-provision via instant-db

## Requirements

- Python >= 3.9
- crewai >= 0.30.0

## License

MIT
