Metadata-Version: 2.4
Name: allele
Version: 1.0.1
Summary: Phylogenic AI Agents - Beyond Prompt Engineering. Evolve Genetically Optimized Personalities with Liquid Memory.
Project-URL: Homepage, https://github.com/bravetto/allele
Project-URL: Documentation, https://github.com/bravetto/allele#readme
Project-URL: Repository, https://github.com/bravetto/allele
Project-URL: Issues, https://github.com/bravetto/allele/issues
Project-URL: Changelog, https://github.com/bravetto/allele/blob/main/CHANGELOG.md
Author-email: Jimmy De Jesus <jimmydejesus1129@gmail.com>
Maintainer-email: Jimmy De Jesus <jimmydejesus1129@gmail.com>
License: MIT
License-File: LICENSE
Keywords: agents,ai,allele,evolution,genetic-algorithms,genome,liquid-neural-networks,llm,neuromorphic,phylogenic
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Requires-Dist: numpy>=1.21.0
Requires-Dist: typing-extensions>=4.0.0; python_version < '3.11'
Provides-Extra: all
Requires-Dist: aiohttp>=3.8.0; extra == 'all'
Requires-Dist: anthropic>=0.18.0; extra == 'all'
Requires-Dist: openai>=1.0.0; extra == 'all'
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.18.0; extra == 'anthropic'
Provides-Extra: dev
Requires-Dist: black>=23.0.0; extra == 'dev'
Requires-Dist: isort>=5.11.0; extra == 'dev'
Requires-Dist: mypy>=1.0.0; extra == 'dev'
Requires-Dist: pylint>=2.15.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Provides-Extra: ollama
Requires-Dist: aiohttp>=3.8.0; extra == 'ollama'
Provides-Extra: openai
Requires-Dist: openai>=1.0.0; extra == 'openai'
Description-Content-Type: text/markdown

# ALLELE
## Phylogenic AI Agents

[![Python Version](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org/downloads/)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
[![PyPI](https://img.shields.io/badge/PyPI-allele-blue)](https://pypi.org/project/allele/)

**Beyond Prompt Engineering. Evolve Genetically Optimized Personalities with Liquid Memory.**

---

## Don't Write Prompts. Breed Agents.

Traditional Agents are brittle. They hallucinate, drift, and forget.

**Allele changes the substrate.**

We replaced static prompts with **8-Trait Genetic Code** and **Liquid Neural Networks (LNNs)**.

---

## The Problem

**Prompting is guessing.** You change one word, the whole personality breaks.

- ❌ Brittle system prompts
- ❌ No memory coherence
- ❌ Manual trial-and-error optimization
- ❌ Agents that drift over time

## The Solution

**Allele treats Agent personalities like DNA, not text.**

Instead of writing prompts, you define a **Genome** with 8 evolved traits:

```python
from allele import ConversationalGenome, create_agent, AgentConfig

# Define personality as genetic code
genome = ConversationalGenome(
    genome_id="support_agent_v1",
    traits={
        'empathy': 0.95,              # High emotional intelligence
        'technical_knowledge': 0.70,  # Moderate technical depth
        'creativity': 0.30,           # Focused responses
        'conciseness': 0.85,          # Brief and clear
        'context_awareness': 0.90,    # Strong memory
        'engagement': 0.85,           # Warm personality
        'adaptability': 0.75,         # Flexible style
        'personability': 0.90         # Friendly demeanor
    }
)

# Create agent from genome
config = AgentConfig(model_name="gpt-4", kraken_enabled=True)
agent = await create_agent(genome, config)

# Chat with genetically-defined personality
async for response in agent.chat("I need help"):
    print(response)
```

---

## Core Innovation

### 🧬 Genetic Personality Encoding

8 quantified personality traits (0.0 to 1.0) define each agent:

- **Empathy** - Emotional understanding
- **Technical Knowledge** - Technical depth
- **Creativity** - Problem-solving novelty
- **Conciseness** - Brevity vs detail
- **Context Awareness** - Memory retention
- **Engagement** - Conversational energy
- **Adaptability** - Style flexibility
- **Personability** - Friendliness

### 🧪 Evolutionary Optimization

```python
# Don't manually tune. Evolve.
engine = EvolutionEngine(config)
population = engine.initialize_population(size=50)

best = await engine.evolve(population, fitness_fn)
# 20 generations → optimized personality
```

### 🧠 Kraken Liquid Neural Networks

Temporal memory via Liquid Neural Networks (not static vectors):

```python
kraken = KrakenLNN(reservoir_size=100)
context = await kraken.process_sequence(conversation)
# <10ms latency, adaptive dynamics
```

---

## Installation

```bash
pip install allele

# With LLM providers
pip install allele[openai]    # OpenAI
pip install allele[anthropic] # Anthropic Claude
pip install allele[ollama]    # Ollama (local)
pip install allele[all]       # All providers
```

---

## Why Allele?

| Feature | Traditional | Allele |
|---------|------------|--------|
| **Personality** | Prompt strings | Genetic code |
| **Optimization** | Manual tweaking | Auto-evolution |
| **Memory** | Vector stores | Liquid neural nets |
| **Reproducibility** | Copy-paste prompts | Version genomes |
| **Explainability** | Black box | Trait values |

---

## Benchmarks

- **Crossover**: <5ms (breeding is cheap)
- **LNN Processing**: <10ms (temporal coherence)
- **Memory**: ~2KB per genome
- **Code Quality**: 8.83/10, 100% tests passing

---

## Use Cases

- 🏥 Healthcare: High empathy + medical knowledge
- 💼 Sales: High engagement + persuasion
- 👨‍💻 Dev Tools: High technical + conciseness
- 🎓 Education: High adaptability + patience
- 🔒 Security: High precision + context awareness

---

## Documentation

- [API Reference](docs/api.md)
- [Evolution Guide](docs/evolution.md)
- [Kraken LNN](docs/kraken_lnn.md)
- [Examples](examples/)

---

## Testing

```bash
pytest                                    # Run all tests
pytest --cov=allele --cov-report=html    # With coverage
```

---

## Contributing

We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md).

---

## License

MIT License - see [LICENSE](LICENSE)

---

## Links

- **GitHub**: [github.com/bravetto/allele](https://github.com/bravetto/allele)
- **PyPI**: [pypi.org/project/allele](https://pypi.org/project/allele/)
- **Issues**: [github.com/bravetto/allele/issues](https://github.com/bravetto/allele/issues)

---

**Made with genetic algorithms and liquid neural networks**

**Don't write prompts. Breed agents.** 🧬
