floki-ai


Namefloki-ai JSON
Version 0.5.0 PyPI version JSON
download
home_pagehttps://github.com/Cyb3rWard0g/floki
SummaryAgentic Workflows Made Simple
upload_time2024-12-07 03:54:15
maintainerNone
docs_urlNone
authorRoberto Rodriguez
requires_python<3.13,>=3.9
licenseMIT License
keywords
VCS
bugtrack_url
requirements pydantic chromadb openai openapi-pydantic openapi-schema-pydantic regex sentence-transformers neo4j Jinja2 azure-identity dapr dapr-ext-fastapi dapr-ext-workflow
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Floki: Agentic Workflows Made Simple

[![pypi](https://img.shields.io/pypi/v/floki-ai.svg)](https://pypi.python.org/pypi/floki-ai)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/floki-ai)](https://pypi.org/project/floki-ai/)
[![GitHub Repo stars](https://img.shields.io/github/stars/Cyb3rWard0g/floki)](https://github.com/Cyb3rWard0g/floki)
[![license](https://img.shields.io/github/license/Cyb3rWard0g/floki.svg)](https://github.com/Cyb3rWard0g/floki/blob/main/LICENSE)

![](docs/logo-workflows.png)

> 🚧 Floki is in active development and evolving with ongoing research. APIs and core structures may change as the framework matures and Dapr integration is refined.

Floki is an open-source framework for researchers and developers to experiment with LLM-based autonomous agents. It provides tools to create, orchestrate, and manage agents while seamlessly connecting to LLM inference APIs. Built on [Dapr](https://docs.dapr.io/), Floki leverages a unified programming model that simplifies microservices and supports both deterministic workflows and event-driven interactions. Using Dapr’s Virtual Actor pattern, Floki enables agents to function as independent, self-contained units that process messages sequentially, eliminating concurrency concerns while seamlessly integrating into larger workflows. It also facilitates agent collaboration through Dapr’s Pub/Sub integration, where agents communicate via a shared message bus, simplifying the design of workflows where tasks are distributed efficiently, and agents work together to achieve shared goals. By bringing together these features, Floki provides a powerful way to explore agentic workflows and the components that enable multi-agent systems to collaborate and scale, all powered by Dapr.

## Documentation (WIP 🚧): https://cyb3rward0g.github.io/floki/

## Why Dapr 🎩?

[Dapr](https://docs.dapr.io/) provides Floki with a unified programming model that simplifies the development of resilient and scalable systems by offering built-in APIs for features such as service invocation, Pub/Sub messaging, workflows, and even state management. These components, essential for defining agentic workflows, allow developers to focus on designing agents and workflows rather than rebuilding foundational features. By leveraging Dapr’s sidecar architecture and portable, event-driven runtime, Floki also enables agents to collaborate effectively, share tasks, and adapt dynamically across cloud and edge environments. This seamless integration brings together deterministic workflows and LLM-based decision-making into a unified system, making it easier to experiment with multi-agent systems and scalable agentic workflows.

### Key Dapr Features in Floki:
* 🎯 **Service-to-Service Invocation**: Facilitates direct communication between agents with built-in service discovery, error handling, and distributed tracing. Agents can leverage this for synchronous messaging in multi-agent workflows.
* ⚡️ **Publish and Subscribe**: Supports loosely coupled collaboration between agents through a shared message bus. This enables real-time, event-driven interactions critical for task distribution and coordination.
* 🔄 **Workflow API**: Defines long-running, persistent workflows that combine deterministic processes with LLM-based decision-making. Floki uses this to orchestrate complex multi-step agentic workflows seamlessly.
* 🧠 **State Management**: Provides a flexible key-value store for agents to retain context across interactions, ensuring continuity and adaptability during workflows.
* 🤖 **Actors**: Implements the Virtual Actor pattern, allowing agents to operate as self-contained, stateful units that handle messages sequentially. This eliminates concurrency concerns and enhances scalability in Floki's agent systems.

## Install Floki ⚡️

Make sure you have Python already installed. `Python >=3.9`

### As a Python package using Pip

```bash
pip install floki-ai
```

### Remotely from GitHub

```bash
pip install git+https://github.com/Cyb3rWard0g/floki.git
```

### From source with `poetry`:

```bash
git clone https://github.com/Cyb3rWard0g/floki

cd floki

poetry install
```

## Install Dapr CLI

Install the [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/) to manage Dapr-related tasks like running applications with sidecars, viewing logs, and launching the Dapr dashboard. It works seamlessly with both self-hosted and Kubernetes environments. For a complete step-by-step guide, visit the official [Dapr CLI installation page](https://docs.dapr.io/getting-started/install-dapr-cli/).

Verify the CLI is installed by restarting your terminal/command prompt and running the following:

```bash
dapr -h
```

### Initialize Dapr in Local Mode

Make sure you have [Docker](https://docs.docker.com/get-started/get-docker/) already installed. I use [Docker Desktop](https://www.docker.com/products/docker-desktop/).

Initialize Dapr locally to set up a self-hosted environment for development. This process installs Dapr sidecar binaries, runs essential services like Redis (state store and message broker) and Zipkin (observability), and prepares a default components folder. For detailed steps, see the official [guide on initializing Dapr locally](https://docs.dapr.io/getting-started/install-dapr-selfhost/).

To initialize the Dapr control plane containers and create a default configuration file, run:

```bash
dapr init
```

Verify you have container instances with `daprio/dapr`, `openzipkin/zipkin`, and `redis` images running:

```bash
docker ps
```

## Acknowledgments
Floki was born out of a desire to explore and learn more about [Dapr](https://dapr.io/) and its potential for building agentic systems. I wanted to understand how to deploy agents as services, manage message communication, and connect various components effectively. Along the way, I looked to several established frameworks for ideas and guidance, which helped shape my thinking and approach:

* https://github.com/microsoft/autogen
* https://github.com/langchain-ai/langchain
* https://github.com/run-llama/llama_deploy

While these frameworks provided valuable insights, Floki is my unique take on how to leverage Dapr for agent-based workflows and systems. It reflects my learning journey and ongoing research in this exciting space.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Cyb3rWard0g/floki",
    "name": "floki-ai",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Roberto Rodriguez",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/a5/82/ab1ae82ef8ad41827cab59da31f75fded8a1141a5230f24eb42d1e2f2ad3/floki_ai-0.5.0.tar.gz",
    "platform": null,
    "description": "# Floki: Agentic Workflows Made Simple\n\n[![pypi](https://img.shields.io/pypi/v/floki-ai.svg)](https://pypi.python.org/pypi/floki-ai)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/floki-ai)](https://pypi.org/project/floki-ai/)\n[![GitHub Repo stars](https://img.shields.io/github/stars/Cyb3rWard0g/floki)](https://github.com/Cyb3rWard0g/floki)\n[![license](https://img.shields.io/github/license/Cyb3rWard0g/floki.svg)](https://github.com/Cyb3rWard0g/floki/blob/main/LICENSE)\n\n![](docs/logo-workflows.png)\n\n> \ud83d\udea7 Floki is in active development and evolving with ongoing research. APIs and core structures may change as the framework matures and Dapr integration is refined.\n\nFloki is an open-source framework for researchers and developers to experiment with LLM-based autonomous agents. It provides tools to create, orchestrate, and manage agents while seamlessly connecting to LLM inference APIs. Built on [Dapr](https://docs.dapr.io/), Floki leverages a unified programming model that simplifies microservices and supports both deterministic workflows and event-driven interactions. Using Dapr\u2019s Virtual Actor pattern, Floki enables agents to function as independent, self-contained units that process messages sequentially, eliminating concurrency concerns while seamlessly integrating into larger workflows. It also facilitates agent collaboration through Dapr\u2019s Pub/Sub integration, where agents communicate via a shared message bus, simplifying the design of workflows where tasks are distributed efficiently, and agents work together to achieve shared goals. By bringing together these features, Floki provides a powerful way to explore agentic workflows and the components that enable multi-agent systems to collaborate and scale, all powered by Dapr.\n\n## Documentation (WIP \ud83d\udea7): https://cyb3rward0g.github.io/floki/\n\n## Why Dapr \ud83c\udfa9?\n\n[Dapr](https://docs.dapr.io/) provides Floki with a unified programming model that simplifies the development of resilient and scalable systems by offering built-in APIs for features such as service invocation, Pub/Sub messaging, workflows, and even state management. These components, essential for defining agentic workflows, allow developers to focus on designing agents and workflows rather than rebuilding foundational features. By leveraging Dapr\u2019s sidecar architecture and portable, event-driven runtime, Floki also enables agents to collaborate effectively, share tasks, and adapt dynamically across cloud and edge environments. This seamless integration brings together deterministic workflows and LLM-based decision-making into a unified system, making it easier to experiment with multi-agent systems and scalable agentic workflows.\n\n### Key Dapr Features in Floki:\n* \ud83c\udfaf **Service-to-Service Invocation**: Facilitates direct communication between agents with built-in service discovery, error handling, and distributed tracing. Agents can leverage this for synchronous messaging in multi-agent workflows.\n* \u26a1\ufe0f **Publish and Subscribe**: Supports loosely coupled collaboration between agents through a shared message bus. This enables real-time, event-driven interactions critical for task distribution and coordination.\n* \ud83d\udd04 **Workflow API**: Defines long-running, persistent workflows that combine deterministic processes with LLM-based decision-making. Floki uses this to orchestrate complex multi-step agentic workflows seamlessly.\n* \ud83e\udde0 **State Management**: Provides a flexible key-value store for agents to retain context across interactions, ensuring continuity and adaptability during workflows.\n* \ud83e\udd16 **Actors**: Implements the Virtual Actor pattern, allowing agents to operate as self-contained, stateful units that handle messages sequentially. This eliminates concurrency concerns and enhances scalability in Floki's agent systems.\n\n## Install Floki \u26a1\ufe0f\n\nMake sure you have Python already installed. `Python >=3.9`\n\n### As a Python package using Pip\n\n```bash\npip install floki-ai\n```\n\n### Remotely from GitHub\n\n```bash\npip install git+https://github.com/Cyb3rWard0g/floki.git\n```\n\n### From source with `poetry`:\n\n```bash\ngit clone https://github.com/Cyb3rWard0g/floki\n\ncd floki\n\npoetry install\n```\n\n## Install Dapr CLI\n\nInstall the [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/) to manage Dapr-related tasks like running applications with sidecars, viewing logs, and launching the Dapr dashboard. It works seamlessly with both self-hosted and Kubernetes environments. For a complete step-by-step guide, visit the official [Dapr CLI installation page](https://docs.dapr.io/getting-started/install-dapr-cli/).\n\nVerify the CLI is installed by restarting your terminal/command prompt and running the following:\n\n```bash\ndapr -h\n```\n\n### Initialize Dapr in Local Mode\n\nMake sure you have [Docker](https://docs.docker.com/get-started/get-docker/) already installed. I use [Docker Desktop](https://www.docker.com/products/docker-desktop/).\n\nInitialize Dapr locally to set up a self-hosted environment for development. This process installs Dapr sidecar binaries, runs essential services like Redis (state store and message broker) and Zipkin (observability), and prepares a default components folder. For detailed steps, see the official [guide on initializing Dapr locally](https://docs.dapr.io/getting-started/install-dapr-selfhost/).\n\nTo initialize the Dapr control plane containers and create a default configuration file, run:\n\n```bash\ndapr init\n```\n\nVerify you have container instances with `daprio/dapr`, `openzipkin/zipkin`, and `redis` images running:\n\n```bash\ndocker ps\n```\n\n## Acknowledgments\nFloki was born out of a desire to explore and learn more about [Dapr](https://dapr.io/) and its potential for building agentic systems. I wanted to understand how to deploy agents as services, manage message communication, and connect various components effectively. Along the way, I looked to several established frameworks for ideas and guidance, which helped shape my thinking and approach:\n\n* https://github.com/microsoft/autogen\n* https://github.com/langchain-ai/langchain\n* https://github.com/run-llama/llama_deploy\n\nWhile these frameworks provided valuable insights, Floki is my unique take on how to leverage Dapr for agent-based workflows and systems. It reflects my learning journey and ongoing research in this exciting space.\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Agentic Workflows Made Simple",
    "version": "0.5.0",
    "project_urls": {
        "Homepage": "https://github.com/Cyb3rWard0g/floki"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3ae1cea00517437cb3525b045b1ffe07bde86b62cec0045e7aa88b9e30c6b2a3",
                "md5": "3547ea567d28a74dbc92f72a177bb28e",
                "sha256": "5371e7809a73fbaaeaefb3603bbb9746d75ad9a47681a682126209a797c46684"
            },
            "downloads": -1,
            "filename": "floki_ai-0.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3547ea567d28a74dbc92f72a177bb28e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.9",
            "size": 141731,
            "upload_time": "2024-12-07T03:54:13",
            "upload_time_iso_8601": "2024-12-07T03:54:13.447075Z",
            "url": "https://files.pythonhosted.org/packages/3a/e1/cea00517437cb3525b045b1ffe07bde86b62cec0045e7aa88b9e30c6b2a3/floki_ai-0.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a582ab1ae82ef8ad41827cab59da31f75fded8a1141a5230f24eb42d1e2f2ad3",
                "md5": "872739b46feb5736d30211965397cbf6",
                "sha256": "d260f47e766d8138f0ffc84c0eb23f1ef3026033fb6749328220049280dd5812"
            },
            "downloads": -1,
            "filename": "floki_ai-0.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "872739b46feb5736d30211965397cbf6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.9",
            "size": 103875,
            "upload_time": "2024-12-07T03:54:15",
            "upload_time_iso_8601": "2024-12-07T03:54:15.105211Z",
            "url": "https://files.pythonhosted.org/packages/a5/82/ab1ae82ef8ad41827cab59da31f75fded8a1141a5230f24eb42d1e2f2ad3/floki_ai-0.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-07 03:54:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Cyb3rWard0g",
    "github_project": "floki",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "pydantic",
            "specs": [
                [
                    "==",
                    "2.10.2"
                ]
            ]
        },
        {
            "name": "chromadb",
            "specs": [
                [
                    "==",
                    "0.5.20"
                ]
            ]
        },
        {
            "name": "openai",
            "specs": [
                [
                    "==",
                    "1.56.1"
                ]
            ]
        },
        {
            "name": "openapi-pydantic",
            "specs": [
                [
                    "==",
                    "0.5.0"
                ]
            ]
        },
        {
            "name": "openapi-schema-pydantic",
            "specs": [
                [
                    "==",
                    "1.2.4"
                ]
            ]
        },
        {
            "name": "regex",
            "specs": [
                [
                    ">=",
                    "2023.12.25"
                ]
            ]
        },
        {
            "name": "sentence-transformers",
            "specs": [
                [
                    "==",
                    "3.3.1"
                ]
            ]
        },
        {
            "name": "neo4j",
            "specs": [
                [
                    "==",
                    "5.26.0"
                ]
            ]
        },
        {
            "name": "Jinja2",
            "specs": [
                [
                    "==",
                    "3.1.4"
                ]
            ]
        },
        {
            "name": "azure-identity",
            "specs": [
                [
                    "==",
                    "1.19.0"
                ]
            ]
        },
        {
            "name": "dapr",
            "specs": [
                [
                    "==",
                    "1.14.0"
                ]
            ]
        },
        {
            "name": "dapr-ext-fastapi",
            "specs": [
                [
                    "==",
                    "1.14.0"
                ]
            ]
        },
        {
            "name": "dapr-ext-workflow",
            "specs": [
                [
                    "==",
                    "0.5.0"
                ]
            ]
        }
    ],
    "lcname": "floki-ai"
}
        
Elapsed time: 6.62687s