Skip to main content

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:

  1. conversation_id / session_id / group_id from Strands invocation_state
  2. thread_id from Strands invocation_state
  3. 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=strands
  • sigil.framework.source=hooks
  • sigil.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_id or session_id in invocation_state.
  • If provider is inferred as custom, set provider="openai" / provider="anthropic" / provider="gemini" on hook creation.
  • Always call client.shutdown() during teardown.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sigil_sdk_strands-0.1.5.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sigil_sdk_strands-0.1.5-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file sigil_sdk_strands-0.1.5.tar.gz.

File metadata

  • Download URL: sigil_sdk_strands-0.1.5.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

Hashes for sigil_sdk_strands-0.1.5.tar.gz
Algorithm Hash digest
SHA256 6bec8899cbb1be1331fe4c34b74c1dbed1efc3a5d154b2ad6cc906883bffb16a
MD5 572902550815f8d375b7fd425b7850ae
BLAKE2b-256 dbf7e60d60ea01a573a28774e6bac44b9626b9479beca16643fa4eabc31ae5e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for sigil_sdk_strands-0.1.5.tar.gz:

Publisher: python-sdks-publish.yml on grafana/sigil-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sigil_sdk_strands-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for sigil_sdk_strands-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9aaeee1973a80dc9859ff492b97504e86134d2a74d9a42438a69f57de19cc986
MD5 ad837492d4f33f5ba110f3b9b5773e6d
BLAKE2b-256 32c6f168ab65c004d3605e69e6316fa0ff0ede34a23eab4445deecda3551dfc9

See more details on using hashes here.

Provenance

The following attestation bundles were made for sigil_sdk_strands-0.1.5-py3-none-any.whl:

Publisher: python-sdks-publish.yml on grafana/sigil-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page