Metadata-Version: 2.4
Name: skylam
Version: 1.0.0
Summary: Knexyce's agentic AI system known as SkyLAM.
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Jinja2
Requires-Dist: transformers
Requires-Dist: huggingface_hub
Requires-Dist: torch
Requires-Dist: torchaudio
Requires-Dist: torchvision
Requires-Dist: accelerate
Requires-Dist: safetensors
Requires-Dist: sentence-transformers
Requires-Dist: charset-normalizer
Requires-Dist: numpy
Requires-Dist: psutil
Requires-Dist: peft
Requires-Dist: requests
Requires-Dist: PyGithub
Requires-Dist: cryptography
Requires-Dist: argon2-cffi
Dynamic: license-file

# SkyLAM

SkyLAM is a local autonomous language-model framework designed for persistent AI-assisted development and system automation.

It combines configurable language models, semantic memory, agentic tool use, and a persistent execution environment into a single runtime.

## Features

* **Two-Stage LLM Pipeline**
  Uses separate decoder and chat models, allowing SkyLAM to dynamically determine generation parameters before producing a response.

* **Persistent Semantic Memory**
  Stores conversation history and embeddings, enabling SkyLAM to retrieve relevant information from previous interactions while maintaining recent context.

* **Context Management**
  Automatically balances recent conversation history with semantically relevant memories to operate within model context limits.

* **Multimodal Model Support**
  Supports compatible vision-language models in addition to standard causal language models.

* **Configurable Model Runtime**
  Supports Hugging Face models, optional PEFT adapters, automatic device selection, memory-aware model loading, and configurable RoPE scaling.

* **Agentic Tool System**
  Allows the model to interact with its environment through structured tool calls, including filesystem operations, directory management, command execution, and system inspection.

* **Python Execution**
  Provides the agent with controlled access to Python execution for automation and development tasks.

* **Persistent Agent Lifecycle**
  SkyLAM can run continuously in the background, recover its previous state, process administrative commands, and restart itself when necessary.

* **Administrative Interface**
  Provides CLI controls for launching, configuring, monitoring, messaging, restarting, and shutting down the runtime.

* **Session Management**
  Supports multiple persistent conversation sessions with independent histories and embeddings.

* **KPCore / KDPH Package System**
  Includes an encrypted package format for distributing, building, extracting, and managing SkyLAM-like packages (KPs) and dependencies.

* **GitHub Package Distribution**
  KDPH can publish and retrieve encrypted packages through GitHub-based package repositories.

## To Install

KP Workflow

```bash
git clone https://github.com/Knexyce-Co/skylam-agent.git && cd skylam-agent && ./ready.py
```

PIP Install (No KP logic executed on the user end.)

```bash
pip install skylam
```

## Architecture

SkyLAM is organized around several core components described below:

```text
SkyLAM
├── Model Runtime
│   ├── Decoder Model
│   ├── Chat Model
│   └── Embedding Model
│
├── Agent Runtime
│   ├── Memory
│   ├── Context Management
│   ├── Tool Execution
│   └── Python Execution
│
├── Administration
│   ├── Configuration
│   ├── Process Management
│   ├── Sessions
│   └── Logging
│
└── KPCore
    ├── Package Creation
    ├── Encryption
    ├── Dependencies
    └── Distribution
```

## Quick Start

Configure the required models:

```bash
python -m skylam -c decoder_engine=<Stage I model here.>
python -m skylam -c chat_engine=<Stage II model here.>
python -m skylam -c embed_engine=<Embedding model here.>
```

Then launch SkyLAM:

```bash
python -m skylam --launch
```

Additional runtime controls are available through the CLI:

```bash
python -m skylam --configure key=value
python -m skylam --send "message"
python -m skylam --view --execute
python -m skylam --quit
```

## Configuration

SkyLAM supports configuration for:

* Decoder model.
* Chat model.
* Embedding model.
* Active session.
* PEFT adapter.
* RoPE scaling.

Configuration is stored locally and can be modified through the command-line interface.

## KPCore

SkyLAM includes **KPCore**, a package and distribution system built around the Knexyce Data Package Handler (KDPH).

KPCore provides:

* Encrypted package creation and extraction.
* Package metadata.
* Dependency management.
* Build hooks.
* Local package installation.
* GitHub-based package distribution.

This allows SkyLAM projects and extensions to be packaged and distributed as self-contained encrypted packages.

## Project Structure

```text
skylam/
├── boot/        Dependency and startup management.
├── config/      Runtime configurations. (Placeholder null values by default.)
├── console/     Agent and administrator interfaces.
├── core/        Model runtime and memory.
├── kpcore/      Package system.
├── lock/        Runtime state and coordination.
├── oslayer/     Platform-specific functionality.
├── util/        Runtime utilities.
└── ...          Additional software or data may be created by SkyLAM.
```

## Requirements

* Python 3.10+
* PyTorch
* Hugging Face Transformers
* Sentence Transformers
* Accelerate
* PEFT
* NumPy
* Additional dependencies are handled by SkyLAM's bootstrap system.

---

SkyLAM is intended to provide a **persistent, extensible, and locally controlled AI runtime** capable of reasoning, remembering, executing tools, modifying its environment, and managing its own lifecycle.
