AI-Powered Multi-Agent Platform for Blockchain Operations and Log Analysis

ripple · Finance · 2024 · source Agentic: yes · promotional bias: low · source-backed · extracted with prompt 0.5.4 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Blockchain network operations and log/code analysis

Ripple needed platform engineers to troubleshoot XRPL production issues without spending days manually correlating massive peer-to-peer blockchain logs with C++ protocol code and without relying on a small pool of C++ experts for every incident.

Constraints:

Architecture

Ripple built a multi-agent operations platform on AWS. Log pipelines bring validator, hub, and client-handler logs into S3, chunk them with boundary-aware Lambda processing, push work through SQS, and load parsed log metadata into CloudWatch. Code and standards repositories are periodically retrieved, versioned, stored in S3, embedded with Titan Text Embeddings V2, and indexed in Neptune Analytics for GraphRAG over code relationships. A web UI sends engineer questions through API Gateway and Cognito to an orchestrator agent. The orchestrator classifies intent, invokes specialist code-analysis and log-analysis agents, and synthesizes results. The log-analysis agent works with a query-generator agent to produce CloudWatch Logs Insights queries. Agents run across Lambda and Bedrock AgentCore Runtime with DynamoDB state, Secrets Manager, SSM configuration, prompt guardrails, and observability.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  web-chat-ui["web-chat-ui"] --> api-gateway["api-gateway"]
  api-gateway --> cognito-auth["cognito-auth"]
  api-gateway --> orchestrator-agent["orchestrator-agent"]
  orchestrator-agent --> dynamodb-state["dynamodb-state"]
  orchestrator-agent --> code-analysis-agent["code-analysis-agent"]
  orchestrator-agent --> log-analysis-agent["log-analysis-agent"]
  log-analysis-agent --> query-generator-agent["query-generator-agent"]
  query-generator-agent --> cloudwatch-logs["cloudwatch-logs"]
  log-analysis-agent --> cloudwatch-logs
  code-analysis-agent --> neptune-graphrag-store["neptune-graphrag-store"]
  log-ingestion-s3["log-ingestion-s3"] --> log-chunking-lambda["log-chunking-lambda"]
  log-chunking-lambda --> sqs-log-work["sqs-log-work"]
  sqs-log-work --> log-processor-lambda["log-processor-lambda"]
  log-processor-lambda --> cloudwatch-logs
  code-retrieval-pipeline["code-retrieval-pipeline"] --> code-docs-s3["code-docs-s3"]
  code-docs-s3 --> neptune-graphrag-store
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
web-chat-ui Clean chat interface used by platform engineers to ask operational questions. api-gateway
api-gateway Managed API endpoint layer for requests into the multi-agent platform. web-chat-ui, cognito-auth, orchestrator-agent
cognito-auth Authentication layer for API Gateway access. api-gateway
orchestrator-agent Classifies engineer intent, delegates to specialist agents, and synthesizes a coherent response. api-gateway, dynamodb-state, code-analysis-agent, log-analysis-agent
dynamodb-state State management backbone for orchestrator sessions. orchestrator-agent
code-analysis-agent Retrieves graph-grounded code and documentation context from the GraphRAG store. orchestrator-agent, neptune-graphrag-store, log-analysis-agent
log-analysis-agent Performs operational analytics over CloudWatch log groups. orchestrator-agent, query-generator-agent, cloudwatch-logs, code-analysis-agent
query-generator-agent Generates syntactically accurate CloudWatch Logs Insights queries using a static JSON tool. log-analysis-agent, cloudwatch-logs
log-ingestion-s3 Stores raw node logs before distributed chunking and processing. log-chunking-lambda
log-chunking-lambda Splits log files by byte ranges while respecting log-line boundaries and configured chunk size. log-ingestion-s3, sqs-log-work
sqs-log-work Distributed processing queue for derived log chunks. log-chunking-lambda, log-processor-lambda
log-processor-lambda Reads chunk metadata, retrieves relevant S3 chunks, parses metadata, and writes logs to CloudWatch. sqs-log-work, cloudwatch-logs
cloudwatch-logs Log analytics target queried by the log-analysis agent. log-processor-lambda, log-analysis-agent, query-generator-agent
code-retrieval-pipeline Periodically retrieves and versions XRPL code and standards repositories. code-docs-s3
code-docs-s3 Stores code and documentation files before knowledge-base ingestion. code-retrieval-pipeline, neptune-graphrag-store
neptune-graphrag-store GraphRAG vector/relationship store for code and documentation context. code-docs-s3, code-analysis-agent

Data flow

Raw XRPL node logs are copied into S3, chunked by an S3-triggered Lambda while preserving log-line boundaries, placed onto SQS, then processed into CloudWatch. Code and documentation are retrieved from repositories, stored in S3, chunked, embedded, and loaded into a Neptune Analytics GraphRAG store. An engineer asks a question through the web UI. API Gateway and Cognito authenticate the request. The orchestrator agent classifies intent and calls code-analysis and/or log-analysis agents. Code analysis retrieves graph-grounded code context; log analysis asks the query-generator agent for a valid CloudWatch query, runs it, and returns relevant logs. The orchestrator synthesizes a single response.

4 supporting quotes
“Raw logs from validators, hubs, client handlers, they are first brought into S3 using a separate workflow”transcript, stated
“Once the data reaches the S3, we have the S3 event trigger, triggering the Lambda function there, which looks into the file, gets the byte start and the end of each chunk”transcript, stated
“the log analysis agent is working closely with the query generator agent, whose sole responsibility is to come up with an accurate query.”transcript, stated
“The orchestrator agent receives this query and classifies the query. It does intent classification.”transcript, stated

Why this architecture

Ripple needed to correlate code relationships and noisy operational logs, so the system separates code and log pipelines while letting agents collaborate at query time. GraphRAG was chosen over a plain vector store because code understanding depends on relationships across files and documentation. A query-generator agent isolates CloudWatch query correctness from higher-level log reasoning. AgentCore and Lambda split runtime responsibilities while DynamoDB, Secrets Manager, SSM, prompt guardrails, and observability handle state, configuration, credentials, behavior constraints, and performance monitoring.

4 supporting quotes
“We are using GraphRAG, that's because it's really good at storing relationships across the code base.”transcript, stated
“the process involves generating a CloudWatch log insights query, and in order to generate a syntactically accurate query, the log analysis agent is working closely with the query generator agent”transcript, stated
“AgentCore has this lot of infra capabilities that we don't wanna deal with, particularly let's work on the actual business logic, the problem that we wanna solve.”transcript, stated
“Every prompt is structured that provides the agent its role, its task, strong, explicit guardrails of what the agent is not allowed to do.”transcript, stated

Models used: Amazon Bedrock · Titan Text Embeddings V2 · Cohere Rerank · Strands SDK · Amazon Bedrock AgentCore Runtime

Scale

Alternatives considered (roads not taken)

Manual log and code correlation by platform and C++ experts

Rejected because: It could take days and created a bidirectional dependency between platform engineers and protocol specialists.

“it could take almost two days, even to just understand what's going on.”transcript, stated
“One of the biggest benefit that I noticed was the removal of the bidirectional dependency between the platform team and the C++ expert”transcript, stated

Plain OpenSearch vector store for code retrieval

Rejected because: Ripple needed GraphRAG to preserve codebase relationships.

“We are using GraphRAG, that's because it's really good at storing relationships across the code base.”transcript, stated

A machine-learning system trained directly on data

Rejected because: The team shifted toward AI agents that correlate logs and code in natural language rather than a conventional ML inference setup.

“Initially we were like, "Okay, let's go with the machine learning system.”transcript, stated
“Where the whole world is heading towards English as a natural programming language, we started looking into AI as a solution, where we can correlate between the logs and the code, and it can give us a meaningful summary out of it.”transcript, stated

One generalist agent for every task

Rejected because: The platform separates orchestration, code analysis, log analysis, and query generation so each agent has a focused responsibility.

“Our multi-agent platform consists of four AI agents. Let's talk about them one by one.”transcript, stated

Patterns

multi-agent-orchestration (orchestration)

Ripple uses an orchestrator plus specialist code-analysis, log-analysis, and query-generator agents, with the orchestrator selecting sequential or parallel execution.

“Our multi-agent platform consists of four AI agents.”transcript, stated
“Based on the query, it then decides whether to invoke a single specialist agent or coordinate multiple agents in a sequential or parallel execution format.”transcript, stated

rag-retrieval (retrieval)

The code-analysis agent retrieves code and documentation context from a Bedrock knowledge base backed by GraphRAG.

“the code analysis agent using an LLM which is hosted in Bedrock first gets this context from the knowledge base along with the entities.”transcript, stated

retrieval-ranking (retrieval)

A reranking layer performs a second relevance pass over retrieved GraphRAG documents.

“we also have applied another, let's say, significant improvement as well. So we have reranking layer built on top of this GraphRAG workflow.”transcript, stated
“While the vector search gives us the top matches based on the embeddings, rerankers like, you know, Cohere rerank that you see here, evaluate the relevance dynamically at runtime.”transcript, stated

tool-use-orchestration (orchestration)

The log-analysis agent delegates CloudWatch query construction to a query-generator agent using a static JSON tool.

“there is a tool, a static JSON file that is provided to the query generator agent, which it reviews, and hands off the query to the log analysis agent.”transcript, stated

observability-tracing (operations)

AgentCore observability tracks sessions, latency, duration, token usage, and errors for agent performance improvement.

“This has the total number of sessions, latency, duration, token usage, as well as errors that are present in the AgentCore containers”transcript, stated

guardrails-io-filtering (governance)

Ripple uses explicit per-agent prompt guardrails that define each role, task, and prohibited behavior.

“Every prompt is structured that provides the agent its role, its task, strong, explicit guardrails of what the agent is not allowed to do.”transcript, stated

Tradeoffs

Use GraphRAG for code understanding.

Chose Neptune Analytics GraphRAG over a plain OpenSearch vector store over OpenSearch vector store.

Rationale: Code questions depend on relationships across files and entities, not just semantic similarity.

“We are using GraphRAG, that's because it's really good at storing relationships across the code base.”transcript, stated

Split query generation from log analysis.

Chose dedicated query-generator agent over having the log-analysis agent write every query directly.

Rationale: Logs Insights syntax accuracy is important enough to isolate as a specialist responsibility.

“the query generator agent, whose sole responsibility is to come up with an accurate query.”transcript, stated

Use both Lambda and AgentCore for agent hosting.

Chose mixed Lambda and Bedrock AgentCore Runtime deployment over migrating every agent immediately.

Rationale: Lambda met constraints when AgentCore was still new, while AgentCore offered purpose-built production agent runtime as it matured.

“two agents that are hosted on AWS Lambda, whereas the other two agents are hosted on something different.”transcript, stated
“we made this design choice because at that time, Lambda satisfied all our constraints, and AgentCore has just entered preview.”transcript, stated

Preprocess logs daily instead of querying raw files ad hoc.

Chose S3/SQS/Lambda/CloudWatch log-processing pipeline over manual raw-log inspection.

Rationale: The volume is too large for manual investigation and needs prepared, searchable operational data.

“we have this log processing pipeline which runs every day, which makes it prepared for the whole agentic framework to make a meaningful summary out of it.”transcript, stated

Gotchas (what bit them)

Peer-to-peer blockchain logs are noisy and out of sequence.

Root cause: XRPL has decentralized node types and consensus phases whose meaningful events are spread across many log lines.

Resolution: Use code-analysis context plus log-analysis queries so multiple log lines can be collated into a protocol-aware answer.

“it's so noisy, it's a peer-to-peer network, you'll get too many messages in the logs, and it can be jumpy, out of sequence.”transcript, stated
“multiple loglines need to be collated to answer a question.”transcript, stated

Manual incident diagnosis depended on C++ protocol experts.

Root cause: Platform engineers needed C++ codebase knowledge to interpret logs and determine whether something was an issue.

Resolution: Correlate logs and code through the agent platform so platform engineers can get meaningful summaries directly.

“we have to rely on a C++ expert like Code Ledger team, who's an engineering team who does all this protocol development”transcript, stated
“the removal of the bidirectional dependency between the platform team and the C++ expert”transcript, stated

CloudWatch query syntax is a specialized subproblem.

Root cause: The log-analysis agent needs syntactically accurate Logs Insights queries before it can answer operational questions.

Resolution: Create a dedicated query-generator agent whose only job is accurate query generation.

“in order to generate a syntactically accurate query, the log analysis agent is working closely with the query generator agent, whose sole responsibility is to come up with an accurate query.”transcript, stated

Agent infrastructure can distract from business logic.

Root cause: Running production agents requires runtime, communication, credentials, configuration, and observability capabilities.

Resolution: Use Bedrock AgentCore Runtime, Secrets Manager, SSM Parameter Store, and AgentCore observability to offload infrastructure concerns.

“AgentCore has this lot of infra capabilities that we don't wanna deal with, particularly let's work on the actual business logic, the problem that we wanna solve.”transcript, stated

Evaluation

Ripple evaluated the platform through live demonstrations, observability of agent sessions and latency, and whether the assistant could answer multi-line consensus-round questions that previously required expert manual analysis.

Metrics: agent sessions · latency · duration · token usage · errors · ability to collate consensus-round log lines · time reduced from days to interactive summaries

3 supporting quotes
“This has the total number of sessions, latency, duration, token usage, as well as errors that are present in the AgentCore containers”transcript, implied
“multiple loglines need to be collated to answer a question.”transcript, stated
“that used to take at least two to three days for a platform engineer, working with the core C++ engineer, to have a meaningful summary out of it.”transcript, stated

Outcomes

Ripple describes almost 900 plus XRPL nodes, 100 million ledgers over 13 years, three-to-five-second finality, 35-50 GB per single log load, 40 plus mainnet nodes, and around 2.5 TB of log data.

3 supporting quotes
“the removal of the bidirectional dependency between the platform team and the C++ expert”transcript, stated
“that used to take at least two to three days for a platform engineer, working with the core C++ engineer, to have a meaningful summary out of it.”transcript, stated
“we started looking into AI as a solution, where we can correlate between the logs and the code, and it can give us a meaningful summary out of it.”transcript, stated