Metadata-Version: 2.1
Name: taskara
Version: 0.1.34
Summary: Task management for AI agents
License: MIT
Author: Patrick Barker
Author-email: patrickbarkerco@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: devicebay (>=0.1.8,<0.2.0)
Requires-Dist: pydantic (>=2.6.4,<3.0.0)
Requires-Dist: sqlalchemy (>=2.0.29,<3.0.0)
Requires-Dist: threadmem (>=0.2.17,<0.3.0)
Description-Content-Type: text/markdown

# Taskara

Task management for AI agents

## Installation

```sh
pip install taskara
```

## Usage

Create a task

```python
from taskara import Task

task = Task(
    description="Search for the most common varieties of french ducks",
    owner_id="delores@agentsea.ai"
)
```

Assign the task to an agent

```python
task.assigned_to = "roko@agentsea.ai"
```

Post a message to the task thread

```python
task.post_message("assistant", "Getting started working on this")
task.status = "in progress"
```

Create a custom thread for the task

```python
task.create_thread("debug")
task.post_message("assistant", "I'll post debug messages to this thread", thread="debug")
task.post_message("assistant", 'My current screenshot', images=["b64img"], thread="debug")
```

Store prompts used to accomplish the task

```python
thread = RoleThread()
thread.post(role="system", msg="I am a helpful assistant")

response = RoleMessage(
    role="assistant",
    text="How can I help?"
)
task.store_prompt(thread, response, namespace="actions")
```

Store the result

```python
task.output = "The most common type of french duck is the Rouen"
task.status = "success"
```

Save the task

```python
task.save()
```

#### Supported Backends

- Sqlite
- Postgresql

