# acgodson/vane architecture

> Architecture diagram of the GitHub repository acgodson/vane, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/acgodson/vane
- Repository: https://github.com/acgodson/vane

## Overview

##### Project Overview
- Vane is an AI-powered agent creation toolkit that facilitates conversational AI development via a CLI. It also powers Vane Wallet—a voice-controlled Ethereum wallet integrated with Alexa.
- The project is multi-faceted, incorporating components for CLI-based agent creation (using TypeScript wrapped in the vane-cli package), a generated AI agent (the vaneagent directory), Alexa skills (in Alexa-skills/vane-wallet, complete with AWS Lambda functions), and a WebSocket-based visual editor (in the client folder).

##### Main Components
- Vane CLI (located in packages/vane-cli):
- Provides commands (build, deploy, chat) for creating and managing AI agents.
- Handles core logic via TypeScript files (bin.js, cli scripts, integration, and core agent-kit modules).
- Vane Agent (in vaneagent):
- Contains the core AI conversational logic and supporting tools.
- Hosts definitions for agents (like EthereumPriceAgent) and tools (EthereumPriceTool).
- Alexa Skills / AWS Lambda Functions (in Alexa-skills/vane-wallet/lambda):
- Contains multiple handler modules (address, transaction, general, vane-agentHandler) to process voice commands and integrate with the Vane Wallet.
- Includes supporting utilities, scripts, and a dedicated sub-folder (vane-agent) for agent-specific functionality.
- Client (in client):
- Features a WebSocket-based UI/editor for interactive agent development.
- Acts as a visual layer that enables real-time editing and monitoring of agent behavior.
- External Integrations:
- AWS Lambda hosting which powers the serverless Alexa integration.
- Integration with external platforms like Covalent and Vercel’s AI Agent infrastructure.
- Connections to the Ethereum blockchain for wallet management and transaction processing.

##### Relationships and Interactions
- The CLI (vane-cli) serves as the primary interface for developers to create, build, and deploy AI agents.
- The Vane Agent acts as the brain powering conversational interactions; it is generated and then utilized by both the CLI and Alexa Skills.
- The Alexa Skills component (AWS Lambda functions) exposes endpoints for voice commands—a user interacting with Alexa triggers these Lambda handlers, which in turn call out to the Vane Agent logic (via the internal “agent-kit”).
- The Client provides a secondary UI where developers can manage and edit the agent logic in real-time through a WebSocket-based connection.
- There is a clear flow from development (CLI & Client) to deployment (AWS Lambda via Alexa Skills), while the Vane Agent remains central to processing and executing conversational logic.

##### Architectural Patterns and Design Principles
- Separation of Concerns – each top-level folder (vane-cli, vaneagent, Alexa-skills, client) encapsulates a distinct aspect of the system.
- Microservice / Modular structure – AWS Lambda functions, agent modules, and web UI work as independently deployable and maintainable components.
- Serverless and Scalable – the Alexa Skills use AWS Lambda for scalable, on-demand execution.
- Extensibility – modular design in vaneagent and clear CLI commands allow for ease of extending agent functionality without significant rework.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Development Environment"
        CLI["CLI Agent Creation/Management"]:::dev
        ClientUI["WebSocket-based Visual Editor (Client UI)"]:::dev
    end

    subgraph "Core System"
        Agent["AI Agent Core"]:::core
    end

    subgraph "Production/Deployment"
        Lambda["Alexa Skills / AWS Lambda Handlers"]:::production
    end

    Developer["Developer"]:::external
    AlexaService["Alexa Service"]:::external
    AWSLambdaHosting["AWS Lambda Hosting"]:::external
    EthereumNetwork["Ethereum Network"]:::external
    CovalentVercel["Covalent/Vercel Infrastructure"]:::external

    Developer -->|"uses"| CLI
    Developer -->|"uses"| ClientUI
    CLI -->|"triggers"| Agent
    ClientUI -->|"updates"| Agent
    Agent -->|"invokes"| Lambda
    AlexaService -->|"triggers"| Lambda
    Lambda -->|"callsBack"| Agent
    CLI -->|"deploysTo"| Lambda
    Lambda -->|"hostedOn"| AWSLambdaHosting
    AWSLambdaHosting -->|"powers"| AlexaService
    Agent -->|"accesses"| EthereumNetwork
    Agent -->|"integratesWith"| CovalentVercel

    click CLI "https://github.com/acgodson/vane/tree/main/packages/vane-cli"
    click Agent "https://github.com/acgodson/vane/tree/main/vaneagent"
    click Lambda "https://github.com/acgodson/vane/tree/main/Alexa-skills/vane-wallet/lambda"
    click ClientUI "https://github.com/acgodson/vane/tree/main/client"

    classDef dev fill:#FFCC00,stroke:#333,stroke-width:2px,color:black
    classDef core fill:#66CCFF,stroke:#333,stroke-width:2px,color:black
    classDef production fill:#FF9999,stroke:#333,stroke-width:2px,color:black
    classDef external fill:#B3E6B3,stroke:#333,stroke-width:2px,color:black
```
