fix(agents-api): Fix task execution logic #473
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
This PR refines task execution logic in the agents-api by adding a new query step, refactoring prompt handling, updating transition logic, and enhancing error handling across multiple files.
Key points:
cozo_query_step
toagents-api/agents_api/activities/task_steps/__init__.py
.cozo_query_step
inagents-api/agents_api/activities/task_steps/cozo_query_step.py
for executing queries.prompt_step
inagents-api/agents_api/activities/task_steps/prompt_step.py
to simplify prompt handling and settings application.transition_step
inagents-api/agents_api/activities/task_steps/transition_step.py
to useexecution_input
for IDs.acompletion
inagents-api/agents_api/clients/litellm.py
to filter supported parameters and format model names.finish
to valid transitions inagents-api/agents_api/common/protocol/tasks.py
.agents-api/agents_api/dependencies/developer_id.py
for multi-tenant mode.agents-api/agents_api/models/execution/create_execution_transition.py
to includeexecution_id
.agents-api/agents_api/routers/tasks/get_execution_details.py
by printing exceptions.agents-api/agents_api/workflows/task_execution.py
to handle errors and transitions.simple_prompt.yaml
inagents-api/tests/sample_tasks/
for testing.Generated with ❤️ by ellipsis.dev