agento11y-strands 0.10.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ SPDX-License-Identifier: Apache-2.0
2
+
3
+ See /LICENSE at repository root for full license text.
@@ -0,0 +1,100 @@
1
+ Metadata-Version: 2.4
2
+ Name: agento11y-strands
3
+ Version: 0.10.0
4
+ Summary: Strands Agents hooks for the Grafana Agent Observability Python SDK
5
+ License: SPDX-License-Identifier: Apache-2.0
6
+
7
+ See /LICENSE at repository root for full license text.
8
+
9
+ Requires-Python: >=3.10
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: agento11y>=0.10.0
13
+ Requires-Dist: strands-agents>=1.0.0
14
+ Provides-Extra: dev
15
+ Requires-Dist: pytest>=9.0.3; extra == "dev"
16
+ Dynamic: license-file
17
+
18
+ # Sigil Python Framework Module: Strands Agents
19
+
20
+ `agento11y-strands` provides a Strands `HookProvider` bridge that maps agent, model, and tool lifecycle events into Sigil generation and tool recording.
21
+
22
+ ## Installation
23
+
24
+ ```bash
25
+ pip install agento11y agento11y-strands
26
+ pip install strands-agents
27
+ ```
28
+
29
+ ## Quickstart
30
+
31
+ ```python
32
+ from agento11y import Client
33
+ from agento11y_strands import with_agento11y_strands_hooks
34
+ from strands import Agent
35
+
36
+ client = Client()
37
+ agent_config = with_agento11y_strands_hooks(
38
+ {"name": "support-agent"},
39
+ client=client,
40
+ provider_resolver="auto",
41
+ )
42
+
43
+ agent = Agent(**agent_config)
44
+ agent(
45
+ "Explain what LLM observability is in one sentence.",
46
+ invocation_state={"conversation_id": "demo-strands"},
47
+ )
48
+
49
+ client.shutdown()
50
+ ```
51
+
52
+ ## Existing Agents
53
+
54
+ ```python
55
+ from agento11y import Client
56
+ from agento11y_strands import with_agento11y_strands_hooks
57
+
58
+ client = Client()
59
+ with_agento11y_strands_hooks(agent, client=client, provider_resolver="auto")
60
+ ```
61
+
62
+ ## Conversation Mapping
63
+
64
+ Conversation ID precedence:
65
+
66
+ 1. `conversation_id` / `session_id` / `group_id` from Strands `invocation_state`
67
+ 2. `thread_id` from Strands `invocation_state`
68
+ 3. deterministic fallback `agento11y:framework:strands:<run_id>`
69
+
70
+ Pass a stable value per user conversation:
71
+
72
+ ```python
73
+ agent("Remember my timezone is UTC+1.", invocation_state={"conversation_id": "customer-42"})
74
+ agent("What timezone did I give you?", invocation_state={"conversation_id": "customer-42"})
75
+ ```
76
+
77
+ ## Metadata and Lineage
78
+
79
+ Required framework tags:
80
+
81
+ - `agento11y.framework.name=strands`
82
+ - `agento11y.framework.source=hooks`
83
+ - `agento11y.framework.language=python`
84
+
85
+ Metadata includes:
86
+
87
+ - required: `agento11y.framework.run_type`
88
+ - optional: `agento11y.framework.run_id`, `agento11y.framework.thread_id`, `agento11y.framework.parent_run_id`, `agento11y.framework.component_name`, `agento11y.framework.event_id`
89
+
90
+ ## Provider Resolver
91
+
92
+ Resolver order: explicit provider option -> Strands model config metadata -> model prefix inference -> `custom`.
93
+
94
+ For Bedrock model IDs that do not infer cleanly, pass `provider="anthropic"` or another provider value when creating the hook provider.
95
+
96
+ ## Troubleshooting
97
+
98
+ - If conversations are fragmented, pass stable `conversation_id` or `session_id` in `invocation_state`.
99
+ - If provider is inferred as `custom`, set `provider="openai"` / `provider="anthropic"` / `provider="gemini"` on hook creation.
100
+ - Always call `client.shutdown()` during teardown.
@@ -0,0 +1,83 @@
1
+ # Sigil Python Framework Module: Strands Agents
2
+
3
+ `agento11y-strands` provides a Strands `HookProvider` bridge that maps agent, model, and tool lifecycle events into Sigil generation and tool recording.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install agento11y agento11y-strands
9
+ pip install strands-agents
10
+ ```
11
+
12
+ ## Quickstart
13
+
14
+ ```python
15
+ from agento11y import Client
16
+ from agento11y_strands import with_agento11y_strands_hooks
17
+ from strands import Agent
18
+
19
+ client = Client()
20
+ agent_config = with_agento11y_strands_hooks(
21
+ {"name": "support-agent"},
22
+ client=client,
23
+ provider_resolver="auto",
24
+ )
25
+
26
+ agent = Agent(**agent_config)
27
+ agent(
28
+ "Explain what LLM observability is in one sentence.",
29
+ invocation_state={"conversation_id": "demo-strands"},
30
+ )
31
+
32
+ client.shutdown()
33
+ ```
34
+
35
+ ## Existing Agents
36
+
37
+ ```python
38
+ from agento11y import Client
39
+ from agento11y_strands import with_agento11y_strands_hooks
40
+
41
+ client = Client()
42
+ with_agento11y_strands_hooks(agent, client=client, provider_resolver="auto")
43
+ ```
44
+
45
+ ## Conversation Mapping
46
+
47
+ Conversation ID precedence:
48
+
49
+ 1. `conversation_id` / `session_id` / `group_id` from Strands `invocation_state`
50
+ 2. `thread_id` from Strands `invocation_state`
51
+ 3. deterministic fallback `agento11y:framework:strands:<run_id>`
52
+
53
+ Pass a stable value per user conversation:
54
+
55
+ ```python
56
+ agent("Remember my timezone is UTC+1.", invocation_state={"conversation_id": "customer-42"})
57
+ agent("What timezone did I give you?", invocation_state={"conversation_id": "customer-42"})
58
+ ```
59
+
60
+ ## Metadata and Lineage
61
+
62
+ Required framework tags:
63
+
64
+ - `agento11y.framework.name=strands`
65
+ - `agento11y.framework.source=hooks`
66
+ - `agento11y.framework.language=python`
67
+
68
+ Metadata includes:
69
+
70
+ - required: `agento11y.framework.run_type`
71
+ - optional: `agento11y.framework.run_id`, `agento11y.framework.thread_id`, `agento11y.framework.parent_run_id`, `agento11y.framework.component_name`, `agento11y.framework.event_id`
72
+
73
+ ## Provider Resolver
74
+
75
+ Resolver order: explicit provider option -> Strands model config metadata -> model prefix inference -> `custom`.
76
+
77
+ For Bedrock model IDs that do not infer cleanly, pass `provider="anthropic"` or another provider value when creating the hook provider.
78
+
79
+ ## Troubleshooting
80
+
81
+ - If conversations are fragmented, pass stable `conversation_id` or `session_id` in `invocation_state`.
82
+ - If provider is inferred as `custom`, set `provider="openai"` / `provider="anthropic"` / `provider="gemini"` on hook creation.
83
+ - Always call `client.shutdown()` during teardown.