Skip to main content

A minimalist library with as few dependencies as possible.

Project description

Kiori

A minimalist Python agent library with as few dependencies as possible.

Installation

# Basic installation
pip install kiori

# Installation with memory support
pip install "kiori[memory]"

Quick Start

from kiori.agent import KioriAgent
from kiori.models import Action, ActionExample

# Initialize agent
agent = KioriAgent()

# Define an action
def my_func():
    return "Action executed!"

action = Action(
    name="my_action",
    description="Does something cool",
    function_callable=my_func
)
agent.add_action(action)

# Add an example
example = ActionExample(
    user_prompt="Do something cool",
    expected_action_text="my_action()"
)
agent.add_example(example)

# Run agent
agent.run("Do something cool")

Memory (LTM)

Kiori provides a MilvusLTM class for long-term memory using Milvus Lite.

from kiori.memory import MilvusLTM
from kiori.models import ActionExample

# Initialize memory (auto-creates local Milvus Lite DB)
ltm = MilvusLTM()

example = ActionExample(
    user_prompt="Do something cool",
    expected_action_text="my_action()"
)

# Add examples to memory
ltm.add_examples([example])

# Search memory
results = ltm.search("Do something cool", top_k=1)
print(results)

Philosophy

Kiori is built to be lightweight, easy to understand, and independent of bloated external packages.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kiori-0.2.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kiori-0.2.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file kiori-0.2.0.tar.gz.

File metadata

  • Download URL: kiori-0.2.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for kiori-0.2.0.tar.gz
Algorithm Hash digest
SHA256 30ccb53bda0ac5e7565d58ce3a7e8f414604c150e6fd6ae7f4139ba75b59e12e
MD5 aac8b3dfc95db722e6808cd27f35deae
BLAKE2b-256 d9ec2ee65a2cb900bb586888234b5513a675d8984dafd75ee6f990b429e93114

See more details on using hashes here.

File details

Details for the file kiori-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: kiori-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for kiori-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 698a06f3c03630944db1a06112702b122de3c59527a63b7c7eff358cab572f68
MD5 0456bf0715c1bf939f00e4ecad8a2221
BLAKE2b-256 8c1ca5a7f4efbdd4c5b0f226fbe6b8c59b5c5c54cc69452d3a965839752a0436

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page