Repository navigation
Agent V1: ask about your Lambda functions in plain English - #87
Merged
Merged
Conversation
AgentView().ask("Which Lambda failed last night?") answers with an agent
(LangChain's deepagents) on an Azure OpenAI deployment, calling seven
read-only tools built on LambdaAnalyzer: find_functions, function_health,
function_errors, function_logs, function_performance, function_details
and function_code. Each tool returns a compact JSON summary with what it
covered (window, regions, cut short), secrets hidden, and turns AWS
errors into part of its answer instead of raising.
- A guard on every client LambdaAnalyzer makes for the agent refuses any
operation that isn't Get/List/Describe/Filter before its request is built.
- A budget per question: tool calls, time, cost (with model_prices=),
LangGraph steps, and a 3-day limit on log reads.
- deepagents' execute and general-purpose subagent are hidden; its file
tools stay on the in-memory backend.
- The report puts the answer first, then each tool call with its window
and regions, what it couldn't read, AWS reads, tokens and cost, and the
LambdaView commands to look closer. Follow-ups continue the conversation;
transcript() and tools() show the history and what it can call.
- chat_model= takes any LangChain chat model (Bedrock later).
Packaging: an [agent] extra (deepagents, langchain-openai; Python 3.11+),
agent.py registered as a companion of lambda_functions and a user of
_bedrock's _Answer. The module still imports on 3.10 with boto3 alone, and
its tests that need the agent's packages skip there.
Tests on moto with a scripted chat model, plus AzureChatOpenAI over a mock
HTTP endpoint. Docs: README section, docs/agent.md, a home-page card, a
demo scene, CHANGELOG and CLAUDE.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ATJkqtknCwJE4DQK1DEDrs
Conflicts: CHANGELOG.md (the agent's entry stays under Unreleased, next to set_timezone(); the Lambda graph entry moved to 0.19.0 with main) and __init__.py (both branches added exports: AgentAnalyzer, AgentView and set_timezone are all kept). The agent now follows set_timezone(): AgentAnalyzer.zone is timezone= when given (parsed by _kit's _zone_from, so a city or an offset works too), else the zone reports show times in. The question's "asked at" line uses it, the table of what it checked shows each window in the reports' zone, and its own _zone() copy is gone. Docs show set_timezone() first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ATJkqtknCwJE4DQK1DEDrs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ATJkqtknCwJE4DQK1DEDrs
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.
AgentView().ask("Which Lambda failed last night?") answers with an agent
(LangChain's deepagents) on an Azure OpenAI deployment, calling seven
read-only tools built on LambdaAnalyzer: find_functions, function_health,
function_errors, function_logs, function_performance, function_details
and function_code. Each tool returns a compact JSON summary with what it
covered (window, regions, cut short), secrets hidden, and turns AWS
errors into part of its answer instead of raising.
operation that isn't Get/List/Describe/Filter before its request is built.
LangGraph steps, and a 3-day limit on log reads.
tools stay on the in-memory backend.
and regions, what it couldn't read, AWS reads, tokens and cost, and the
LambdaView commands to look closer. Follow-ups continue the conversation;
transcript() and tools() show the history and what it can call.
Packaging: an [agent] extra (deepagents, langchain-openai; Python 3.11+),
agent.py registered as a companion of lambda_functions and a user of
_bedrock's _Answer. The module still imports on 3.10 with boto3 alone, and
its tests that need the agent's packages skip there.
Tests on moto with a scripted chat model, plus AzureChatOpenAI over a mock
HTTP endpoint. Docs: README section, docs/agent.md, a home-page card, a
demo scene, CHANGELOG and CLAUDE.md.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01ATJkqtknCwJE4DQK1DEDrs