Strands Agents hooks for Sigil Python SDK
Project description
Sigil Python Framework Module: Strands Agents
sigil-sdk-strands provides a Strands HookProvider bridge that maps agent, model, and tool lifecycle events into Sigil generation and tool recording.
Installation
pip install sigil-sdk sigil-sdk-strands
pip install strands-agents
Quickstart
from sigil_sdk import Client
from sigil_sdk_strands import with_sigil_strands_hooks
from strands import Agent
client = Client()
agent_config = with_sigil_strands_hooks(
{"name": "support-agent"},
client=client,
provider_resolver="auto",
)
agent = Agent(**agent_config)
agent(
"Explain what LLM observability is in one sentence.",
invocation_state={"conversation_id": "demo-strands"},
)
client.shutdown()
Existing Agents
from sigil_sdk import Client
from sigil_sdk_strands import with_sigil_strands_hooks
client = Client()
with_sigil_strands_hooks(agent, client=client, provider_resolver="auto")
Conversation Mapping
Conversation ID precedence:
conversation_id/session_id/group_idfrom Strandsinvocation_statethread_idfrom Strandsinvocation_state- deterministic fallback
sigil:framework:strands:<run_id>
Pass a stable value per user conversation:
agent("Remember my timezone is UTC+1.", invocation_state={"conversation_id": "customer-42"})
agent("What timezone did I give you?", invocation_state={"conversation_id": "customer-42"})
Metadata and Lineage
Required framework tags:
sigil.framework.name=strandssigil.framework.source=hookssigil.framework.language=python
Metadata includes:
- required:
sigil.framework.run_type - optional:
sigil.framework.run_id,sigil.framework.thread_id,sigil.framework.parent_run_id,sigil.framework.component_name,sigil.framework.event_id
Provider Resolver
Resolver order: explicit provider option -> Strands model config metadata -> model prefix inference -> custom.
For Bedrock model IDs that do not infer cleanly, pass provider="anthropic" or another provider value when creating the hook provider.
Troubleshooting
- If conversations are fragmented, pass stable
conversation_idorsession_idininvocation_state. - If provider is inferred as
custom, setprovider="openai"/provider="anthropic"/provider="gemini"on hook creation. - Always call
client.shutdown()during teardown.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sigil_sdk_strands-0.2.0.tar.gz.
File metadata
- Download URL: sigil_sdk_strands-0.2.0.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e06b82ad15ddd846c88e1cfe375e2520bd6752e044949f224b6eca7a57c23d7d
|
|
| MD5 |
b6f788bc8c41de5ef0d80c7f9360efa9
|
|
| BLAKE2b-256 |
f6f09119721ba52ed00fdba2aeed02df097d71a26eab11a3e3ad8a34f2fd7eed
|
Provenance
The following attestation bundles were made for sigil_sdk_strands-0.2.0.tar.gz:
Publisher:
python-sdks-publish.yml on grafana/sigil-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sigil_sdk_strands-0.2.0.tar.gz -
Subject digest:
e06b82ad15ddd846c88e1cfe375e2520bd6752e044949f224b6eca7a57c23d7d - Sigstore transparency entry: 1417606808
- Sigstore integration time:
-
Permalink:
grafana/sigil-sdk@3cfc596f2d3ca631ce9fa8fe3107d71c17caf924 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/grafana
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-sdks-publish.yml@3cfc596f2d3ca631ce9fa8fe3107d71c17caf924 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file sigil_sdk_strands-0.2.0-py3-none-any.whl.
File metadata
- Download URL: sigil_sdk_strands-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1b158e8a51db0385d2166eff8a68ce4a6e75456fe560d45d3c0de49d3ecc311
|
|
| MD5 |
f91293f10d543454df329867ef13ac11
|
|
| BLAKE2b-256 |
d870396591c7757596188584305aa07dd837fedc987d957ed5d602e6b8dbd534
|
Provenance
The following attestation bundles were made for sigil_sdk_strands-0.2.0-py3-none-any.whl:
Publisher:
python-sdks-publish.yml on grafana/sigil-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sigil_sdk_strands-0.2.0-py3-none-any.whl -
Subject digest:
c1b158e8a51db0385d2166eff8a68ce4a6e75456fe560d45d3c0de49d3ecc311 - Sigstore transparency entry: 1417607118
- Sigstore integration time:
-
Permalink:
grafana/sigil-sdk@3cfc596f2d3ca631ce9fa8fe3107d71c17caf924 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/grafana
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-sdks-publish.yml@3cfc596f2d3ca631ce9fa8fe3107d71c17caf924 -
Trigger Event:
workflow_dispatch
-
Statement type: