Repository navigation
Agent: an S3 toolkit, and s3_triggers joining S3 and Lambda - #89
Merged
Merged
Conversation
The agent now covers Amazon S3 beside Lambda, and the bucket events that
invoke functions. AgentView().ask("Were last night's uploads to acme-raw
processed?") calls s3_triggers, which reads the bucket's event
notifications, lists the files written in the window, checks the function
is there and lets the bucket invoke it, and reads its runs and failures
from CloudWatch for the same window. Its findings name what broke the
link: a suffix filter that misses '.CSV', a multipart upload that a
PUT-only notification ignores, a missing function or permission (with
the add-permission command), or no file arriving at all.
- toolkits/s3_tools.py: S3Toolkit over S3Analyzer with find_buckets,
bucket_details, list_folder, find_files, folder_summary and file_info
(headers only: no tool reads a file's content), and s3_triggers when
the agent also has the Lambda toolkit (Toolkit.peer()). Pure
summarize_*, count_arrivals and trigger_findings.
- DEFAULT_TOOLKITS is now ("lambda", "s3"); AgentAnalyzer(s3_core=).
- s3.py: S3Analyzer.notifications() and the pure parse_notifications /
EventNotification (GetBucketNotificationConfiguration).
- Guard: attach() swaps the analyzer's session for a _GuardedSession, so
every client it makes (S3Analyzer's regional S3, CloudWatch, STS, S3
Control clients) is hooked; Head* reads are allowed; hooks de-duplicate
on the client's emitter (unique_id) rather than id(), which can be
reused once a short-lived client is collected.
- Budget.s3_keys caps one listing (100,000 keys); the report counts S3
request cost next to CloudWatch's, and shows the keys read.
- Tool calls leave out arguments equal to the tool's defaults (LangChain
passes them all) and write the first required one positionally; next
steps leave out None arguments (LambdaView().functions(None, ...)).
- README, docs/agent.md, docs/s3.md, CHANGELOG, CLAUDE.md, rules.py
(s3 in COMPANIONS["agent"], s3:GetBucketNotification).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018djcHAPxWHwcvV7sVFpJbx
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The agent now covers Amazon S3 beside Lambda, and the bucket events that
invoke functions. AgentView().ask("Were last night's uploads to acme-raw
processed?") calls s3_triggers, which reads the bucket's event
notifications, lists the files written in the window, checks the function
is there and lets the bucket invoke it, and reads its runs and failures
from CloudWatch for the same window. Its findings name what broke the
link: a suffix filter that misses '.CSV', a multipart upload that a
PUT-only notification ignores, a missing function or permission (with
the add-permission command), or no file arriving at all.
bucket_details, list_folder, find_files, folder_summary and file_info
(headers only: no tool reads a file's content), and s3_triggers when
the agent also has the Lambda toolkit (Toolkit.peer()). Pure
summarize_*, count_arrivals and trigger_findings.
EventNotification (GetBucketNotificationConfiguration).
every client it makes (S3Analyzer's regional S3, CloudWatch, STS, S3
Control clients) is hooked; Head* reads are allowed; hooks de-duplicate
on the client's emitter (unique_id) rather than id(), which can be
reused once a short-lived client is collected.
request cost next to CloudWatch's, and shows the keys read.
passes them all) and write the first required one positionally; next
steps leave out None arguments (LambdaView().functions(None, ...)).
(s3 in COMPANIONS["agent"], s3:GetBucketNotification).
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_018djcHAPxWHwcvV7sVFpJbx