Metadata-Version: 2.5
Name: kiari
Version: 0.2.0
Summary: A CLI tool for developing and experimenting with qualia-oriented LLM agents
Project-URL: homepage, https://github.com/kiarina/kiari
Project-URL: repository, https://github.com/kiarina/kiari
Project-URL: documentation, https://github.com/kiarina/kiari
Author-email: kiarina <kiarinadawa@gmail.com>
License: MIT
License-File: LICENSE
Keywords: agent,automation,cli,llm
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: <3.14,>=3.12
Requires-Dist: aiofiles<26,>=25.1.0
Requires-Dist: aiohttp<4,>=3.12.0
Requires-Dist: audioop-lts>=0.2.2; python_full_version >= '3.13'
Requires-Dist: chrome-bridge-sdk<0.5,>=0.4
Requires-Dist: click<9,>=8.2.1
Requires-Dist: croniter<7,>=6.0.0
Requires-Dist: fastapi<1,>=0.133.0
Requires-Dist: google-cloud-pubsub<3,>=2.31.1
Requires-Dist: google-cloud-storage<4,>=3.4.0
Requires-Dist: httpx<1.0.0,>=0.28.1
Requires-Dist: kiarina[all]>=2.25.0
Requires-Dist: mss<11,>=10.0.0
Requires-Dist: numpy<3,>=2.0
Requires-Dist: pillow<13,>=11.3.0
Requires-Dist: prompt-toolkit<4,>=3.0.51
Requires-Dist: puremagic<3,>=1.30
Requires-Dist: pyautogui<1,>=0.9.54
Requires-Dist: pydantic-settings-manager>=2.5.1
Requires-Dist: pydantic-settings<3,>=2.10.1
Requires-Dist: pydantic<3,>=2.11.7
Requires-Dist: pydub<1,>=0.25.1
Requires-Dist: pyperclip<2,>=1.9.0
Requires-Dist: pyyaml<7,>=6.0.2
Requires-Dist: questionary<3,>=2.1.1
Requires-Dist: rich-click>=1.9.7
Requires-Dist: rich<16,>=14.1.0
Requires-Dist: slack-bolt<2,>=1.23.0
Requires-Dist: slack-sdk<4,>=3.36.0
Requires-Dist: sounddevice<1,>=0.5.3
Requires-Dist: soundfile>=0.13.1
Requires-Dist: streamlit[auth]<2,>=1.59.0
Requires-Dist: tzlocal<6,>=5.3.1
Requires-Dist: uvicorn<1,>=0.35.0
Requires-Dist: watchfiles<2,>=1.1.1
Description-Content-Type: text/markdown

# kiari

[English](README.md) | [Japanese](README.ja.md)

`kiari` is a CLI tool for developing and experimenting with qualia-oriented LLM agents.

## Installation

```sh
pip install kiari
```

## Usage

Start the interactive console:

```sh
kiari
```

Run a one-shot batch prompt:

```sh
kiari "hello"
```

Manage profiles:

```sh
kiari profile list
kiari profile new
kiari profile use
```

Generate an image with the built-in `image_generate` tool:

```sh
kiari -t image_generate "Generate an illustration of a cat reading a book"
```

Generate a video with the built-in `video_predict` tool:

```sh
kiari -t video_predict "Generate a short video of a cat playing with a ball"
```

Search the web with the built-in `web` tool:

```sh
kiari -t web "Search the web for the latest Python release"
```

Operate connected Chrome profiles with the built-in `chrome` tool:

```sh
kiari -t chrome "List Chrome tabs, select example.com, and summarize its current page"
```

The Chrome tool requires Chrome Bridge 0.4.x. Install and connect its Chrome extension;
the SDK reuses or starts the loopback server automatically. Each tool action acquires and
releases its own exclusive Chrome Bridge session.

To run the real SDK/extension integration test, connect Chrome Bridge and run:

```sh
make chrome_test
```

The test opens and closes only its own loopback fixture tab. It is marked `costly` and is
skipped by the normal test suite.

See [Chrome Tool and Chrome Bridge](docs/concepts/chrome-tool-and-bridge.md) for session,
target/ref, error, ownership, and SDK update semantics.

## FastAPI Mode

Start an automatically reloading development server:

```sh
kiari fastapi --chat-model openai
```

Run multiple production-style workers without reload:

```sh
kiari fastapi --fastapi-workers 4 --fastapi-path /agent
```

The service exposes `GET /health` and streams agent events as NDJSON from
`POST /` (or the configured path):

```sh
curl -N http://localhost:8000/ \
  -H 'Content-Type: application/json' \
  -d '{"text":"hello"}'
```

Authentication defaults to `none`. Configure Bearer authentication before exposing the
server to an untrusted network, for example with
`--fastapi-authenticator 'bearer?api_key=secret'` or the corresponding component config.
Request `files` are resolved by the server; they are not uploaded by this API.

## Streamlit Mode

Start the browser chat UI:

```sh
kiari streamlit --chat-model openai --history-repository local
```

The default `browser-session` authenticator isolates data for the lifetime of one browser
session. For durable multi-user identity, configure Streamlit OIDC in
`.streamlit/secrets.toml` and start with `--streamlit-authenticator oidc` (or
`oidc?provider=google` for a named provider). Secrets stay in Streamlit configuration and
are not copied into kiari profiles or startup payloads.

Each user creates and selects globally unique agent IDs in the sidebar. Agent IDs accept
letters, digits, `.`, `_`, and `-`. Deleting an agent removes its registered identity and
History; generated files and caches are retained.

The sidebar can apply per-session YAML overrides for agent, tool, workflow, prompt, chat,
and speech options. Runtime-wide settings such as profiles, plugins, repositories,
authentication, loggers, and server options remain fixed at startup.

## Watch Mode

Watch file changes:

```sh
kiari watch "file?paths=.&include_patterns=*.md"
```

Watch Pub/Sub:

```sh
kiari ext pubsub create-topic --project-id kiarina --topic-id tmp
kiari ext pubsub create-subscription --project-id kiarina --topic-id tmp --subscription-id tmp
kiari watch "pubsub?project_id=kiarina&subscription_id=tmp"
kiari ext pubsub publish-message --project-id kiarina --topic-id tmp --attribute hoge=fuga "hello"
```

Watch Realtime Database:

```sh
DATABASE_URL=https://kiarina-python.firebaseio.com/
kiari watch "rtdb?database_url=$DATABASE_URL&path=/posts/kiarina"
kiari ext rtdb set --database-url $DATABASE_URL --path /posts/kiarina '{"message":"hello"}'
kiari ext rtdb get --database-url $DATABASE_URL --path /posts/kiarina
kiari ext rtdb watch --database-url $DATABASE_URL --path /posts/kiarina
```

Watch Slack:

```sh
CHANNEL_ID=C077QKNDCUR
kiari watch "slack?"
kiari watch --watch-handler slack "slack?"
kiari ext slack post-message --channel $CHANNEL_ID "hello"
kiari ext -v slack get-channel-messages --channel $CHANNEL_ID --limit 1
kiari ext slack watch-channel --channel $CHANNEL_ID
```

## Development

```sh
mise run setup
mise run ci
```
