You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/guide/builtins.md
+12-9Lines changed: 12 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,22 +38,25 @@ Built-in tools are automatically enabled based on the agent configuration:
38
38
39
39
-**Agent Mode**: When `config.builtin.tool_calling_mode == "agent"`, both `STOP_TOOL` and `REASONING_TOOL` are available.
40
40
-**Thought Mode**: The `REASONING_TOOL` is only available when `config.builtin.agent_thought_mode` starts with "reasoning".
41
-
-**Process Messages**: The `PROCESS_MESSAGE` tool is enabled when `config.function_config.agent_middle_message`is True.
41
+
-**Process Messages**: The `PROCESS_MESSAGE` tool is used internally by the `HybridReActAgentStrategy` to communicate intermediate tool results to the user. It is **not** registered by `ReActAgentStrategy`; the `config.function_config.agent_middle_message`flag controls whether the agent may send intermediate notifications, but does not independently enable the `PROCESS_MESSAGE` tool.
42
42
43
43
## 9.2 Built-in Metadata Types
44
44
45
45
> **Since v0.9.1**: A new `amrita_core.builtins.types` module provides typed metadata classes (based on `MessageMetadataPayload`) for structured metadata in agent and hook workflows.
46
46
47
47
These typed metadata classes replace plain dictionaries, providing type safety and IDE autocompletion:
# The system will automatically use event.preset for the next attempt
57
-
if event.term ==1: # First retry
57
+
if event.term ==0: # First attempt
58
58
event.preset = get_alternative_preset() # Your custom function to get alternative preset
59
-
elif event.term ==2: #Second retry
59
+
elif event.term ==1: #First retry
60
60
event.preset = get_safe_preset() # Your custom function to get a safe/cheaper preset
61
61
else:
62
62
# Mark as failed if no more fallbacks available
@@ -70,7 +70,7 @@ The `FallbackContext` provides the following properties:
70
70
-`exc_info`: The exception that caused the failure
71
71
-`config`: The current [AmritaConfig](../api-reference/classes/AmritaConfig.md)
72
72
-`context`: The [SendMessageWrap](../api-reference/classes/SendMessageWrap.md) containing the message context
73
-
-`term`: The current retry attempt number (starting from 1)
73
+
-`term`: The current retry attempt number, counting from **0** (first call) up to `max_retries - 1`.
74
74
75
75
You can modify the `event.preset` to switch to a different model preset for the next retry attempt. If no suitable fallback is available, call `event.fail(reason)` to terminate the retry process.
Copy file name to clipboardExpand all lines: docs/docs/guide/security-mechanisms.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,18 +12,18 @@ The cookie system works by inserting a unique identifier into the conversation c
12
12
13
13
### 6.1.2 CookieConfig Configuration
14
14
15
-
The [CookieConfig](../api-reference/classes/CookieConfig.md) class manages cookie-related security settings:
15
+
The [CookieConfig](../api-reference/classes/CookieConfig.md) class manages cookie-related security settings. Cookie security is **enabled by default** (`enable_cookie=True`) — no explicit configuration is needed unless you want to customise the cookie string:
16
16
17
17
```python
18
18
from amrita_core.config import CookieConfig
19
19
20
-
#Enable cookie security detection
20
+
#Cookie security is ON by default. These examples show how to change the cookie.
21
21
security_config = CookieConfig(
22
-
enable_cookie=True, #Enable the cookie leak detection mechanism
22
+
enable_cookie=True, #Already the default, shown for clarity
23
23
cookie="custom_cookie_string"# Custom cookie string (defaults to random string)
24
24
)
25
25
26
-
# Or let the system generate a random cookie automatically
26
+
# Or let the system generate a random cookie automatically (this is the default behaviour)
0 commit comments