An agenda and task manager for your agent.
Installation
pip install agentagenda
Quickstart
This will create a new task with the goal "Write README.md file", and then mark it as completed.
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.
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.
tasks = list_tasks()
print(tasks)
3. Search for Tasks:
You can search for specific tasks using the search_tasks method.
tasks = search_tasks("project")
print(tasks)
4. Deleting a Task:
To delete a task, use the delete_task method.
delete_task(task)
5. Completing a Task:
Mark a task as complete using the finish_task method.
finish_task(task)
6. Cancelling a Task:
If you want to cancel a task, use the cancel_task method.
cancel_task(task)
7. Retrieve Task ID:
To get the ID of a specific task, use the get_task_id method.
task_id = get_task_id(task)
print(task_id)
8. Working with Plans:
- To create a plan for a specific goal, use the
create_planmethod.
plan = create_plan("Finish the project")
print(plan)
- To update the plan of a specific task, use the
update_planmethod.
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_stepsmethod.
steps = create_steps("Finish the project", "Plan for the project")
print(steps)
- To add a new step to a task, use the
add_stepmethod.
add_step(task, "New step for the project")
- To mark a specific step of a task as complete, use the
finish_stepmethod.
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.
Metadata
Release files for agentagenda 0.0.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agentagenda-0.0.12.tar.gz | 11.3 kB | Without provenance | Details for agentagenda-0.0.12.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agentagenda-0.0.12-py3-none-any.whl | Python 3 | none | any | Details for agentagenda-0.0.12-py3-none-any.whl |
Total release size: 21.4 kB
Release files / agentagenda-0.0.12.tar.gz
| Download URL | agentagenda-0.0.12.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c361c9a63e5c79408d8dda9650c8e9e0b6631a6cbac1d7fa1210bc9ece3e1e0
|
|
BLAKE2b-256 checksum How to use checksums |
b00d38e2b3b2e9b52f11f5293333cfdf0ed7f80cfd878af671a4546371a1653a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / agentagenda-0.0.12-py3-none-any.whl
| Download URL | agentagenda-0.0.12-py3-none-any.whl |
|---|---|
| Size | 10.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
87750225e628edf9f8ea64aa3586915f831622eefdc5a8627fe427e2f368fbb6
|
|
BLAKE2b-256 checksum How to use checksums |
4bb2ff409d6f7fdad37207dbe80bf1e0268a10d69fda3ecfc98d44561ddb90c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Security for agentagenda 0.0.12
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.