Metadata-Version: 2.4
Name: arklex
Version: 0.1.12
Summary: The official Python library for the arklex API
Project-URL: Homepage, https://github.com/arklexai/Agent-First-Organization
Project-URL: Issues, https://github.com/arklexai/Agent-First-Organization/issues
Author-email: "Arklex.AI" <support@arklex.ai>
License-Expression: MIT
License-File: LICENSE.md
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Requires-Dist: email-validator<3.0.0,>=2.2.0
Requires-Dist: faiss-cpu<2.0.0,>=1.10.0
Requires-Dist: fastapi-cli<1.0.0,>=0.0.5
Requires-Dist: fastapi<1.0.0,>=0.115.3
Requires-Dist: google-generativeai<1.0.0,>=0.8.0
Requires-Dist: greenlet<4.0.0,>=3.1.1
Requires-Dist: httptools<1.0.0,>=0.6.4
Requires-Dist: janus<2.0.0,>=1.0.0
Requires-Dist: jinja2<4.0.0,>=3.1.0
Requires-Dist: langchain-community<1.0.0,>=0.4.0
Requires-Dist: langchain-openai<2.0.0,>=1.0.0
Requires-Dist: linkify-it-py<3.0.0,>=2.0.3
Requires-Dist: markdown>=3.8
Requires-Dist: mdit-py-plugins<1.0.0,>=0.4.2
Requires-Dist: networkx<4.0.0,>=3.4.2
Requires-Dist: openai-agents<1.0.0,>=0.2.10
Requires-Dist: openai<3.0.0,>=1.109.1
Requires-Dist: orjson<4.0.0,>=3.10.1
Requires-Dist: parsedatetime<3.0,>=2.6
Requires-Dist: phonenumbers<9.0.0,>=8.13.48
Requires-Dist: pydantic-ai<1.0.0,>=0.1.10
Requires-Dist: pysocks<2.0.0,>=1.7.1
Requires-Dist: pytest-asyncio<0.19.0,>=0.18.0
Requires-Dist: pytest-cov<4.0.0,>=3.0.0
Requires-Dist: pytest-env<2.0.0,>=1.0.0
Requires-Dist: pytest-mock<4.0.0,>=3.10.0
Requires-Dist: pytest<9.0.0,>=8.3.5
Requires-Dist: python-levenshtein<1.0.0,>=0.26.0
Requires-Dist: python-multipart<1.0.0,>=0.0.12
Requires-Dist: redis<7.0.0,>=6.2.0
Requires-Dist: rich<15.0.0,>=14.0.0
Requires-Dist: scikit-learn<2.0.0,>=1.7.0
Requires-Dist: selenium<5.0.0,>=4.26.1
Requires-Dist: tavily-python<1.0.0,>=0.5.0
Requires-Dist: textual<1.0.0,>=0.85.2
Requires-Dist: typing-extensions<5.0.0,>=4.13.2
Requires-Dist: undecorated>=0.3.0
Requires-Dist: unstructured-client<1.0.0,>=0.30.0
Requires-Dist: unstructured[doc,docx,md,ppt,pptx,xlsx]<1.0.0,>=0.16.4
Requires-Dist: watchfiles<1.0.0,>=0.24.0
Requires-Dist: webdriver-manager==4.0.2
Requires-Dist: websockets<16.0,>=14.0
Provides-Extra: faiss
Requires-Dist: sentence-transformers<3.0.0,>=2.2.2; extra == 'faiss'
Provides-Extra: hubspot
Requires-Dist: hubspot-api-client<12.0.0,>=11.1.0; extra == 'hubspot'
Provides-Extra: llm
Requires-Dist: langchain-anthropic<2.0.0,>=0.3.5; extra == 'llm'
Requires-Dist: langchain-google-genai<3.0.0,>=2.0.9; extra == 'llm'
Requires-Dist: langchain-huggingface<2.0.0,>=0.3.0; extra == 'llm'
Provides-Extra: milvus
Requires-Dist: mysql-connector-python<9.0.0,>=8.3.0; extra == 'milvus'
Requires-Dist: pymilvus<3.0.0,>=2.4.7; extra == 'milvus'
Provides-Extra: shopify
Requires-Dist: shopifyapi<13.0.0,>=12.7.0; extra == 'shopify'
Provides-Extra: strict-versions
Requires-Dist: email-validator==2.2.0; extra == 'strict-versions'
Requires-Dist: faiss-cpu==1.10.0; extra == 'strict-versions'
Requires-Dist: fastapi-cli==0.0.5; extra == 'strict-versions'
Requires-Dist: fastapi==0.116.1; extra == 'strict-versions'
Requires-Dist: google-generativeai==0.8.0; extra == 'strict-versions'
Requires-Dist: greenlet==3.1.1; extra == 'strict-versions'
Requires-Dist: httptools==0.6.4; extra == 'strict-versions'
Requires-Dist: hubspot-api-client==11.1.0; extra == 'strict-versions'
Requires-Dist: janus==1.0.0; extra == 'strict-versions'
Requires-Dist: jinja2==3.1.4; extra == 'strict-versions'
Requires-Dist: langchain-community==0.4.1; extra == 'strict-versions'
Requires-Dist: langchain-openai==1.0.1; extra == 'strict-versions'
Requires-Dist: linkify-it-py==2.0.3; extra == 'strict-versions'
Requires-Dist: markdown==3.8; extra == 'strict-versions'
Requires-Dist: mdit-py-plugins==0.4.2; extra == 'strict-versions'
Requires-Dist: mysql-connector-python==8.3.0; extra == 'strict-versions'
Requires-Dist: networkx==3.4.2; extra == 'strict-versions'
Requires-Dist: openai-agents==0.2.10; extra == 'strict-versions'
Requires-Dist: openai==1.109.1; extra == 'strict-versions'
Requires-Dist: orjson==3.11.1; extra == 'strict-versions'
Requires-Dist: parsedatetime==2.6; extra == 'strict-versions'
Requires-Dist: phonenumbers==8.13.48; extra == 'strict-versions'
Requires-Dist: pydantic-ai==0.1.10; extra == 'strict-versions'
Requires-Dist: pymilvus==2.4.7; extra == 'strict-versions'
Requires-Dist: pysocks==1.7.1; extra == 'strict-versions'
Requires-Dist: pytest-asyncio==0.18.0; extra == 'strict-versions'
Requires-Dist: pytest-cov==3.0.0; extra == 'strict-versions'
Requires-Dist: pytest-env==1.0.0; extra == 'strict-versions'
Requires-Dist: pytest-mock==3.10.0; extra == 'strict-versions'
Requires-Dist: pytest==8.3.5; extra == 'strict-versions'
Requires-Dist: python-levenshtein==0.26.0; extra == 'strict-versions'
Requires-Dist: python-multipart==0.0.12; extra == 'strict-versions'
Requires-Dist: redis==6.2.0; extra == 'strict-versions'
Requires-Dist: selenium==4.26.1; extra == 'strict-versions'
Requires-Dist: shopifyapi==12.7.0; extra == 'strict-versions'
Requires-Dist: tavily-python==0.5.0; extra == 'strict-versions'
Requires-Dist: textual==0.85.2; extra == 'strict-versions'
Requires-Dist: twilio==9.4.1; extra == 'strict-versions'
Requires-Dist: undecorated==0.3.0; extra == 'strict-versions'
Requires-Dist: unstructured-client==0.30.0; extra == 'strict-versions'
Requires-Dist: unstructured[doc,docx,md,ppt,pptx,xlsx]==0.16.4; extra == 'strict-versions'
Requires-Dist: watchfiles==0.24.0; extra == 'strict-versions'
Requires-Dist: webdriver-manager==4.0.2; extra == 'strict-versions'
Provides-Extra: twilio
Requires-Dist: twilio<10.0.0,>=9.4.1; extra == 'twilio'
Description-Content-Type: text/markdown

# 🧠 Arklex AI · Agent-First Framework

<div align="center">

![Arklex AI Logo](Arklex_AI__logo.jpeg)

**Build, deploy, and scale intelligent AI agents with enterprise-grade reliability**

[![Release](https://img.shields.io/github/release/arklexai/Agent-First-Organization?logo=github)](https://github.com/arklexai/Agent-First-Organization/releases)
[![PyPI](https://img.shields.io/pypi/v/arklex.svg)](https://pypi.org/project/arklex)
[![Python](https://img.shields.io/pypi/pyversions/arklex)](https://pypi.org/project/arklex)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md)
[![Discord](https://img.shields.io/badge/discord-join%20community-7289da?logo=discord)](https://discord.gg/kJkefzkRg5)
![Coverage](https://img.shields.io/badge/coverage-48.2%25-green)

🚀 [Quick Start](#-get-started-in-5-minutes) • 📚 [Documentation](https://arklexai.github.io/Agent-First-Organization/) • 💡 [Examples](./examples/)

</div>

---

## 🚀 Get Started in 5 Minutes

### Install & Setup

```bash
# Install
pip install arklex

# Create .env file
echo "OPENAI_API_KEY=your_key_here" > .env

# Clone the repository (required if you want to run example/test scripts)
git clone https://github.com/arklexai/Agent-First-Organization.git
cd Agent-First-Organization
pip install -e .

# Test your API keys (recommended)
python test_api_keys.py

# Create your first agent
python create.py \
  --config ./examples/customer_service/customer_service_config.json \
  --output-dir ./examples/customer_service \
  --llm_provider openai \
  --model gpt-4o

# Run agent
python run.py \
  --input-dir ./examples/customer_service \
  --llm_provider openai \
  --model gpt-4o

# For evaluation and testing, you can also use the model API server:
# 1. Start the model API server (defaults to OpenAI with "gpt-4o-mini" model):
python model_api.py --input-dir ./examples/customer_service

# 2. Run evaluation (in a separate terminal):
python eval.py --model_api http://127.0.0.1:8000/eval/chat \
  --config "examples/customer_service/customer_service_config.json" \
  --documents_dir "examples/customer_service" \
  --model "claude-3-haiku-20240307" \
  --llm_provider "anthropic" \
  --task "all"
```

---
## 📺 Learn by Example

### ▶️ Build a Customer Service Agent in 20 Minutes

<p align="center">
  <a href="https://youtu.be/y1P2Ethvy0I" target="_blank">
    <img src="https://markdown-videos-api.jorgenkh.no/url?url=https%3A%2F%2Fyoutu.be%2Fy1P2Ethvy0I" alt="Watch the video" width="600px" />
  </a>
</p>

👉 **Explore the full tutorial:** [Customer Service Agent Walkthrough](https://arklexai.github.io/Agent-First-Organization/docs/tutorials/customer-service)


---

## ⚡ Key Features

- **🚀 90% Faster Development** — Deploy agents in days, not months
- **🧠 Agent-First Design** — Purpose-built for multi-agent orchestration
- **🔌 Model Agnostic** — OpenAI, Anthropic, Gemini, and more
- **📊 Built-in Evaluation** — Comprehensive testing suite
- **🛡️ Enterprise Security** — Authentication and rate limiting
- **⚡ Production Ready** — Monitoring, logging, auto-scaling

---

## 🏗️ Architecture

```mermaid
graph TB
    A[Task Graph] --> B[Orchestrator]
    B --> C[Workers]
    B --> D[Tools]
    C --> E[RAG Worker]
    C --> F[Database Worker]
    C --> G[Custom Workers]
    D --> I[API Tools]
    D --> J[External Tools]
```

**Core Components:**

- **Task Graph** — Declarative DAG workflows
- **Orchestrator** — Runtime engine with state management
- **Workers** — RAG, database, web automation
- **Tools** — Shopify, HubSpot, Google Calendar integrations

---

## 💡 Use Cases

| **Domain** | **Capabilities** |
|------------|------------------|
| **Customer service for e-commerce** | RAG chatbots, ticket routing, support workflows |
| **E-commerce such as shopify sales and customer** | Order management, inventory tracking, recommendations |
| **Business Process** | Scheduling, CRM operations, document processing |

---

## 📚 Examples

| **Example** | **Description** | **Complexity** |
|-------------|-----------------|----------------|
| [Customer Service](./examples/customer_service/) | RAG-powered support | ⭐⭐ |
| [Shopify Integration](./examples/shopify/) | E-commerce management | ⭐⭐⭐ |
| [HubSpot CRM](./examples/hubspot/) | Contact management | ⭐⭐⭐ |
| [Calendar Booking](./examples/calendar/) | Scheduling system | ⭐⭐ |
| [Human-in-the-Loop](./examples/hitl_server/) | Interactive workflows | ⭐⭐⭐⭐ |

---

## 🔧 Configuration

**Requirements:** Python 3.10+, API keys

```env
# Required: Choose one or more LLM providers
OPENAI_API_KEY=your_key_here
# OR ANTHROPIC_API_KEY=your_key_here
# OR GOOGLE_API_KEY=your_key_here

# Optional: Enhanced features
MILVUS_URI=your_milvus_uri
MYSQL_USERNAME=your_username
TAVILY_API_KEY=your_tavily_key
```

**Testing API Keys:**
After adding your API keys to the `.env` file, run the test script to verify they work correctly:

```bash
# Test all configured API keys
python test_api_keys.py

# Test specific providers only
python test_api_keys.py --providers openai gemini
python test_api_keys.py --providers openai anthropic
```

---

## 📖 Documentation

- 📚 **[Full Documentation](https://arklexai.github.io/Agent-First-Organization/)**
- 🚀 **[Quick Start](docs/QUICKSTART.md)**
- 🛠️ **[API Reference](docs/API.md)**
- 🏗️ **[Architecture](docs/ARCHITECTURE.md)**
- 🚀 **[Deployment](docs/DEPLOYMENT.md)**

---

## 🤝 Community

- 🐛 [Report Issues](https://github.com/arklexai/Agent-First-Organization/issues)
- 💬 [Discord](https://discord.gg/kJkefzkRg5)
- 🐦 [Twitter](https://twitter.com/arklexai)
- 💼 [LinkedIn](https://www.linkedin.com/company/arklex)
- 📧 [Email Support](mailto:support@arklex.ai)

---

## 📄 License

Arklex AI is released under the **MIT License**. See [LICENSE](LICENSE.md) for details.

This means you can:

- ✅ Use Arklex AI for commercial projects
- ✅ Modify and distribute the code
- ✅ Use it in proprietary applications
- ✅ Sell applications built with Arklex AI

The only requirement is that you include the original license and copyright notice.

---

## 🙏 Acknowledgments

Thanks to all our contributors and the open-source community for making this project possible!

### 🌟 Contributors

<a href="https://github.com/arklexai/Agent-First-Organization/graphs/contributors">
  <img src="https://contributors-img.web.app/image?repo=arklexai/Agent-First-Organization" />
</a>

### 🤝 Open Source Dependencies

Arklex AI builds on the shoulders of giants:

- **LangChain** — LLM framework and tooling
- **FastAPI** — Modern web framework
- **Pydantic** — Data validation
- **SQLAlchemy** — Database ORM
- **Milvus** — Vector database
- **And many more...**

---

<div align="center">

**Made with ❤️ by the Arklex AI Team**

[Website](https://arklex.ai) • [Documentation](https://arklexai.github.io/Agent-First-Organization/) • [GitHub](https://github.com/arklexai/Agent-First-Organization) • [Discord](https://discord.gg/kJkefzkRg5) • [LinkedIn](https://www.linkedin.com/company/arklex)

</div>
