Skip to main content

here-i-strand (HIS) agent module. Provides a custom Strands agent with DynamoDB status tracking, S3 session persistence and a concurrent tool executor with per-tool timeouts

Project description

Here I Strand

Library that provides a Strands agent for AWS Bedrock Agent Core with DynamoDB status tracking, S3 session persistence, and a concurrent tool executor with per-tool timeouts (HIS: here-i-strand).

Repository: github.com/tisaarus/here-i-strand

Installation

pip install here-i-strand
# or with uv
uv add here-i-strand

Quick start

You define how to load configuration (environment variables, your own settings module, etc.) and pass the values to HISAgent:

import os
from his import HISAgent

agent = HISAgent(
    bucket_name=os.environ["BUCKET_NAME"],
    status_dynamo_table_name=os.environ["STATUS_DYNAMO_TABLE_NAME"],
    session_id="my-session-id",
    name=os.environ.get("AGENT_NAME", "my-agent"),
    tools=[...],
)

Configuration

The library does not provide a settings layer. Pass bucket_name, status_dynamo_table_name, session_id, and optionally name (and any other HISAgent arguments) from your own config:

  • Environment variables
  • A .env file loaded by your app (e.g. python-dotenv, pydantic-settings)
  • Any other configuration source you use

Project structure (development)

here-i-strand/
├── README.md
├── pyproject.toml
├── .env.example             # Example env vars (for your app)
│
├── his/                      # Main package
│   ├── __init__.py           # HISAgent, TimeoutConcurrentToolExecutor, event_loop_tracker, ping_status_task
│   ├── his.py                # HISAgent, TimeoutConcurrentToolExecutor, ping, event_loop_tracker
│   └── logging/
│       └── logging.py
│
└── tests/
    ├── conftest.py
    └── test_his.py

Main components

  • HISAgent: Strands agent with a DynamoDB ping thread and S3 sessions. You pass status_dynamo_table_name, bucket_name, session_id, and optionally name so the ping and tracker use your table and bucket.
  • TimeoutConcurrentToolExecutor: Tool executor with a per-invocation timeout; if a tool exceeds the limit, an error is returned and execution continues with the rest.
  • event_loop_tracker: Callback that writes event-loop milestones (init, start, message, result, force_stop) to DynamoDB and stops the ping when done.

Tests

uv sync --all-groups
uv run pytest tests/ -v

Authors

License

MIT. See LICENSE.

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

here_i_strand-0.1.4.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

here_i_strand-0.1.4-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file here_i_strand-0.1.4.tar.gz.

File metadata

  • Download URL: here_i_strand-0.1.4.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for here_i_strand-0.1.4.tar.gz
Algorithm Hash digest
SHA256 09e40f24772abe65b8eda1794120d3affee4a8d3fd2d9be40dc2732e8973150a
MD5 883d27910e1a977f1c10ace1690ca1ea
BLAKE2b-256 56fb7e7c859a94d59a5f02bf7e67aef07e0325d4062760f74e41bc6775531084

See more details on using hashes here.

File details

Details for the file here_i_strand-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: here_i_strand-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for here_i_strand-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ed973f5c460e55c4323c3a7667082cc405ab4338d87b49a08631ff155575b4b4
MD5 a58b5f311f506b3cf2716dfc2a76a410
BLAKE2b-256 cddbc9632c52c78b9b5102593385bd5b75205acf1b7e173e28ad4bb3cb197e2f

See more details on using hashes here.

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