julep icon indicating copy to clipboard operation
julep copied to clipboard

(do-not-merge) new feature trunk: tasks

Open creatorrr opened this issue 1 year ago • 0 comments
trafficstars

Todo list

  • [ ] add option in task definition: tools_available: "all" which will automatically add all of the tools that the agent has access to
  • [ ] consistent and semantically correct naming of event types (running, started etc)
  • [ ] validations for all task, workflow and execution definitions
  • [ ] add checks to cozo queries


:rocket: This description was created by Ellipsis for commit 9683d7835aa6c8c6f1e80b368d5ffaed69fc05cd

Summary:

Enhances task management with new features, consistent naming, validations, CRUD operations, and migration scripts.

Key points:

  • Add tools_available: "all" option in task definition to include all tools accessible to the agent (agents-api/agents_api/autogen/openapi_model.py).
  • Ensure consistent and semantically correct naming of event types (e.g., running, started).
  • Implement validations for all task, workflow, and execution definitions.
  • Add checks to Cozo queries.
  • Add migration script agents-api/agents_api/migrations/migrate_1716939839_task_relations.py.
  • Introduce relations: tasks, executions, transitions with up (create) and down (remove) queries.
  • Use run function to execute queries formatted as JSON.
  • Rename list_sessions to list_tasks in agents-api/agents_api/routers/tasks/routers.py.
  • Modify activity definitions in agents-api/agents_api/activities/task_steps/__init__.py for various workflow steps.
  • Add cel-python dependency in pyproject.toml.
  • Introduce prompt_step and transition_step activities.
  • Update TaskProtocol, ExecutionInput, StepContext, and TransitionInfo.
  • Modify create_execution_transition_query to handle new transition data.
  • Refactor llm_generate and caching mechanism.
  • Enhance PydanticPayloadConverter for better serialization.
  • Implement TaskExecutionWorkflow to manage task execution flow.
  • Update transition type logic in agents-api/agents_api/workflows/task_execution.py to handle awaiting_input, finish, and step states.
  • Add TasksManager and AsyncTasksManager classes in sdks/python/julep/managers/task.py for task management.
  • Introduce CRUD operations for tasks and task executions.
  • Update Client and AsyncClient classes in sdks/python/julep/client.py to include task management capabilities.
  • Add methods for listing, creating, retrieving, and starting task executions.
  • Ensure type checking with beartype decorator.
  • Add tests for task management in agents-api/tests/test_tasks.py and sdks/python/tests/test_tasks.py.

Generated with :heart: by ellipsis.dev

creatorrr avatar May 30 '24 00:05 creatorrr