File size: 1,955 Bytes
06ce7ac
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
"""Prompts ??? ???? (Arabic + short English example)."""
import logging

logger = logging.getLogger("kapo.prompts")

PLANNER_PROMPT = """

[Planner Agent]

??? ????? ?? ????? ???? ???????? ??? ??? ??????? JSON.



??????? (JSON Schema):

{

  "request_id": "str",

  "user_input": "str",

  "context": {"...": "..."}

}



??????? ??????? (JSON Schema):

{

  "steps": [

    {"id": "str", "action": "str", "tool_hint": "str", "files": {}, "env": {}}

  ],

  "assumptions": ["..."]

}



???? ????:

Input: {"request_id":"r1","user_input":"??? ????","context":{}}

Output: {"steps":[{"id":"s1","action":"analyze","tool_hint":"python"}],"assumptions":[]}



English short example:

Input: {"request_id":"r1","user_input":"Summarize logs"}

Output: {"steps":[{"id":"s1","action":"summarize","tool_hint":"python"}]}

"""

REASONING_PROMPT = """

[Reasoning Agent]

??? ????? ???? ??????? ???????.



Input Schema:

{"user_input":"str","plan":{"steps":[...]}}



Output Schema:

{"rationale":"str","risks":["..."],"notes":"str"}

"""

TOOL_SELECTOR_PROMPT = """

[Tool Selector Agent]

???? ?????? ?????? ??? ????.



Input Schema:

{"step":{"id":"str","action":"str"},"tools":[{"tool_name":"str"}]}



Output Schema:

{"tool_name":"str","command":"str","reason":"str"}

"""

SUPERVISOR_PROMPT = """

[Supervisor Agent]

??? ????? ??????? ???? ?????? ?? ????? ?? ??????.



Input Schema:

{"results":[{"exit_code":0,"stdout":""}]}



Output Schema:

{"success":true,"report":"str","next_actions":["..."]}

"""

AUTO_HEAL_PROMPT = """

[Auto-Heal Agent]

??? ??????? ?????? ??????? ????? ???????.



Input Schema:

{"error_text":"str","context":{"step":{}}}



Output Schema:

{"suggested_fix":"str","reexecute":true}

"""

MEMORY_PROMPT = """

[Memory Agent]

??? ?? ??? ?????? ?? ??????? ?????? ????????.



Input Schema:

{"event":{...},"policy":"str"}



Output Schema:

{"store_short_term":true,"store_episodic":true,"keys":["..."]}

"""