Skip to content

laplace-finance/laplace

Repository files navigation

LangGraph Multi-Agent Orchestrator

A configurable multi-agent orchestration system built with LangGraph Studio, featuring dynamic LLM-driven routing and comprehensive agent management.

Features

  • LLM-Driven Orchestration: Intelligent routing based on query understanding
  • Multiple Routing Strategies: LLM dynamic, rule-based, and hybrid approaches
  • Configurable Agents: Specialized agents for different tasks (data analysis, research, code assistance, etc.)
  • LangGraph Studio Integration: Visual workflow design and debugging
  • Extensible Architecture: Easy to add custom agents and tools
  • Mock Tools: Built-in mock implementations for testing

Quick Start

Prerequisites

  • Python 3.10+
  • Make (for using Makefile commands)

Installation

  1. Clone the repository

  2. Initialize the project:

    make init
  3. Copy .env.example to .env and add your API keys:

    cp .env.example .env
    # Edit .env with your favorite editor
  4. Start LangGraph Studio:

    make start
  5. Open http://localhost:8123 in your browser

Project Structure

.
├── langgraph.json              # Main LangGraph configuration
├── orchestrator/               # Orchestrator configuration
│   ├── config.json            # Core orchestrator settings
│   ├── routing_strategies/    # Routing strategy definitions
│   └── prompts/              # Orchestrator prompts
├── agents/                    # Agent definitions
│   ├── registry.json         # Agent registry
│   └── specialized/          # Specialized agent configs
├── tools/                     # Tool implementations
│   ├── core/                 # Core tools (web search, data processing)
│   └── custom/               # Custom tools
├── graphs/                    # Graph templates
└── examples/                  # Example workflows

Available Commands

make help        # Show all available commands
make init        # Initialize the project
make start       # Start LangGraph Studio
make dev         # Start in development mode with auto-reload
make validate    # Validate all configuration files
make test        # Run tests
make clean       # Clean up generated files

Configuration

Main Configuration (langgraph.json)

The main configuration file defines:

  • Python version requirements
  • Orchestrator settings
  • Agent registry location
  • LangGraph Studio settings

Orchestrator Configuration

Located in orchestrator/config.json, defines:

  • Model settings (provider, temperature, etc.)
  • Routing strategy
  • Graph workflow definition
  • Error handling policies

Agent Registry

The agents/registry.json file maintains a list of all available agents with:

  • Capabilities
  • Requirements
  • Cost and latency estimates
  • Routing hints

Adding Custom Agents

  1. Create a new agent directory:

    make new-agent
  2. Update the agent configuration in the created directory

  3. Register the agent in agents/registry.json

  4. Restart LangGraph Studio

Routing Strategies

LLM Dynamic

Fully AI-driven routing based on query analysis and agent capabilities.

Rule-Based

Deterministic routing using keyword and pattern matching.

Hybrid

Combines rule-based and LLM approaches for optimal performance.

Examples

Run examples with:

make run-example EXAMPLE=simple_query

Available examples:

  • simple_query: Basic single-agent query
  • complex_workflow: Multi-agent workflow
  • custom_agent: Custom agent implementation

Development

Running Tests

make test

Code Formatting

make format

Linting

make lint

Environment Variables

Key environment variables (set in .env):

  • OPENAI_API_KEY: OpenAI API key
  • ANTHROPIC_API_KEY: Anthropic API key
  • LANGGRAPH_STUDIO_PORT: Studio port (default: 8123)
  • ORCHESTRATOR_MAX_ITERATIONS: Max orchestration iterations
  • AGENT_VALIDATION: Validation strictness level

Troubleshooting

Studio Won't Start

  • Check that all dependencies are installed: make install
  • Verify .env file exists and has valid API keys
  • Check port 8123 is not in use

Configuration Validation Errors

Run make validate to check all configurations

Agent Not Found

  • Ensure agent is registered in agents/registry.json
  • Verify agent configuration file exists at the specified path

License

[Your License Here]

Contributing

[Contributing Guidelines]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors