diff options
Diffstat (limited to 'agent/orchestrator/loop.py')
| -rw-r--r-- | agent/orchestrator/loop.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/agent/orchestrator/loop.py b/agent/orchestrator/loop.py new file mode 100644 index 0000000..ed2c0a8 --- /dev/null +++ b/agent/orchestrator/loop.py @@ -0,0 +1,18 @@ +"""Per-turn orchestration. + +A turn is: gather dynamic context, hand the conversation to the backend, return +the response. As capabilities grow (memory recall, routing per intent, channel +adapters) they hang off this function. +""" + +from .context import build_turn_context +from .models import Message, ModelRequest, call_model + + +def handle_turn(messages: list[Message]) -> str: + request = ModelRequest( + messages=messages, + turn_context=build_turn_context(), + ) + response = call_model(request) + return response.content |
