AIECS - AI Execute Services
Welcome to AIECS (AI Execute Services), a powerful Python middleware framework for building AI-powered applications with tool orchestration, task execution, and multi-provider LLM support.
Features
Multi-Provider LLM Support: Seamlessly integrate with OpenAI, Google Vertex AI, and xAI
Tool Orchestration: Extensible tool system for various tasks (web scraping, data analysis, document processing, etc.)
Asynchronous Task Execution: Built on Celery for scalable task processing
Real-time Communication: WebSocket support for live updates and progress tracking
Enterprise-Ready: Production-grade architecture with PostgreSQL, Redis, and Google Cloud Storage integration
Extensible Architecture: Easy to add custom tools and AI providers
Quick Start
Installation
Install AIECS from PyPI:
pip install aiecs
Or install with documentation dependencies:
pip install aiecs[docs]
Basic Usage
from aiecs import AIECSClient
# Initialize the client
client = AIECSClient()
# Execute a task
result = await client.execute_task(
task_type="text_generation",
parameters={"prompt": "Hello, world!"}
)
Documentation Contents
Getting Started
Domain Agent
- Agent Domain Documentation
- 📚 Documentation Files
- 1. AGENT_INTEGRATION.md - Complete Integration Guide 📋
- 2. MIGRATION_GUIDE.md - Migration Instructions 🔄
- 2a. MIGRATION_CHECKLIST.md - Migration Checklist ✅
- 2b. UPGRADE_GUIDE.md - Upgrade Guide with Examples 📖
- 2c. FAQ.md - Frequently Asked Questions ❓
- 2d. BREAKING_CHANGES_ANALYSIS.md - Breaking Changes Analysis 🔍
- 3. EXAMPLES.md - Code Examples 💻
- 4. CONTEXTENGINE_INTEGRATION.md - ContextEngine Patterns 🔗
- 5. SESSION_MANAGEMENT.md - Session Management 📊
- 6. PERFORMANCE_MONITORING.md - Performance & Health 📈
- 7. SERIALIZATION.md - Serialization Best Practices 💾
- 8. COMPRESSION_GUIDE.md - Compression Strategies 🗜️
- 9. PARALLEL_TOOL_EXECUTION.md - Parallel Execution ⚡
- 10. TOOL_CACHING.md - Tool Result Caching 💾
- 11. STREAMING.md - Streaming Responses 📡
- 12. COLLABORATION.md - Multi-Agent Collaboration 🤝
- 13. LEARNING.md - Agent Learning & Adaptation 🧠
- 14. RESOURCE_MANAGEMENT.md - Resource Management ⚙️
- 15. ERROR_RECOVERY.md - Error Recovery 🔄
- 16. PERFORMANCE_OPTIMIZATION.md - Performance Optimization ⚡
- 17. MULTI_AGENT_DESIGN.md - Multi-Agent System Design 🏗️
- 18. TOOL_OBSERVATION.md - ToolObservation Pattern 📊
- 19. MASTERCONTROLLER_MIGRATION.md - MasterController Migration 🔀
- 20. OBSERVATION_REASONING.md - Observation-Based Reasoning 🔍
- 21. API_REFERENCE.md - Complete API Reference 📚
- 🚀 Quick Start
- 📖 Related Documentation
- 🎯 Key Features
- 📝 Documentation Status
- 🤝 Contributing
- 📚 Documentation Files
- Agent Integration Guide
- Agent Domain API Reference
- Table of Contents
- BaseAIAgent
- Lifecycle Methods
- State Management
- Task Execution
- Tool Execution
- Streaming
- Memory Management
- Goals Management
- Configuration Management
- Capabilities
- Metrics and Performance
- Serialization
- Checkpointing
- Agent Collaboration
- Learning and Adaptation
- Resource Management
- Error Recovery
- Context Management
- Utility Methods
- Concrete Agent Types
- ConversationMemory and Session
- ContextEngine
- Models and Configuration
- Protocols
- ToolObservation
- Enhanced Methods
- Performance Enhancement APIs
- Reliability Enhancement APIs
- Observability Enhancement APIs
- Example Implementations: Common Patterns
- FAQ: Enhanced Hybrid Agent Flexibility
- Multi-Agent Collaboration Patterns
- ContextEngine Compression Strategies
- ContextEngine Integration Patterns
- Error Recovery Strategies
- Agent Learning and Adaptation
- Observation-Based Reasoning Loops
- Parallel Tool Execution Patterns
- Performance Monitoring and Health Status
- Performance Optimization Guide
- Resource Management Configuration
- Serialization Best Practices
- Session Management Best Practices
- Streaming Response Usage
- Tool Result Caching Best Practices
- ToolObservation Pattern Usage
Knowledge Graph
- AIECS Knowledge Graph
- AIECS Knowledge Graph User Guide
- Knowledge Graph API Reference
- Knowledge Graph Configuration Guide
- Knowledge Graph Configuration Guide
- Knowledge Graph Performance Guide
- Runnable Pattern Guide
- Schema Mapping Configuration Guide
- StructuredDataPipeline Usage Guide
- Knowledge Graph Troubleshooting Guide
- End-to-End Knowledge Graph Tutorial
- Overview
- Scenario
- Prerequisites
- Step 1: Prepare Your Data
- Step 2: Initialize the System
- Step 3: Import CSV Data
- Step 4: Import JSON Data
- Step 5: Add Unstructured Text
- Step 6: Merge Duplicate Entities
- Step 7: Search with Reranking
- Step 8: Parse Logical Queries
- Step 9: Get Statistics
- Step 10: Cleanup
- Complete Example
- Next Steps
- Performance Tips
- Multi-Hop Reasoning Tutorial
- Overview
- Learning Objectives
- What is Multi-Hop Reasoning?
- Scenario: Corporate Knowledge Graph
- Step 1: Build the Knowledge Graph
- Step 2: Simple Path Finding (2-Hop)
- Step 3: Multi-Hop Question Answering
- Step 4: Evidence-Based Reasoning
- Step 5: Complete Example
- Key Concepts
- Best Practices
- Performance Tips
- Next Steps
- Resources
- Building a Domain-Specific Knowledge Graph Tutorial
- Overview
- Learning Objectives
- Scenario: Medical Knowledge Graph
- Step 1: Define Your Domain Schema
- Step 3: Create Custom Relation Extractor
- Step 4: Build the Knowledge Graph
- Step 5: Query Your Domain Knowledge
- Step 6: Add Domain-Specific Inference Rules
- Step 7: Complete Example
- Key Takeaways
- Next Steps
- Resources
- Knowledge Graph Visualization Examples
- JSON-to-Graph Tutorial
- CSV-to-Graph Tutorial
- Knowledge Graph Builder Tool
- Graph Reasoning Tool
- Graph Search Tool Documentation
- Agent Integration with Knowledge Graph
- Knowledge Retrieval Usage Examples
- Knowledge Retrieval Configuration Guide
- Knowledge Retrieval Metrics and Monitoring
- Knowledge Graph Reasoning Engine
- Type Enum Usage Guide
- Query Optimization Guide
- Schema Caching Guide
- Reranking Strategies Guide
- ResultReranker API Documentation
- Logic Query Parser Documentation
- Logic Query DSL Grammar Documentation
- Overview
- Grammar Structure
- Complete Examples
- Example 1: Simple Entity Lookup
- Example 2: Entity with Name
- Example 3: Filter by Property
- Example 4: Multiple Filters with AND
- Example 5: Multiple Filters with OR
- Example 6: Complex Boolean Logic
- Example 7: NOT Operator
- Example 8: IN Operator
- Example 9: CONTAINS Operator
- Example 10: Single-Hop Traversal
- Example 11: Multi-Hop Traversal
- Example 12: Traversal with Direction
- Example 13: Traversal with Filter
- Example 14: Nested Properties
- Example 15: Complex Query
- Grammar Validation
- Operator Precedence Table
- Reserved Keywords
- Terminal Symbols
- Future Extensions
- References
- Knowledge Graph Search Strategies
- Production Deployment Guide for Knowledge Graph
- Security Review and Validation for Knowledge Graph
- Backend Configuration Guide
- Graph Storage Performance Guide
Tools and Configuration
- Document Parser Tool Configuration Guide
- Document Writer Tool Configuration Guide
- Overview
- Using .env Files in Your Project
- Configuration Options
- 1. Temp Directory
- 2. Backup Directory
- 3. Output Directory
- 4. Max File Size
- 5. Max Backup Versions
- 6. Default Encoding
- 7. Enable Backup
- 8. Enable Versioning
- 9. Enable Content Validation
- 10. Enable Security Scan
- 11. Atomic Write
- 12. Validation Level
- 13. Timeout Seconds
- 14. Auto Backup
- 15. Atomic Writes
- 16. Default Format
- 17. Version Control
- 18. Security Scan
- 19. Enable Cloud Storage
- 20. GCS Bucket Name
- 21. GCS Project ID
- Usage Examples
- Configuration Priority
- Data Type Parsing
- Validation
- Document Formats
- Write Modes
- Edit Operations
- Encoding Types
- Validation Levels
- Cloud Storage
- Operations Supported
- Troubleshooting
- Best Practices
- Dependencies
- Related Documentation
- Support
- Tool Configuration Best Practices
- AI Document Writer Orchestrator Configuration Guide
- AI Document Orchestrator Configuration Guide
- AI Data Analysis Orchestrator Configuration Guide
- APISource Tool - Configuration Reference
- Table of Contents
- 1. Configuration Overview
- 2. Configuration Parameters
- 3. API Credentials
- 3.1 FRED API Key
- 3.2 News API Key
- 3.3 The Guardian API Key
- 3.4 Census Bureau API Key
- 3.4 Congress.gov API
- 3.5 OpenStates API
- 3.6 World Bank API
- 3.7 Alpha Vantage API Key
- 3.8 REST Countries API
- 3.9 ExchangeRate-API
- 3.10 Open Library API
- 3.11 Metropolitan Museum of Art (The Met) API
- 3.12 CoinGecko API
- 3.12 OpenWeatherMap API
- 3.13 Wikipedia API
- 3.14 GitHub API
- 3.13 arXiv API
- 3.14 PubMed/NCBI E-utilities API
- 3.15 CrossRef API
- 3.16 Semantic Scholar API
- 3.17 CORE API Key
- 3.18 USPTO API Key
- 3.19 SEC EDGAR API
- 3.20 Stack Exchange API
- 3.21 OpenCorporates API
- 3.22 CourtListener (Free Law Project) API
- 3.23 GBIF (Global Biodiversity Information Facility) API
- 4. Performance Settings
- 5. Feature Flags
- 6. Provider-Specific Configuration
- 6.1 FRED Provider
- 6.2 World Bank Provider
- 6.3 News API Provider
- 6.4 The Guardian Provider
- 6.5 Census Provider
- 6.5 Congress Provider
- 6.6 OpenStates Provider
- 6.7 Alpha Vantage Provider
- 6.6 REST Countries Provider
- 6.7 ExchangeRate Provider
- 6.8 Open Library Provider
- 6.9 Metropolitan Museum of Art (The Met) Provider
- 6.10 CoinGecko Provider
- 6.10 OpenWeatherMap Provider
- 6.11 Wikipedia Provider
- 6.12 GitHub Provider
- 6.13 arXiv Provider
- 6.14 PubMed Provider
- 6.15 CrossRef Provider
- 6.16 Semantic Scholar Provider
- 6.17 CORE Provider
- 6.18 USPTO Provider
- 6.19 SEC EDGAR Provider
- 6.20 Stack Exchange Provider
- 6.21 Hacker News Provider
- 6.22 OpenCorporates Provider
- 6.23 GDELT Project Provider
- 6.24 DuckDuckGo Zero-Click Info Provider
- 7. Environment Variables
- 8. Configuration Examples
- 9. Validation and Testing
- APISource Tool - Developer Guide
- APISource Tool - Complete Technical Documentation
- Search Tool - Configuration Reference
- Search Tool - Developer’s Guide
- Search Tool - Complete Technical Documentation
- Statistical Analyzer Tool Configuration Guide
- Model Trainer Tool Configuration Guide
- Data Visualizer Tool Configuration Guide
- Data Transformer Tool Configuration Guide
- Data Profiler Tool Configuration Guide
- Data Loader Tool Configuration Guide
- AI Report Orchestrator Tool Configuration Guide
- AI Insight Generator Tool Configuration Guide
- Document Creator Tool Configuration Guide
- Report Tool Configuration Guide
- Chart Tool Configuration Guide
- ChartTool LangChain Agent Usage Guide
- Classifier Tool Configuration Guide
- Content Insertion Tool Configuration Guide
- Document Layout Tool Configuration Guide
- Image Tool Configuration Guide
- Office Tool Configuration Guide
- Pandas Tool Configuration Guide
- Research Tool Configuration Guide
- Scraper Tool Configuration Guide
- Overview
- Using .env Files in Your Project
- Configuration Options
- Usage Examples
- Configuration Priority
- Data Type Parsing
- Validation
- Operations Supported
- Troubleshooting
- Issue: SSL certificate errors
- Issue: Playwright not available
- Issue: Scrapy command not found
- Issue: Content too large
- Issue: Domain not allowed
- Issue: Rate limiting
- Issue: Timeout errors
- Issue: List parsing error
- Issue: Output directory not writable
- Issue: Stealth mode not working
- Issue: Bot detection still occurring with stealth mode
- Best Practices
- Installation Requirements
- Related Documentation
- Support
- Stats Tool Configuration Guide
- AIECS Statistics and Data Analysis Tools
- AIECS Document Creation System Architecture
- AIECS Document Creation System - Quick Reference
- Document Writer Tool - Modern High-Performance Document Writing Component
- Document Parser Tool - Modern High-Performance Document Parsing Component
- Overview
- 🏗️ New Directory Structure
- Core Features
- Architecture Design
- Usage Methods
- Configuration Options
- Supported Document Formats
- Cloud Storage Support
- AI Processing Modes
- Performance Optimization
- Error Handling
- Migration Guide
- Extension Development
- Best Practices
- Out-of-the-Box Check
- Quick Start
- Example Code
- Future Plans
- Document Parser Tool - Quick Start Guide
- Tools Architecture
- Directory Structure
- New Architecture
- Tool Categories
- Using Base Tool Class
- Using Decorators for Performance Optimization
- Migrating Existing Tools
- Benefits of the New Architecture
- Usage Examples
- Multi-Task Service Integration
- Task Tool Usage Examples
- Tool Discovery and Registration
- Best Practices
- Extending the Tool System
- Special Tool Usage Instructions
- Scraper Tool (Web Scraping Tool)
- Tool Executor TTL Strategies Guide
- Tool Naming Convention
- Tool Executor Technical Documentation
- Temporary File Manager Technical Documentation
- LangChain Adapter Technical Documentation
- Base Tool Class Technical Documentation
- Schema Auto-Generator Technical Documentation
LLM Integration
- LLM Model Configuration Management
- Custom LLM Client Integration
- BaseLLMClient Technical Documentation
- LLM AI Clients Technical Documentation
- LLM Custom Callback Handlers Technical Documentation
Domain Modules
- DOMAIN_COMMUNITY
- DOMAIN_COMMUNITY Documentation Index
- Usage Guide
- API Reference
- Examples
- Architecture
- Documentation Addendum
- Community Analytics
- Conversation Models Technical Documentation
- ContextEngine Technical Documentation
- Execution Models Technical Documentation
- Task Models Technical Documentation
- 1. Overview
- 2. Problem Background and Design Motivation
- 3. Architecture Positioning and Context
- 4. Core Features and Use Cases
- 5. API Reference
- 6. Technical Implementation Details
- 7. Configuration and Deployment
- 8. Maintenance and Troubleshooting
- 9. Visualizations
- 10. Version History
- Related Documentation
- Task Context Technical Documentation
- 1. Overview
- 2. Problem Background and Design Motivation
- 3. Architecture Positioning and Context
- 4. Core Features and Use Cases
- 5. API Reference
- 6. Technical Implementation Details
- 7. Configuration and Deployment
- 8. Maintenance and Troubleshooting
- 9. Visualizations
- 10. Version History
- Related Documentation
- DSL Processor Technical Documentation
- Celery Task Worker Technical Documentation
Infrastructure
- WebSocketManager Technical Documentation
- CeleryTaskManager Technical Documentation
- TracingManager Technical Documentation
- ExecutorMetrics Technical Documentation
- Global Metrics Manager Technical Documentation
- DatabaseManager Technical Documentation
- FileStorage Technical Documentation
- RedisClient Technical Documentation
Core and Application
- Storage Interfaces Technical Documentation
- Overview
- Component Type and Positioning
- Upstream Components (Consumers)
- Downstream Components (Dependencies)
- Core Interfaces Explained
- 1. ISessionStorage - Session Storage Interface
- 2. IConversationStorage - Conversation Storage Interface
- 3. ICheckpointStorage - Checkpoint Storage Interface
- 4. ITaskContextStorage - Task Context Storage Interface
- 5. IStorageBackend - Unified Storage Backend Interface
- 6. ICheckpointerBackend - Checkpoint Backend Interface
- Design Patterns Explained
- Interface Implementation Standards
- Usage Examples
- Maintenance Guide
- Monitoring and Logging
- Version History
- Related Documentation
- Execution Interfaces Technical Documentation
- Overview
- Component Type and Positioning
- Upstream Components (Consumers)
- Downstream Components (Dependencies)
- Core Interfaces Explained
- Design Patterns Explained
- Interface Implementation Standards
- Usage Examples
- Maintenance Guide
- Performance Optimization
- Monitoring and Logging
- Version History
- Related Documentation
- Service Registry Technical Documentation
- Configuration Management System Technical Documentation
- OperationExecutor Component Technical Documentation
- Overview
- Component Type & Positioning
- Upstream Components (Callers)
- Downstream Components (Dependencies)
- Key Domain Models
- Core Features
- Technical Features
- API Interface
- Configuration Management
- Error Handling
- Performance Optimization
- Monitoring & Logging
- Maintenance Guide
- Dependency Diagram
- Software Function Scenarios
- 1. Data Analysis & Processing Pipeline
- 2. Document Processing & Content Extraction
- 3. Real-time Data Processing & Monitoring
- 4. Intelligent Content Generation & Optimization
- 5. Batch File Processing & Conversion
- 6. Multimodal Data Processing
- 7. Workflow Automation & Orchestration
- 8. Real-time Collaboration & Sharing
- Real-world Use Cases
- Usage Examples
- Version History
- Related Documentation
- LLM Output Structor Technical Documentation
- Prompt Loader Technical Documentation
- Token Usage Repository Technical Documentation
- Execution Utils Technical Documentation
- Base Callback Handler Technical Documentation
API Reference
Development