Skip to content

Agent V1: ask about your Lambda functions in plain English - #87

Merged
utkarsh5026 merged 3 commits into
mainfrom
ccr-0a1d6d5e-mcu8jx
Oct 16, 2026
Merged

utkarsh5026 merged 3 commits into
mainfrom
ccr-0a1d6d5e-mcu8jx

Conversation

@utkarsh5026

Copy link
Copy Markdown
Owner

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

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
@utkarsh5026
utkarsh5026 merged commit bd7cd08 into main Oct 16, 2026
2 checks passed
@utkarsh5026
utkarsh5026 deleted the ccr-0a1d6d5e-mcu8jx branch October 16, 2026 14:57
@utkarsh5026 utkarsh5026 mentioned this pull request Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants