Overview
Extract the ILETP orchestration logic from the current Swift macOS application into a protocol-agnostic headless server that exposes REST and/or WebSocket APIs. This enables the core multi-agent coordination, trust scoring, and consensus mechanisms to be accessed by any client (web browsers, mobile apps, CLI tools, IDE extensions) while maintaining clean separation between backend logic and frontend presentation.
Status: Foundation / Core Infrastructure
Priority: High (enables all other implementation variants)
Blocks: Issue #2 (MCP variant), future protocol-specific implementations
Important Note: This issue is provided for community members who fork the repository and wish to build implementations. Any work completed here will not be merged back into this repository—it's intended for independent forks and derivative projects. That said, if you build something based on this issue, please let me know! I'd love to see what the community creates and may link to notable implementations.
Context
The current Swift application contains valuable ILETP orchestration logic (multi-model coordination, trust protocols, consensus mechanisms) tightly coupled to a macOS UI. This coupling limits:
- Platform reach - macOS only, not accessible from web/mobile/Linux
- Integration potential - Other apps can't embed ILETP functionality
- UI experimentation - Changing UI requires touching orchestration code
- Language flexibility - Locked into Swift/macOS ecosystem
- Scalability - Can't distribute backend processing independently
A headless server architecture solves these limitations by creating a clean API boundary between ILETP's "brain" (orchestration, trust, consensus) and its "face" (any UI client).
Goals
- API-First Design - Create well-defined REST and/or WebSocket endpoints for all ILETP core functions
- Frontend Independence - Enable any client technology (React, Vue, SwiftUI, CLI, etc.) to use ILETP
- Embeddability - Allow other applications to integrate ILETP via HTTP/WebSocket calls
- Protocol Agnostic - Foundation that supports multiple communication protocols (REST, GraphQL, MCP, gRPC, etc.)
- Reference Implementation - Demonstrate how ILETP specifications translate into working server code
Technical Requirements
Core Server Infrastructure
ILETP Core Functionality (Backend)
LLM Provider Integration
State Management
Security & Authentication
Developer Experience
Acceptance Criteria
Minimum Viable Server (MVP)
Quality Standards
Validation
Open Questions
These should be explored during implementation and documented:
Architecture Decisions
-
Language/Framework: Which technology stack provides best balance of:
- Developer familiarity in open-source community
- Performance for concurrent LLM API calls
- Library ecosystem for LLM integrations
- Deployment simplicity
-
API Style: REST-only, WebSocket-only, or hybrid?
- REST for request/response operations
- WebSocket for streaming/real-time updates
- Server-Sent Events (SSE) as alternative to WebSockets?
-
State Management: Stateless or stateful sessions?
- What are the actual scaling implications?
- Can we support both modes?
- How does this affect deployment complexity?
-
Database: Which storage backend for sessions/history?
- SQL (PostgreSQL, MySQL) for structured data
- NoSQL (MongoDB) for flexible schemas
- Redis for high-performance caching
- SQLite for simplicity in single-instance deployments
Implementation Strategy
-
Migration from Swift: Should we:
- Port Swift logic directly to new language
- Rewrite from scratch following ILETP specs
- Use Swift code as reference but optimize for server use case
-
Concurrency Model: How to handle concurrent LLM calls?
- Async/await patterns
- Thread pools
- Message queues
- What are the performance implications?
-
Provider Abstraction: How generic should LLM provider interface be?
- Support only major providers initially (Anthropic, OpenAI, Google)
- Design for easy plugin of new providers
- Handle provider-specific features (function calling, vision, etc.)
Deployment & Operations
-
Containerization: Should we provide:
- Docker image with all dependencies
- Docker Compose for multi-container setup (server + database)
- Kubernetes manifests for cloud deployment
-
Horizontal Scaling: How to design for multiple server instances?
- Stateless design for easy load balancing
- Shared session store (Redis, database)
- Message queue for task distribution
-
Monitoring & Observability: What should be exposed?
- Request metrics (latency, throughput, errors)
- LLM provider metrics (calls, costs, failures)
- Trust score distributions
- Session statistics
Non-Goals (Out of Scope)
This Issue does NOT aim to:
- ❌ Build production-grade server ready for enterprise deployment (this is reference implementation)
- ❌ Implement all 10 ILETP specifications initially (start with core 3-4)
- ❌ Create polished frontend UI (simple demo client is sufficient)
- ❌ Support every LLM provider (start with 2-3 major ones)
- ❌ Optimize for extreme performance (focus on correctness first)
- ❌ Handle authentication/authorization beyond basic API keys
- ❌ Implement advanced features like multi-tenancy, billing, etc.
Success Metrics
We'll consider this Issue successful if:
- Working Server: API server runs and handles ILETP orchestration requests
- Clean API Design: Well-documented endpoints that make sense to external developers
- Provider Independence: Easy to add new LLM providers without changing core code
- Client Proof: At least one working client (web, CLI, or mobile) consuming the API
- Foundation Quality: Solid architecture that supports future enhancements (MCP, GraphQL, etc.)
- Documentation: Other developers can fork, deploy, and use the server
Success is not measured by completeness—it's measured by whether this creates a solid foundation for ILETP's ecosystem.
Suggested Implementation Phases
Phase 1: Minimal API Server (Week 1-2)
- Basic HTTP server with health check
- Single endpoint: orchestrate query across 2 models
- Return simple JSON response
- No session persistence yet
Phase 2: Core ILETP Functions (Week 3-4)
- Trust score calculation endpoint
- Session management endpoints
- Basic state persistence
- Error handling
Phase 3: Polish & Documentation (Week 5-6)
- OpenAPI specification
- Example client (simple web UI)
- Deployment guide
- Testing suite
Phase 4: Optional Enhancements
- Asynchronous task processing
- WebSocket support for streaming
- Additional LLM providers
- Performance optimization
Related Issues
Resources
ILETP Documentation
Technical References
Framework Options
Labels
enhancement architecture foundation help wanted good first issue documentation
Call for Contributions
Backend Developers: This is a great opportunity to:
- Design API architecture from scratch
- Work with cutting-edge LLM APIs
- Build foundation for ILETP ecosystem
- Influence protocol design decisions
New to ILETP? This Issue provides:
- Clear acceptance criteria
- Phased implementation plan
- Extensive documentation requirements
- Freedom to choose technology stack
Questions? Comment below or join discussions in community channels.
Maintainer Note: This headless server is the foundation for all protocol-specific implementations (MCP, GraphQL, gRPC, etc.). Quality and architecture matter more than speed of implementation. Take time to design the API thoughtfully—future variants will build on this foundation.
NOTE: Direction provided by me (Peter), documentation provided by Claude.
Overview
Extract the ILETP orchestration logic from the current Swift macOS application into a protocol-agnostic headless server that exposes REST and/or WebSocket APIs. This enables the core multi-agent coordination, trust scoring, and consensus mechanisms to be accessed by any client (web browsers, mobile apps, CLI tools, IDE extensions) while maintaining clean separation between backend logic and frontend presentation.
Status: Foundation / Core Infrastructure
Priority: High (enables all other implementation variants)
Blocks: Issue #2 (MCP variant), future protocol-specific implementations
Important Note: This issue is provided for community members who fork the repository and wish to build implementations. Any work completed here will not be merged back into this repository—it's intended for independent forks and derivative projects. That said, if you build something based on this issue, please let me know! I'd love to see what the community creates and may link to notable implementations.
Context
The current Swift application contains valuable ILETP orchestration logic (multi-model coordination, trust protocols, consensus mechanisms) tightly coupled to a macOS UI. This coupling limits:
A headless server architecture solves these limitations by creating a clean API boundary between ILETP's "brain" (orchestration, trust, consensus) and its "face" (any UI client).
Goals
Technical Requirements
Core Server Infrastructure
Server Framework Selection
API Design
/v1/...) for future compatibilityILETP Core Functionality (Backend)
Orchestration Engine (Spec 1)
POST /v1/orchestrate- Route query to multiple modelsGET /v1/orchestrate/{job_id}- Check orchestration statusGET /v1/orchestrate/{job_id}/results- Retrieve resultsTrust & Consensus Protocol (Spec 2)
POST /v1/consensus- Calculate trust scores from model responsesGET /v1/trust-score/{query_id}- Retrieve trust analysisDynamic Agent Orchestration (Spec 7)
Session & Conversation Management (Spec 4, 5, 6)
POST /v1/sessions- Create new conversation sessionGET /v1/sessions/{session_id}- Retrieve session statePOST /v1/sessions/{session_id}/messages- Add message to sessionGET /v1/sessions/{session_id}/history- Get conversation historyDELETE /v1/sessions/{session_id}- End sessionAsynchronous Task Handling (Spec 5)
POST /v1/tasks- Submit long-running taskGET /v1/tasks/{task_id}- Check task statusGET /v1/tasks/{task_id}/result- Retrieve completed resultLLM Provider Integration
API Client Abstraction
Configuration Management
State Management
Session Storage
Stateless vs Stateful Decision
Security & Authentication
API Security
LLM API Key Protection
Developer Experience
Documentation
Testing
Development Tools
Acceptance Criteria
Minimum Viable Server (MVP)
GET /health)Quality Standards
Validation
Open Questions
These should be explored during implementation and documented:
Architecture Decisions
Language/Framework: Which technology stack provides best balance of:
API Style: REST-only, WebSocket-only, or hybrid?
State Management: Stateless or stateful sessions?
Database: Which storage backend for sessions/history?
Implementation Strategy
Migration from Swift: Should we:
Concurrency Model: How to handle concurrent LLM calls?
Provider Abstraction: How generic should LLM provider interface be?
Deployment & Operations
Containerization: Should we provide:
Horizontal Scaling: How to design for multiple server instances?
Monitoring & Observability: What should be exposed?
Non-Goals (Out of Scope)
This Issue does NOT aim to:
Success Metrics
We'll consider this Issue successful if:
Success is not measured by completeness—it's measured by whether this creates a solid foundation for ILETP's ecosystem.
Suggested Implementation Phases
Phase 1: Minimal API Server (Week 1-2)
Phase 2: Core ILETP Functions (Week 3-4)
Phase 3: Polish & Documentation (Week 5-6)
Phase 4: Optional Enhancements
Related Issues
Resources
ILETP Documentation
Technical References
Framework Options
Labels
enhancementarchitecturefoundationhelp wantedgood first issuedocumentationCall for Contributions
Backend Developers: This is a great opportunity to:
New to ILETP? This Issue provides:
Questions? Comment below or join discussions in community channels.
Maintainer Note: This headless server is the foundation for all protocol-specific implementations (MCP, GraphQL, gRPC, etc.). Quality and architecture matter more than speed of implementation. Take time to design the API thoughtfully—future variants will build on this foundation.
NOTE: Direction provided by me (Peter), documentation provided by Claude.