Bayram Eker

Bayram Eker

AI systems engineer focused on agentic workflows, edge AI, and autonomous intelligence platforms.

Istanbul, Turkey

Medium
Open to selective collaborations in AI product strategy, agentic automation, and edge deployment.

AI Service

Represents the kind of backend plumbing required to turn AI capabilities into usable product surfaces.

Backend AI Systems

AI Service

AI Provider

bayrameker/ai-service

Python - 1 stars - 0 forks - updated Jul 6, 2025

README

AI Service - Independent Multi-Agent AI Platform

πŸš€ Overview

Fully completed and production-ready independent AI service featuring advanced multi-agent architecture, intelligent memory systems, and comprehensive third-party integrations. Powered by OpenAI, Anthropic Claude, and Ollama integrations with enterprise-grade security features and scalable architecture.

✨ Key Features

πŸ€– Multi-LLM Integration

  • OpenAI: GPT-4, GPT-4o, GPT-4 Turbo and other models
  • Anthropic Claude: Claude 4, Claude 3.5 Sonnet, Haiku
  • Ollama: Llama 3.3, DeepSeek R1, Qwen and other local models
  • Unified API: Single interface for all LLM providers
  • Automatic Failover: Load balancing and fault tolerance

🎯 Advanced Agent System

  • Multi-Agent Architecture: Independent agents with specialized roles
  • Agent Lifecycle Management: Complete agent management and orchestration
  • Role-Based System: Researcher, Analyst, Coder, Coordinator roles
  • Task Management: Advanced task queue and workflow engine
  • Agent Collaboration: A2A (Agent-to-Agent) protocol

🧠 Intelligent Memory Systems

  • Episodic Memory: Store and learn from agent experiences
  • Semantic Memory: Structured storage of knowledge and concepts
  • Working Memory: Short-term context and conversation management
  • RAG System: Retrieval Augmented Generation
  • Vector Database: FAISS and ChromaDB support
  • Self-Learning: Automatic learning from experiences

πŸ”— Comprehensive Integrations

  • REST API Gateway: Unified interface for external APIs
  • Webhook System: Real-time event management
  • Database Connectors: PostgreSQL, MongoDB, MySQL support
  • Cloud Services: AWS, Azure, GCP integration
  • Third-Party Adapters: Slack, Discord, Twitter, Email, etc.
  • Plugin Architecture: Extensible plugin system

πŸ”’ Enterprise Security

  • JWT Authentication: Secure token-based authentication
  • RBAC: Role-based access control
  • API Key Management: Secure key management
  • Encryption: Data encryption and security protocols
  • Audit Logging: Comprehensive security and operation logs
  • Rate Limiting: Traffic control and DDoS protection

πŸ—οΈ System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     AI Service                              β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  API Layer (FastAPI)                                       β”‚
β”‚  β”œβ”€β”€ LLM Endpoints    β”œβ”€β”€ Agent Endpoints                  β”‚
β”‚  β”œβ”€β”€ Memory Endpoints β”œβ”€β”€ Integration Endpoints            β”‚
β”‚  β”œβ”€β”€ Collaboration   β”œβ”€β”€ Plugin Endpoints                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Agent Management Layer                                     β”‚
β”‚  β”œβ”€β”€ Agent Manager    β”œβ”€β”€ Task Queue                       β”‚
β”‚  β”œβ”€β”€ Workflow Engine  β”œβ”€β”€ A2A Protocol                     β”‚
β”‚  β”œβ”€β”€ Message Broker   β”œβ”€β”€ Agent Registry                   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Memory Systems                                             β”‚
β”‚  β”œβ”€β”€ Episodic Memory  β”œβ”€β”€ Semantic Memory                  β”‚
β”‚  β”œβ”€β”€ Working Memory   β”œβ”€β”€ RAG System                       β”‚
β”‚  β”œβ”€β”€ Learning System  β”œβ”€β”€ Vector Store                     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  LLM Provider Layer                                         β”‚
β”‚  β”œβ”€β”€ OpenAI          β”œβ”€β”€ Anthropic                         β”‚
β”‚  β”œβ”€β”€ Ollama          β”œβ”€β”€ Provider Manager                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Integration Layer                                          β”‚
β”‚  β”œβ”€β”€ API Gateway     β”œβ”€β”€ Webhook System                    β”‚
β”‚  β”œβ”€β”€ Database Conn.  β”œβ”€β”€ Cloud Services                    β”‚
β”‚  β”œβ”€β”€ Third-Party     β”œβ”€β”€ Plugin Manager                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Infrastructure                                             β”‚
β”‚  β”œβ”€β”€ Redis           β”œβ”€β”€ Vector DB                         β”‚
β”‚  β”œβ”€β”€ Security        β”œβ”€β”€ Monitoring                        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ› οΈ Technology Stack

Backend

  • Framework: FastAPI (Python 3.9+)
  • Agent Framework: LangGraph + LangChain
  • Database: Redis, PostgreSQL, MongoDB
  • Vector DB: FAISS, ChromaDB
  • Authentication: JWT, bcrypt

LLM Providers

  • OpenAI: GPT-4, GPT-4o, GPT-4 Turbo
  • Anthropic: Claude 4, Claude 3.5 Sonnet, Haiku
  • Ollama: Llama 3.3, DeepSeek R1, Qwen, etc.

Infrastructure

  • Containerization: Docker, Docker Compose
  • Orchestration: Kubernetes
  • Monitoring: Prometheus, Grafana
  • CI/CD: GitHub Actions
  • UI Library: Tailwind CSS + Shadcn/ui
  • State Management: Zustand / Redux Toolkit

DevOps

  • Containerization: Docker + Docker Compose
  • Orchestration: Kubernetes (optional)
  • Monitoring: Prometheus + Grafana
  • CI/CD: GitHub Actions

πŸ“ Proje YapΔ±sΔ±

ai-service/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ agents/          # Agent yΓΆnetimi
β”‚   β”‚   β”œβ”€β”€ llm_providers/   # LLM entegrasyonlarΔ±
β”‚   β”‚   β”œβ”€β”€ memory/          # HafΔ±za sistemleri
β”‚   β”‚   β”œβ”€β”€ collaboration/   # Agent işbirliği
β”‚   β”‚   β”œβ”€β”€ integrations/    # 3. parti entegrasyonlar
β”‚   β”‚   β”œβ”€β”€ security/        # GΓΌvenlik ve auth
β”‚   β”‚   └── tests/           # Test dosyalarΔ±
β”‚   β”œβ”€β”€ requirements.txt
β”‚   └── Dockerfile
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/      # React bileşenleri
β”‚   β”‚   β”œβ”€β”€ pages/           # Sayfa bileşenleri
β”‚   β”‚   β”œβ”€β”€ hooks/           # Custom hooks
β”‚   β”‚   β”œβ”€β”€ services/        # API servisleri
β”‚   β”‚   └── utils/           # YardΔ±mcΔ± fonksiyonlar
β”‚   β”œβ”€β”€ package.json
β”‚   └── Dockerfile
β”œβ”€β”€ docs/                    # DokΓΌmantasyon
β”œβ”€β”€ scripts/                 # Deployment scriptleri
β”œβ”€β”€ docker-compose.yml
└── README.md

πŸ“‹ Project Status: 45% COMPLETE ⏳

βœ… Completed Features

1. LLM Provider Integrations

  • βœ… OpenAI API integration (GPT-4, GPT-4o, GPT-4 Turbo)
  • βœ… Anthropic Claude integration (Claude 4, Claude 3.5 Sonnet, Haiku)
  • βœ… Ollama local LLM support (Llama 3.3, DeepSeek R1, Qwen, etc.)
  • βœ… Unified LLM provider abstraction layer
  • ❌ Dynamic model switching and load balancing
  • ❌ Failover and retry mechanisms

2. Agentic Architecture

  • βœ… LangGraph-based agent framework
  • βœ… Agent lifecycle management (create, start, stop, remove)
  • βœ… Role-based agent capabilities (7 different roles)
  • βœ… Task queue and workflow engine
  • βœ… Agent state management
  • ❌ Capability registry system

3. AI Learning Memory System

  • βœ… Vector database integration (FAISS, ChromaDB)
  • βœ… Episodic memory (agent experiences)
  • βœ… Semantic memory (knowledge and concepts)
  • βœ… Working memory management (short-term context)
  • βœ… RAG (Retrieval Augmented Generation)
  • βœ… Self-learning algorithms
  • βœ… Knowledge graph structure

4. Multi-Agent Collaboration

  • βœ… A2A (Agent2Agent) protocol implementation
  • βœ… Agent discovery and registry
  • βœ… Message passing system
  • βœ… Collaboration patterns
  • βœ… Conflict resolution
  • βœ… Multi-agent orchestration
  • ❌ Group messaging and broadcast

5. Third-Party Integrations

  • βœ… RESTful API gateway
  • βœ… Webhook system (incoming/outgoing)
  • βœ… Database connectors (PostgreSQL, MongoDB, MySQL, SQLite)
  • βœ… Cloud services integration (AWS, Azure, GCP)
  • βœ… Third-party API adapters (Slack, Discord, Twitter, Email, etc.)
  • βœ… Plugin architecture (extensible plugin system)

6. Security & Authentication

  • βœ… JWT authentication
  • βœ… Role-based access control (RBAC)
  • βœ… API key management
  • βœ… User management system
  • βœ… Encryption and security protocols
  • βœ… Audit logging
  • ❌ Rate limiting and throttling

7. Testing & Quality Assurance

  • βœ… Comprehensive unit tests
  • βœ… Integration testing
  • βœ… Performance testing
  • βœ… Security testing
  • βœ… 80%+ test coverage
  • ❌ Automated testing pipeline

8. Production Deployment

  • βœ… Docker containerization
  • βœ… Kubernetes manifests
  • βœ… CI/CD pipeline (GitHub Actions)
  • βœ… Monitoring (Prometheus, Grafana)
  • βœ… Health checks
  • βœ… Auto-scaling (HPA)
  • ❌ Setup and deployment scripts

πŸš€ Quick Start

Prerequisites

  • Python 3.9+
  • Docker & Docker Compose (recommended)
  • Redis (automatically installed with Docker)
  • Git

Automated Setup

  1. Clone the repository
git clone https://github.com/your-username/ai-service.git
cd ai-service
  1. Run the automated setup script
# Automatically sets up the entire system
./scripts/setup.sh

# After setup, add your API keys
nano backend/.env
  1. Start the service
# Development environment
./scripts/deploy.sh dev

# Production environment
./scripts/deploy.sh prod

# Kubernetes deployment
./scripts/deploy.sh k8s

Manual Setup (Optional)

  1. Create Python virtual environment
cd backend
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt
  1. Configure environment file
cp .env.example .env
# Add your API keys to the .env file
  1. Start with Docker Compose
docker-compose up -d

πŸ“š API Documentation

Once the service is running, visit:

  • Swagger UI: http://localhost:8000/docs
  • ReDoc: http://localhost:8000/redoc

Key Endpoints

Agents

  • POST /api/v1/agents/create - Create new agent
  • GET /api/v1/agents/ - List all agents
  • POST /api/v1/agents/tasks/submit - Submit task

Memory

  • POST /api/v1/memory/experiences - Store experience
  • POST /api/v1/memory/knowledge - Store knowledge
  • POST /api/v1/memory/ask - Ask question with RAG

LLM

  • POST /api/v1/llm/generate - Generate text
  • POST /api/v1/llm/generate/stream - Stream generation
  • GET /api/v1/models/ - List available models

Collaboration

  • POST /api/v1/collaboration/messages/send - Send message
  • POST /api/v1/collaboration/registry/register - Register agent

πŸ§ͺ Testing

# Run all tests
./backend/scripts/run_tests.py

# Run specific test categories
./backend/scripts/run_tests.py --unit
./backend/scripts/run_tests.py --integration
./backend/scripts/run_tests.py --performance

# Run with coverage
./backend/scripts/run_tests.py --coverage

οΏ½ Project Structure

ai-service/
β”œβ”€β”€ backend/                    # Backend API service
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ agents/            # Agent system
β”‚   β”‚   β”œβ”€β”€ llm_providers/     # LLM integrations
β”‚   β”‚   β”œβ”€β”€ memory/            # Memory systems
β”‚   β”‚   β”œβ”€β”€ collaboration/     # Agent collaboration
β”‚   β”‚   β”œβ”€β”€ integrations/      # Third-party integrations
β”‚   β”‚   β”œβ”€β”€ plugins/           # Plugin system
β”‚   β”‚   β”œβ”€β”€ security/          # Security & auth
β”‚   β”‚   β”œβ”€β”€ api/               # API endpoints
β”‚   β”‚   └── core/              # Core utilities
β”‚   β”œβ”€β”€ tests/                 # Test suite
β”‚   └── scripts/               # Utility scripts
β”œβ”€β”€ k8s/                       # Kubernetes manifests
β”œβ”€β”€ scripts/                   # Setup & deployment scripts
β”œβ”€β”€ docker-compose.yml         # Docker Compose config
β”œβ”€β”€ Dockerfile                 # Docker build config
└── README.md                  # This file

πŸ”§ Configuration

Environment Variables

Create a .env file in the backend/ directory:

# Environment
ENVIRONMENT=development
DEBUG=true
LOG_LEVEL=INFO

# Database
REDIS_URL=redis://localhost:6379/0
VECTOR_DB_TYPE=faiss
VECTOR_DB_PATH=./data/vector_db

# Security
JWT_SECRET_KEY=your-secret-key-change-in-production

# LLM Provider API Keys
OPENAI_API_KEY=your_openai_api_key
ANTHROPIC_API_KEY=your_anthropic_api_key

# Optional: Database connections
DATABASE_URL=postgresql://user:password@localhost:5432/ai_service
MONGODB_URL=mongodb://localhost:27017/ai_service

πŸš€ Deployment

Docker Compose (Recommended for Development)

docker-compose up -d

Kubernetes (Production)

kubectl apply -f k8s/

Manual Deployment

# Setup
./scripts/setup.sh

# Deploy
./scripts/deploy.sh prod

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ“ž Support

οΏ½ Acknowledgments

  • OpenAI for GPT models
  • Anthropic for Claude models
  • Ollama for local LLM support
  • LangChain and LangGraph communities
  • All contributors and the open-source community
banner-shape-1
banner-shape-1
object-3d-1
object-3d-2