An agenda and task manager for your agent.
[](https://github.com/AutonomousResearchGroup/agentagenda/actions/workflows/test.yml)
[](https://badge.fury.io/py/agentagenda)
## Installation
```bash
pip install agentagenda
```
## Quickstart
This will create a new task with the goal "Write README.md file", and then mark it as completed.
```python
from agentagenda import create_task, finish_task
# Create a new task
task = create_task("Write README.md file")
print(task)
# Complete the task
finish_task(task)
```
### 1. Creating a Task:
To create a task, use the `create_task` method. You can optionally specify a plan and steps.
```python
task = create_task("Finish the project", plan="Plan for the project")
print(task)
```
### 2. List All Tasks:
Retrieve a list of all tasks that are in progress using the `list_tasks` method.
```python
tasks = list_tasks()
print(tasks)
```
### 3. Search for Tasks:
You can search for specific tasks using the `search_tasks` method.
```python
tasks = search_tasks("project")
print(tasks)
```
### 4. Deleting a Task:
To delete a task, use the `delete_task` method.
```python
delete_task(task)
```
### 5. Completing a Task:
Mark a task as complete using the `finish_task` method.
```python
finish_task(task)
```
### 6. Cancelling a Task:
If you want to cancel a task, use the `cancel_task` method.
```python
cancel_task(task)
```
### 7. Retrieve Task ID:
To get the ID of a specific task, use the `get_task_id` method.
```python
task_id = get_task_id(task)
print(task_id)
```
### 8. Working with Plans:
- To create a plan for a specific goal, use the `create_plan` method.
```python
plan = create_plan("Finish the project")
print(plan)
```
- To update the plan of a specific task, use the `update_plan` method.
```python
update_plan(task, "New plan for the project")
```
### 9. Working with Steps:
- To create a list of steps based on a given goal and plan, use the `create_steps` method.
```python
steps = create_steps("Finish the project", "Plan for the project")
print(steps)
```
- To add a new step to a task, use the `add_step` method.
```python
add_step(task, "New step for the project")
```
- To mark a specific step of a task as complete, use the `finish_step` method.
```python
finish_step(task, "Step to complete")
```
## Documentation
**`create_task(goal: str, plan: str = None, steps: dict = None) -> dict`**
Creates a new task based on the given goal, as well as plan and steps optionally. If no plan or steps are provided they will be generated based on the goal. Returns a dictionary representing the task.
*Example:*
```python
task = create_task("Finish the project")
print(task)
```
**`list_tasks() -> list`**
Returns a list of all tasks that are currently in progress.
*Example:*
```python
tasks = list_tasks()
print(tasks)
```
**`search_tasks(search_term: str) -> list`**
Returns a list of tasks whose goal is most relevant to the search term.
*Example:*
```python
tasks = search_tasks("project")
print(tasks)
```
**`delete_task(task: Union[dict, int, str]) -> None`**
Deletes the specified task. The task can be specified as a dictionary (as returned by `create_task`), an integer ID, or a string ID.
*Example:*
```python
delete_task(task)
```
**`finish_task(task: Union[dict, int, str]) -> None`**
Marks the specified task as complete.
*Example:*
```python
finish_task(task)
```
**`cancel_task(task: Union[dict, int, str]) -> None`**
Marks the specified task as cancelled.
*Example:*
```python
cancel_task(task)
```
**`get_task_id(task: Union[dict, int, str]) -> str`**
Returns the ID of the given task. The task can be specified as a dictionary (as returned by `create_task`), an integer ID, or a string ID.
*Example:*
```python
task_id = get_task_id(task)
print(task_id)
```
**`get_task_by_id(task_id: str) -> dict`**
Returns the task with the given ID. If no task is found, None is returned.
*Example:*
```python
task = get_task_by_id(task_id)
print(task)
```
**`get_last_created_task() -> dict`**
Returns the most recently created task.
*Example:*
```python
task = get_last_created_task()
print(task)
```
**`get_last_updated_task() -> dict`**
Returns the most recently updated task.
*Example:*
```python
task = get_last_updated_task()
print(task)
```
**`get_current_task() -> dict`**
Returns the current task.
*Example:*
```python
task = get_current_task()
print(task)
```
**`set_current_task(task: Union[dict, int, str]) -> dict`**
Sets the specified task as the current task. The task can be specified as a dictionary (as returned by `create_task`), an integer ID, or a string ID.
*Example:*
```python
set_current_task(task)
```
**`create_plan(goal: str) -> str`**
Creates a plan based on the given goal.
*Example:*
```python
plan = create_plan("Finish the project")
print(plan)
```
**`update_plan(task: Union[dict, int, str], plan: str) -> dict`**
Updates the plan of the specified task. The task can be specified as a dictionary (as returned by `create_task`), an integer ID, or a string ID.
*Example:*
```python
update_plan(task, "New plan for the project")
```
**`create_steps(goal: str, plan: str) -> list`**
Creates a list of steps based on the given goal and plan.
*Example:*
```python
steps = create_steps("Finish the project", "Plan for the project")
print(steps)
```
**`update_step(task: Union[dict, int, str], step: dict) -> dict`**
Updates the specified step of the specified task. The task can be specified as a dictionary (as returned by `create_task`), an integer ID, or a string ID.
*Example:*
```python
step = {"content": "New step", "completed": True}
update_step(task, step)
```
**`add_step(task: Union[dict, int, str], step: str) -> dict`**
Adds a new step to the specified task. The task can be specified as a dictionary (as returned by `create_task`), an integer ID, or a string ID.
*Example:*
```python
add_step(task, "New step for the project")
```
**`finish_step(task: Union[dict, int, str], step: str) -> dict`**
Marks the specified step of the specified task as complete. The task can be specified as a dictionary (as returned by `create_task`), an integer ID, or a string ID.
*Example:*
```python
finish_step(task, "Step to complete")
```
**`cancel_step(task: Union[dict, int, str], step: str) -> dict`**
Cancels the specified step of the specified task. The task can be specified as a dictionary (as returned by `create_task`), an integer ID, or a string ID.
*Example:*
```python
cancel_step(task, "Step to cancel")
```
**`get_task_as_formatted_string(task: dict, include_plan: bool = True, include_current_step: bool = True, include_status: bool = True, include_steps: bool = True) -> str`**
Returns a string representation of the task, including the plan, status, and steps based on the arguments provided.
*Example:*
```python
task_string = get_task_as_formatted_string(task, include_plan=True, include_current_step=True, include_status=True, include_steps=True)
print(task_string)
```
**`list_tasks_as_formatted_string() -> str`**
Retrieves and formats a list of all current tasks. Returns a string containing details of all current tasks.
*Example:*
```python
tasks_string = list_tasks_as_formatted_string()
print(tasks_string)
```
# Contributions Welcome
If you like this library and want to contribute in any way, please feel free to submit a PR and I will review it. Please note that the goal here is simplicity and accesibility, using common language and few dependencies.
Raw data
{
"_id": null,
"home_page": "https://github.com/AutonomousResearchGroup/agentagenda",
"name": "agentagenda",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Moon",
"author_email": "shawmakesmagic@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/b0/0d/38e2b3b2e9b52f11f5293333cfdf0ed7f80cfd878af671a4546371a1653a/agentagenda-0.0.12.tar.gz",
"platform": null,
"description": "\nAn agenda and task manager for your agent.\n\n\n[](https://github.com/AutonomousResearchGroup/agentagenda/actions/workflows/test.yml)\n[](https://badge.fury.io/py/agentagenda)\n\n## Installation\n\n```bash\npip install agentagenda\n```\n\n## Quickstart\n\nThis will create a new task with the goal \"Write README.md file\", and then mark it as completed.\n\n```python\nfrom agentagenda import create_task, finish_task\n\n# Create a new task\ntask = create_task(\"Write README.md file\")\nprint(task)\n\n# Complete the task\nfinish_task(task)\n```\n\n### 1. Creating a Task:\n\nTo create a task, use the `create_task` method. You can optionally specify a plan and steps.\n\n```python\ntask = create_task(\"Finish the project\", plan=\"Plan for the project\")\nprint(task)\n```\n\n### 2. List All Tasks:\n\nRetrieve a list of all tasks that are in progress using the `list_tasks` method.\n\n```python\ntasks = list_tasks()\nprint(tasks)\n```\n\n### 3. Search for Tasks:\n\nYou can search for specific tasks using the `search_tasks` method.\n\n```python\ntasks = search_tasks(\"project\")\nprint(tasks)\n```\n\n### 4. Deleting a Task:\n\nTo delete a task, use the `delete_task` method.\n\n```python\ndelete_task(task)\n```\n\n### 5. Completing a Task:\n\nMark a task as complete using the `finish_task` method.\n\n```python\nfinish_task(task)\n```\n\n### 6. Cancelling a Task:\n\nIf you want to cancel a task, use the `cancel_task` method.\n\n```python\ncancel_task(task)\n```\n\n### 7. Retrieve Task ID:\n\nTo get the ID of a specific task, use the `get_task_id` method.\n\n```python\ntask_id = get_task_id(task)\nprint(task_id)\n```\n\n### 8. Working with Plans:\n\n- To create a plan for a specific goal, use the `create_plan` method.\n\n```python\nplan = create_plan(\"Finish the project\")\nprint(plan)\n```\n\n- To update the plan of a specific task, use the `update_plan` method.\n\n```python\nupdate_plan(task, \"New plan for the project\")\n```\n\n### 9. Working with Steps:\n\n- To create a list of steps based on a given goal and plan, use the `create_steps` method.\n\n```python\nsteps = create_steps(\"Finish the project\", \"Plan for the project\")\nprint(steps)\n```\n\n- To add a new step to a task, use the `add_step` method.\n\n```python\nadd_step(task, \"New step for the project\")\n```\n\n- To mark a specific step of a task as complete, use the `finish_step` method.\n\n```python\nfinish_step(task, \"Step to complete\")\n```\n\n## Documentation\n\n**`create_task(goal: str, plan: str = None, steps: dict = None) -> dict`**\n\n Creates a new task based on the given goal, as well as plan and steps optionally. If no plan or steps are provided they will be generated based on the goal. Returns a dictionary representing the task.\n\n *Example:*\n\n ```python\n task = create_task(\"Finish the project\")\n print(task)\n ```\n\n**`list_tasks() -> list`**\n\n Returns a list of all tasks that are currently in progress.\n\n *Example:*\n\n ```python\n tasks = list_tasks()\n print(tasks)\n ```\n\n**`search_tasks(search_term: str) -> list`**\n\n Returns a list of tasks whose goal is most relevant to the search term.\n\n *Example:*\n\n ```python\n tasks = search_tasks(\"project\")\n print(tasks)\n ```\n\n**`delete_task(task: Union[dict, int, str]) -> None`**\n\n Deletes the specified task. The task can be specified as a dictionary (as returned by `create_task`), an integer ID, or a string ID.\n\n *Example:*\n\n ```python\n delete_task(task)\n ```\n\n**`finish_task(task: Union[dict, int, str]) -> None`**\n\n Marks the specified task as complete.\n\n *Example:*\n\n ```python\n finish_task(task)\n ```\n\n**`cancel_task(task: Union[dict, int, str]) -> None`**\n\n Marks the specified task as cancelled.\n\n *Example:*\n\n ```python\n cancel_task(task)\n ```\n\n**`get_task_id(task: Union[dict, int, str]) -> str`**\n\n Returns the ID of the given task. The task can be specified as a dictionary (as returned by `create_task`), an integer ID, or a string ID.\n\n *Example:*\n\n ```python\n task_id = get_task_id(task)\n print(task_id)\n ```\n\n**`get_task_by_id(task_id: str) -> dict`**\n\n Returns the task with the given ID. If no task is found, None is returned.\n\n *Example:*\n\n ```python\n task = get_task_by_id(task_id)\n print(task)\n ```\n\n**`get_last_created_task() -> dict`**\n\n Returns the most recently created task.\n\n *Example:*\n\n ```python\n task = get_last_created_task()\n print(task)\n ```\n\n**`get_last_updated_task() -> dict`**\n\n Returns the most recently updated task.\n\n *Example:*\n\n ```python\n task = get_last_updated_task()\n print(task)\n ```\n\n**`get_current_task() -> dict`**\n\n Returns the current task.\n\n *Example:*\n\n ```python\n task = get_current_task()\n print(task)\n ```\n\n**`set_current_task(task: Union[dict, int, str]) -> dict`**\n\n Sets the specified task as the current task. The task can be specified as a dictionary (as returned by `create_task`), an integer ID, or a string ID.\n\n *Example:*\n\n ```python\n set_current_task(task)\n ```\n\n**`create_plan(goal: str) -> str`**\n\n Creates a plan based on the given goal.\n\n *Example:*\n\n ```python\n plan = create_plan(\"Finish the project\")\n print(plan)\n ```\n\n**`update_plan(task: Union[dict, int, str], plan: str) -> dict`**\n\n Updates the plan of the specified task. The task can be specified as a dictionary (as returned by `create_task`), an integer ID, or a string ID.\n\n *Example:*\n\n ```python\n update_plan(task, \"New plan for the project\")\n ```\n\n**`create_steps(goal: str, plan: str) -> list`**\n\n Creates a list of steps based on the given goal and plan.\n\n *Example:*\n\n ```python\n steps = create_steps(\"Finish the project\", \"Plan for the project\")\n print(steps)\n ```\n\n**`update_step(task: Union[dict, int, str], step: dict) -> dict`**\n\n Updates the specified step of the specified task. The task can be specified as a dictionary (as returned by `create_task`), an integer ID, or a string ID.\n\n *Example:*\n\n ```python\n step = {\"content\": \"New step\", \"completed\": True}\n update_step(task, step)\n ```\n\n**`add_step(task: Union[dict, int, str], step: str) -> dict`**\n\n Adds a new step to the specified task. The task can be specified as a dictionary (as returned by `create_task`), an integer ID, or a string ID.\n\n *Example:*\n\n ```python\n add_step(task, \"New step for the project\")\n ```\n\n**`finish_step(task: Union[dict, int, str], step: str) -> dict`**\n\n Marks the specified step of the specified task as complete. The task can be specified as a dictionary (as returned by `create_task`), an integer ID, or a string ID.\n\n *Example:*\n\n ```python\n finish_step(task, \"Step to complete\")\n ```\n\n**`cancel_step(task: Union[dict, int, str], step: str) -> dict`**\n\n Cancels the specified step of the specified task. The task can be specified as a dictionary (as returned by `create_task`), an integer ID, or a string ID.\n\n *Example:*\n\n ```python\n cancel_step(task, \"Step to cancel\")\n ```\n\n**`get_task_as_formatted_string(task: dict, include_plan: bool = True, include_current_step: bool = True, include_status: bool = True, include_steps: bool = True) -> str`**\n\n Returns a string representation of the task, including the plan, status, and steps based on the arguments provided.\n\n *Example:*\n\n ```python\n task_string = get_task_as_formatted_string(task, include_plan=True, include_current_step=True, include_status=True, include_steps=True)\n print(task_string)\n ```\n\n**`list_tasks_as_formatted_string() -> str`**\n\n Retrieves and formats a list of all current tasks. Returns a string containing details of all current tasks.\n\n *Example:*\n\n ```python\n tasks_string = list_tasks_as_formatted_string()\n print(tasks_string)\n ```\n\n# Contributions Welcome\n\nIf you like this library and want to contribute in any way, please feel free to submit a PR and I will review it. Please note that the goal here is simplicity and accesibility, using common language and few dependencies.\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A task manager for your agent.",
"version": "0.0.12",
"project_urls": {
"Homepage": "https://github.com/AutonomousResearchGroup/agentagenda"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4bb2ff409d6f7fdad37207dbe80bf1e0268a10d69fda3ecfc98d44561ddb90c3",
"md5": "340cf80a6c9780b892114c99a1d8ac8c",
"sha256": "87750225e628edf9f8ea64aa3586915f831622eefdc5a8627fe427e2f368fbb6"
},
"downloads": -1,
"filename": "agentagenda-0.0.12-py3-none-any.whl",
"has_sig": false,
"md5_digest": "340cf80a6c9780b892114c99a1d8ac8c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 10095,
"upload_time": "2023-08-08T06:00:31",
"upload_time_iso_8601": "2023-08-08T06:00:31.023994Z",
"url": "https://files.pythonhosted.org/packages/4b/b2/ff409d6f7fdad37207dbe80bf1e0268a10d69fda3ecfc98d44561ddb90c3/agentagenda-0.0.12-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b00d38e2b3b2e9b52f11f5293333cfdf0ed7f80cfd878af671a4546371a1653a",
"md5": "946d21c28b748ad96688dc593b4991b7",
"sha256": "3c361c9a63e5c79408d8dda9650c8e9e0b6631a6cbac1d7fa1210bc9ece3e1e0"
},
"downloads": -1,
"filename": "agentagenda-0.0.12.tar.gz",
"has_sig": false,
"md5_digest": "946d21c28b748ad96688dc593b4991b7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 11284,
"upload_time": "2023-08-08T06:00:32",
"upload_time_iso_8601": "2023-08-08T06:00:32.607720Z",
"url": "https://files.pythonhosted.org/packages/b0/0d/38e2b3b2e9b52f11f5293333cfdf0ed7f80cfd878af671a4546371a1653a/agentagenda-0.0.12.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-08 06:00:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "AutonomousResearchGroup",
"github_project": "agentagenda",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "agentagenda"
}