Metadata-Version: 2.1
Name: flowx
Version: 0.1.0
Summary: Elegant and lightweight, yet functionally comprehensive, the Flow framework is the best choice for large models.
License: MIT
Author: yihe yang
Author-email: yangchichi@126.com
Requires-Python: >=3.9,<3.13
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
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
Requires-Dist: chromadb (>=0.5.3,<0.6.0)
Requires-Dist: click (>=8.1.3,<9.0.0)
Requires-Dist: docx2txt (>=0.8,<0.9)
Requires-Dist: dynaconf (>=3.1.12,<4.0.0)
Requires-Dist: nltk (>=3.8.1,<4.0.0)
Requires-Dist: numpy (>=1.21,<2.0)
Requires-Dist: openai (>=1.35.9,<2.0.0)
Requires-Dist: protobuf (>=5.27.2,<6.0.0)
Requires-Dist: pydantic (>=2.7.0)
Requires-Dist: pypdf (>=4.2.0,<5.0.0)
Requires-Dist: sentencepiece (>=0.2.0,<0.3.0)
Requires-Dist: tenacity (>=8.4.2,<9.0.0)
Requires-Dist: tiktoken (>=0.7.0,<0.8.0)
Requires-Dist: transformers (>=4.42.3,<5.0.0)
Requires-Dist: unstructured (>=0.14.9,<0.15.0)
Description-Content-Type: text/markdown

English | [简体中文](README_zh-CN.md)


# FlowX



## What's FlowX?

**FlowX** is a lightweight framework for building LLM applications. It offers an API interface similar to LangChain's
LCEL, but with a more straightforward and simple internal implementation. Users familiar with LangChain can quickly get
started with FlowX and extend or modify it as needed.

For example, FlowX implements the core functionality of LangChain's AgentExecutor
in less than 300 lines of [code](https://github.com/zhiguoxu/FlowX/blob/main/core/agents/agent.py). This is
particularly beneficial for users who want to understand the underlying implementation of agents and make further
optimizations.

FlowX is also very easy to use, as demonstrated by the following example of an Agent:

```python
from core.tool import tool
from core.llm.openai.openai_llm import OpenAILLM
from core.agents.agent import Agent

llm = OpenAILLM(model="gpt-4o")


@tool
def multiply(left: int, right: int) -> int:
    """multiply"""
    return left * right


agent = Agent(llm=llm, tools=[multiply])
agent.invoke("what's 1024*2024?")
```

## Why do we need FlowX?


Although LangChain provides a powerful framework for building LLM applications, its complex design also brings several
issues with deeper use.

LangChain's extensive use of abstraction results in highly complex code, making it difficult to understand and maintain.
While it initially simplifies the development process, as the complexity of requirements increases, these abstractions
gradually become obstacles to productivity. Additionally, these abstractions increase the learning and debugging burden,
forcing development teams to spend significant time dealing with internal framework code rather than focusing on
application functionality.

Especially in today's rapidly evolving AI and LLM landscape, where new concepts and methods emerge weekly, a framework
that is easy to understand and iterate on quickly is crucial!

To address these issues, FlowX adopts a more concise design with more refined code implementation, balancing
abstraction and simplicity by the use of necessary abstractions without being overly complex. Ultimately, FlowX
provides the same functionality and similar interfaces as LangChain but with significantly reduced code and fewer
abstract concepts. This makes it easy to understand and modify FlowX, allowing for quick experimentation or customized
development.

The project is still under development, with more features to be added. Your valuable feedback is welcome!

