Metadata-Version: 2.1
Name: wayflowcore
Version: 25.4.2
Summary: Package defining the WayFlow core library and the assistant abstractions.
Home-page: https://github.com/oracle/wayflow
Author: Oracle
Author-email: 
License: UPL-1.0 OR APACHE-2.0
Keywords: NLP,text generation,code generation,LLM,Assistant,Tool,Agent
Classifier: Development Status :: 3 - Alpha
Classifier: Natural Language :: English
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python
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 :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10,<3.14
Description-Content-Type: text/markdown
Requires-Dist: pyagentspec>=25.4.1
Requires-Dist: httpx<1.0.0,>0.28.0
Requires-Dist: numpy<3.0.0,>=1.24.3
Requires-Dist: pandas<3.0.0,>=2.0.3
Requires-Dist: jinja2<4.0.0,>=3.1.6
Requires-Dist: jq<2.0.0,>=1.8.0
Requires-Dist: deprecated<2.0.0,>=1.2.18
Requires-Dist: json-repair<0.45.0,>=0.30.0
Requires-Dist: PyYAML<7.0.0,>=5.3
Requires-Dist: pydantic<3.0.0,>=2.7.4
Requires-Dist: mcp>=1.9.3
Requires-Dist: opentelemetry-api<2.0.0,>=1.33.0
Requires-Dist: opentelemetry-sdk<2.0.0,>=1.33.0
Requires-Dist: annotated-types>=0.6.0
Requires-Dist: anyio>=4.10.0
Requires-Dist: certifi>=2025.4.26
Requires-Dist: click>=7.0
Requires-Dist: h11>=0.16
Requires-Dist: httpcore>=1.0.9
Requires-Dist: httpx-sse>=0.4
Requires-Dist: idna>=3.7
Requires-Dist: pydantic-core>=2.33.0
Requires-Dist: pydantic-settings>=2.5.2
Requires-Dist: python-dotenv>=0.21.0
Requires-Dist: python-multipart>=0.0.18
Requires-Dist: sniffio>=1.1
Requires-Dist: typing-extensions>=4.12.2
Requires-Dist: typing-inspection>=0.4.0
Requires-Dist: exceptiongroup>=1.0.2
Provides-Extra: datastore
Requires-Dist: sqlalchemy>=2.0.40; extra == "datastore"
Requires-Dist: oracledb>=2.2.0; extra == "datastore"
Provides-Extra: oci
Requires-Dist: oci>=2.158.2; extra == "oci"
License-File: THIRD_PARTY_LICENSES.txt
License-File: LICENSE-APACHE.txt
License-File: LICENSE-UPL.txt

# 🔗 WayFlow Core

[![PyPI - Version](https://img.shields.io/pypi/v/wayflowcore?label=PyPI)](https://pypi.org/project/wayflowcore/#history)
[![PyPI - License](https://img.shields.io/pypi/l/wayflowcore)](#license)
[![PyPI - Downloads](https://img.shields.io/pepy/dt/wayflowcore)](https://pypistats.org/packages/wayflowcore)

**WayFlow Core** is the foundational Python library of the WayFlow ecosystem.
It provides the runtime engine, abstractions, and components needed to build powerful AI assistants using **Agents**, **Flows**, or hybrid architectures.

WayFlow Core is:

- **🔧 Flexible** — Build assistants using Agents, Flows, or both
- **🔗 Interoperable** — Works with OCI GenAI, OpenAI, Ollama, and other LLM providers
- **🧩 Composable** — Encourages modular, reusable building blocks
- **🚀 Extensible & Open** — Designed for advanced agentic applications

---

## ⚡ Quick Install

```bash
pip install wayflowcore
````

(Optional, faster installation using `uv`)

```bash
pip install uv
uv pip install wayflowcore
```

---

## 🧠 Quick Start

### 1. Initialize an LLM

Initialize a Large Language Model (LLM) of your choice:

| OCI Gen AI                                                                                                                                                                                                                                                   | Open AI                                                                                                         | Ollama                                                                                                          |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------|
| <pre>from wayflowcore.models import OCIGenAIModel<br><br>llm = OCIGenAIModel(<br>   model_id="provider.model-id",<br>   service_endpoint="https://url-to-service-endpoint.com",<br>   compartment_id="compartment-id",<br>   auth_type="API_KEY",<br>)</pre> | <pre>from wayflowcore.models import OpenAIModel<br><br>llm = OpenAIModel(<br>   model_id="model-id",<br>)</pre> | <pre>from wayflowcore.models import OllamaModel<br><br>llm = OllamaModel(<br>   model_id="model-id",<br>)</pre> |


### 2. Create an Assistant

```python
from wayflowcore.agent import Agent

assistant = Agent(llm=llm)

conversation = assistant.start_conversation()
conversation.append_user_message("I need help regarding my sql query")
conversation.execute()

# get the assistant's response to your query
assistant_answer = conversation.get_last_message()
assistant_answer.content
# I'd be happy to help with your SQL query...
```

---

## 🧩 What You Can Build

WayFlow Core supports a wide range of agentic patterns:

* 💬 Conversational assistants
* 🔁 Flow-based assistants with structured sequencing
* 🤝 Multi-agent systems
* 🛠️ Tool-calling agents
* 🧪 Automated code review assistants
* 📚 Domain-specific knowledge assistants

---

## 💁 Contributing

Contributions are welcome!
Please refer to the contributor guide located at the root of the repository.

---

## 🔐 Security

For responsibly reporting security issues, please refer to the project's security guidelines.

---

## 📄 License

WayFlow Core is dual-licensed under:

- **Apache License 2.0** – see [`LICENSE-APACHE.txt`](https://github.com/oracle/wayflow/blob/main/LICENSE-APACHE.txt)
- **Universal Permissive License (UPL) 1.0** – see [`LICENSE-UPL.txt`](https://github.com/oracle/wayflow/blob/main/LICENSE-UPL.txt)
