Skip to content

imran31415/agentlog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

agentlog - AI Multi-Variation Execution Platform with Interface Architecture

note: Agentlog is in beta, and is under heavy development. Breaking changes may occur.

live demo: https://agentlog.scalebase.io

agentlog is a Go platform that wraps AI APIs (starting with Google Gemini) with multi-variation execution, database logging, and use case-specific implementations. It enables you to run the same AI prompt with different configurations, compare results, and implement domain-specific AI solutions like procurement management, legal analysis, and more.

Screenshots of Features:

AI Team Dashboad: image

Experimentation mode to compare multiple models: image

Detailed execution logs, flow graphs and flame graphs for each execution: image

Execution/Comparison metrics on every execution: image

Batteries included functions with customizations: image

"Stateless" agent self tracking: image

... And more!

πŸš€ Quick Start

Get AgentLog running in 2 steps:

1. Start the Backend Server

Update the config.env file with your local db and gemini api keys and then:

make run-server

This starts the agentlog backend on localhost:8080 with REST API endpoints for multi-variation AI execution, function calling, and database logging.

2025/07/24 20:36:54 Go SDK disabled - using REST API for all Gemini calls
πŸš€ agentlog HTTP Server starting on port 8080
πŸ“‘ Health check: http://localhost:8080/health
πŸ”§ API endpoints:
   POST /api/execute - Multi-variation execution
   GET  /api/execution-runs - Execution history
   GET  /api/configurations - List API configurations
   GET  /api/functions - List function definitions
   POST /api/functions - Create function definition
   GET  /api/functions/{id} - Get function by ID
   PUT  /api/functions/{id} - Update function
   DELETE /api/functions/{id} - Delete function
   POST /api/functions/test/{id} - Test function execution
   GET  /api/database/stats - Database statistics
   GET  /api/database/tables - Database tables
πŸ’‘ Use X-Use-Mock: true header for mock responses
πŸ”‘ Set GEMINI_API_KEY in config.env for real API calls

2025/07/24 20:36:57 πŸ“‹ Listing function definitions from database
2025/07/24 20:36:57 βœ… Successfully loaded 2 function definitions from database


2. Start the Frontend App

make frontend-start

This launches the React Native development server with the mobile interface for configuring AI models, executing prompts, and viewing results.

image

That's it!

You now have an AI experimentation platform running locally. The frontend will connect to the backend automatically.

image image

πŸ“‹ Overview

The Problem

When building AI agents with Gemini (or any LLM), you need visibility and control for debugging and optimization. Most implementations lack:

  1. Traceability & Monitoring - No logging of AI interactions
  2. Configuration Flexibility - Can't easily adjust temperature, tokens, system prompts
  3. Parallel Testing - No way to run multiple model variations simultaneously
  4. Centralized Management - No unified platform to track and compare executions

The Solution: AgentLog Platform

AgentLog is an AI experimentation platform that gives you control over your Gemini agents:

πŸ”§ Configuration Control

  • Configure Gemini API keys and any custom function API keys
  • Adjust model parameters: temperature, max tokens, top-P, top-K
  • Customize system prompts and context for different use cases
  • Set up parallel executions with variation testing

πŸ“Š Execution & Tracking

  • Run multiple AI model configurations simultaneously
  • Compare results side-by-side with analysis
  • Database logging of every API call and response
  • Track function calls, execution times, and model performance

πŸ› οΈ Function System

  • Add custom functions for external API integrations
  • Built-in support for weather APIs, Neo4j graph databases
  • Create domain-specific AI workflows (procurement, legal analysis, etc.)
  • Function call tracing and debugging capabilities

πŸ“± Frontend Interface

  • React Native mobile app for platform management
  • Real-time execution monitoring with loading states
  • Historical analysis with searchable execution logs
  • Database inspection tools for debugging

🏒 Features

  • MySQL database with audit trails
  • RESTful API architecture for integration
  • Multi-variation execution engine
  • Production deployment capabilities

Result: Instead of blind AI development, you get a platform with the tools needed to build, test, and optimize agents with visibility into their behavior.

🌟 Key Features

Core Platform

  • πŸ“Š Multi-Variation Execution: Run the same prompt with different configurations simultaneously
  • πŸ—„οΈ Database Logging: Every API call and response logged to MySQL database
  • πŸ” Result Comparison: Analyze and compare results across variations
  • βš™οΈ Configuration Support: Support for different models, temperatures, system prompts, and more
  • πŸ›‘οΈ Type-Safe Operations: Uses sqlc for generated type-safe SQL queries
  • 🧩 Interface Architecture: Clean, extensible interfaces for different use cases

Use Case Implementations

  • 🏒 AI Procurement Manager: Solution for vendor evaluation, contract analysis, negotiation strategies
  • πŸ“‹ Framework: Easy to implement new domains (legal, content, risk assessment, etc.)
  • 🏭 Factory Pattern: Simple instantiation of different implementations
  • πŸ”Œ Plugin System: Extensible architecture for custom functionality

Features

  • πŸ“ˆ Analytics & Insights: Performance metrics, cost analysis, model comparison
  • πŸ”„ Multi-Provider Support: Extensible to support different AI providers
  • πŸ§ͺ A/B Testing: Built-in experimentation framework for AI prompts
  • πŸ“ Audit Trail: Compliance and audit logging

πŸ—οΈ Architecture

agentlog Platform
β”œβ”€β”€ 🎯 Interface Layer
β”‚   β”œβ”€β”€ MultiVariationExecutor
β”‚   β”œβ”€β”€ ExecutionLogger  
β”‚   β”œβ”€β”€ ConfigurationManager
β”‚   β”œβ”€β”€ ResultComparator
β”‚   └── Use Case Interfaces
β”œβ”€β”€ 🏒 Domain Implementations
β”‚   β”œβ”€β”€ ProcurementManager
β”‚   β”œβ”€β”€ LegalAnalyzer (extensible)
β”‚   β”œβ”€β”€ ContentGenerator (extensible)
β”‚   └── RiskAssessor (extensible)
β”œβ”€β”€ 🏭 Factory & Adapters
β”‚   β”œβ”€β”€ agentlogFactory
β”‚   β”œβ”€β”€ ClientAdapter
β”‚   └── MockFactory (testing)
β”œβ”€β”€ πŸ—„οΈ Database Layer (MySQL + sqlc)
β”œβ”€β”€ πŸ”§ Core Client (AI API Wrapper)
└── πŸ“Š Analytics & Comparison Engine

🌐 HTTP Server Mode

The make run-api command starts a persistent HTTP server that provides REST API endpoints for the frontend mobile app.

Server Endpoints

  • GET /health - Health check with status information
  • POST /api/execute - Multi-variation execution endpoint
  • GET /api/execution-runs - Get execution history
  • GET /api/database/stats - Database statistics
  • GET /api/database/tables - List database tables

Server Features

  • Mock Mode Support: Add X-Use-Mock: true header for mock responses
  • Real API Integration: Uses real Gemini API when API key is configured
  • CORS Enabled: Ready for frontend integration
  • Database Logging: All executions logged to MySQL when available

Example Usage

# Start the server
make run-server

# Test health endpoint
curl http://localhost:8080/health

# Test execution with mock data
curl -X POST http://localhost:8080/api/execute \
  -H "Content-Type: application/json" \
  -H "X-Use-Mock: true" \
  -d '{
    "execution_run_name": "test",
    "base_prompt": "Write a story about AI",
    "configurations": [{
      "id": "test-1",
      "variation_name": "creative",
      "model_name": "gemini-1.5-flash",
      "temperature": 0.8
    }]
  }'

Frontend Integration

The HTTP server is designed to work with the React Native frontend:

  1. Start Backend: make run-server (runs on localhost:8080)
  2. Start Frontend: make frontend-start
  3. Configure: Set backend URL in mobile app settings
  4. Use: Configure AI models and execute multi-variation prompts

πŸ’Ό Procurement Management Usage

About

No description, website, or topics provided.

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published