Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shorten intermediate outputs of the companion #335

Open
1 task
Teneroy opened this issue Jan 13, 2025 · 1 comment · May be fixed by #358
Open
1 task

Shorten intermediate outputs of the companion #335

Teneroy opened this issue Jan 13, 2025 · 1 comment · May be fixed by #358
Assignees

Comments

@Teneroy
Copy link
Collaborator

Teneroy commented Jan 13, 2025

Description

In our UI we won't be able to display full intermediate answers of our agents. Therefore, we would need to display smaller intermediate steps. We can use subtasks for that and simply display subtasks for the beginning. Additionally, if you find it useful and simple to implement, we can output messages we are passing to the tools, so that users will be aware which resources are being retrieved and then analyzed.

Example:

{"event": "agent_action", "data": {"agent": "Supervisor", "answer": {"content": "Give me the list of namespaces again", "next": "KubernetesAgent"}}}

convert to:

{"event": "agent_action", "data": {"agent": "Supervisor", "answer": {"content": "Supervisor agent created a plan", "next": "KubernetesAgent"}}}

{"event": "agent_action", "data": {"agent": "KubernetesAgent", "answer": {"content": "Here is the list of namespaces in your Kubernetes cluster:\n\n1. bitnami-role-missing\n2. bitnami-wrong-rbac-permissions\n3. busybox-no-kubectl-binary\n4. cert-manager\n5. default\n6. improper-persistent-storage\n7. istio-system\n8. k8s-incorrect-liveness-probe\n9. k8s-wrong-svc-labels\n10. kcp-system\n11. kube-node-lease\n12. kube-public\n13. kube-system\n14. kyma-app-apirule-broken\n15. kyma-app-serverless-syntax-err\n16. kyma-eventing-wrong-event-type\n17. kyma-serverless-function-no-replicas\n18. kyma-subscription-old-event-type\n19. kyma-system\n20. nginx-oom\n21. nginx-wrong-image\n22. whoami-too-many-replicas\n\nIf you need more information about any specific namespace, feel free to ask!"}}}

convert to:

{"event": "agent_action", "data": {"agent": "KubernetesAgent", "answer": {"content": "Kyma Agent retrieved namespaces"}}}

final output:

{"event": "agent_action", "data": {"agent": "Supervisor", "answer": {"content": "Here is the list of namespaces in your Kubernetes cluster:\n\n1. bitnami-role-missing\n2. bitnami-wrong-rbac-permissions\n3. busybox-no-kubectl-binary\n4. cert-manager\n5. default\n6. improper-persistent-storage\n7. istio-system\n8. k8s-incorrect-liveness-probe\n9. k8s-wrong-svc-labels\n10. kcp-system\n11. kube-node-lease\n12. kube-public\n13. kube-system\n14. kyma-app-apirule-broken\n15. kyma-app-serverless-syntax-err\n16. kyma-eventing-wrong-event-type\n17. kyma-serverless-function-no-replicas\n18. kyma-subscription-old-event-type\n19. kyma-system\n20. nginx-oom\n21. nginx-wrong-image\n22. whoami-too-many-replicas\n\nIf you need more information about any specific namespace, feel free to ask!", "next": "end"}}}

Acceptance criteria:

  • Intermediate responses are being shortened(no more than 15 words)
@tanweersalah tanweersalah self-assigned this Jan 15, 2025
@mfaizanse
Copy link
Member

Also try to ignore the summarization output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants