Skip to main content

Cosmos Compiler - AI Agent Workflow DSL with DAG support, E401 fail-fast, LSP, and EXPORT schema

Project description

SOLVENS CORE

AI Operating System - Modular kernel for intelligent agents

Version Python License


Overview

SOLVENS CORE is not an application—it's the AI Operating System kernel that powers all applications in the Solvens ecosystem.

Built from the ground up with modularity, extensibility, and reliability in mind, SOLVENS CORE provides:

  • Agent Orchestration: Coordinate multiple AI agents with task queuing, priorities, and parallel execution
  • Capability Routing: Intelligently route tasks to optimal providers based on content analysis
  • Multi-Provider Support: Seamlessly work with OpenAI, Claude, Gemini, Ollama, and more
  • Plugin Architecture: Extend functionality without modifying core code
  • Event-Driven: Loose coupling through asynchronous event handling

Architecture

                     ┌─────────────────┐
                     │   SOLVENS CORE  │
                     └────────┬────────┘
                              │
                     ┌────────▼────────┐
                     │   Agent         │
                     │   Orchestrator  │
                     └────────┬────────┘
                              │
        ┌─────────────────────┼─────────────────────┐
        │                     │                     │
        ▼                     ▼                     ▼
    ┌────────┐           ┌────────┐           ┌────────┐
    │Planner │           │Scheduler│           │Memory  │
    └────────┘           └────────┘           └────────┘
                              │
                     ┌────────▼────────┐
                     │  Capability    │
                     │  Router        │
                     └────────┬────────┘
                              │
        ┌─────────────────────┼─────────────────────┐
        │                     │                     │
        ▼                     ▼                     ▼
    ┌────────┐           ┌────────┐           ┌────────┐
    │ Local  │           │ Cloud  │           │Plugins  │
    │Models  │           │Providers│          │Registry │
    └────────┘           └────────┘           └────────┘

Features

🎯 Agent Orchestrator

  • Task queuing with priorities
  • Parallel and sequential execution
  • Automatic retries with exponential backoff
  • Task cancellation
  • Event hooks for monitoring

🧭 Capability Router

  • Content-based intelligent routing
  • Rule-based provider selection
  • Cost optimization
  • Provider fallback

🔌 Plugin System

  • Zero core modification for extensions
  • Hot reload capability
  • Sandboxed execution
  • Dynamic provider loading

💾 Memory Layer

  • Pluggable storage backends (SQLite, Redis, Vector DB)
  • Semantic and episodic memory
  • Context management

🔒 Security

  • API keys via environment variables only
  • No storage of secrets
  • Docker Secrets support

Supported Providers

Provider Type Status
OpenAI (GPT) Cloud ✅ Planned
Anthropic (Claude) Cloud ✅ Planned
Google (Gemini) Cloud ✅ Planned
Ollama Local ✅ Planned
DeepSeek Cloud ✅ Planned
Grok Cloud ✅ Planned
Sakana Cloud ✅ Planned
Pollo AI Cloud ✅ Planned

Installation

# Clone the repository
git clone https://github.com/SolvensAmoris/solvens-core.git
cd solvens-core

# Install with uv (recommended)
uv sync

# Or with pip
pip install -e .

Quick Start

from solvens import AgentOrchestrator, Message

# Initialize orchestrator
orchestrator = AgentOrchestrator()

async def main():
    await orchestrator.initialize()
    
    # Submit a task
    task_id = await orchestrator.submit_task(
        description="Generate Python code",
        callback=lambda: "def hello(): return 'world'",
        priority="high",
    )
    
    # Wait for completion
    task = orchestrator.get_task(task_id)
    print(task.result)

if __name__ == "__main__":
    import asyncio
    asyncio.run(main())

Development

Setup

# Install development dependencies
uv sync --extra dev

# Run tests
uv run pytest

# Format code
uv run ruff format .

# Lint
uv run ruff check .

Project Structure

solvens-core/
├── solvens/                 # Main package
│   ├── core/               # Core abstractions
│   ├── agents/             # Agent system
│   ├── router/             # Capability routing
│   ├── providers/          # Provider adapters
│   ├── memory/             # Memory layer
│   ├── planner/           # Task planning
│   ├── scheduler/        # Task scheduling
│   ├── events/            # Event system
│   ├── api/               # REST API
│   └── cli/               # CLI interface
├── docs/                  # Documentation
├── tests/                 # Test suite
└── docker/                # Docker configuration

Documentation

Roadmap

  • Core abstractions (base classes, types, config)
  • Agent Orchestrator
  • Capability Router
  • Provider Interface & Adapters
  • Plugin System
  • Memory Layer
  • Task Planner
  • REST API
  • CLI Interface
  • Web Dashboard
  • Docker Support

Contributing

Contributions are welcome! Please read our contributing guidelines before submitting PRs.

License

MIT License - see LICENSE for details.


⚠️ IMPORTANT: About Cosmos

Cosmos is NOT:

  • Cosmos DB (Azure database)
  • Apache Cosmos
  • Any external technology

Cosmos IS: A proprietary computational representation language developed by Solvens Amoris based on AST, DAG, structural identity, canonicalization, and graph transformation.

⚠️ Before implementing Cosmos integration: Study the official Cosmos specification. Do NOT create a new Cosmos-like language. Use the existing implementation and contracts.


Author: Luis Alberto Burciaga Miker
Organization: Solvens Amoris
Repository: https://github.com/SolvensAmoris/solvens-core

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cosmos_compiler-0.4.5.tar.gz (508.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cosmos_compiler-0.4.5-py3-none-any.whl (191.0 kB view details)

Uploaded Python 3

File details

Details for the file cosmos_compiler-0.4.5.tar.gz.

File metadata

  • Download URL: cosmos_compiler-0.4.5.tar.gz
  • Upload date:
  • Size: 508.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for cosmos_compiler-0.4.5.tar.gz
Algorithm Hash digest
SHA256 2e7f3dc03e088d6eeef376159c500b0a2b6ebac0dccd5b18bc1ee4219f2c8532
MD5 627aeb00b55f62c993ac7028b30b85ee
BLAKE2b-256 a199c7eb7672d11953315797b17da8360850da449c669cf646bc0a1d2475d88d

See more details on using hashes here.

File details

Details for the file cosmos_compiler-0.4.5-py3-none-any.whl.

File metadata

  • Download URL: cosmos_compiler-0.4.5-py3-none-any.whl
  • Upload date:
  • Size: 191.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for cosmos_compiler-0.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9f0a50d928fb075949661ecf17ade90416a0847a1d85b820e02527022526a10c
MD5 e177a7a31fbe4c77ce7f66a57156b07b
BLAKE2b-256 281b594bca4e5a5f3698fa90521ccd58715073592cb1a4abdb1bcecfab575788

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page