Skip to main content

lamied: The Deterministic Future of AI Agents Framework - Event-driven, deterministic AI agent framework with Rust-native concurrency

Project description

Lamied: The Deterministic Future of AI Agents Framework

Lamied isn't just a framework, it is a fundamental re-engineering of AI agent systems. Built on a Rust core for uncompromised speed and an event-driven architecture that crushes Python-based concurrency limits, Lamied mandates determinism. We deliver the only auditable, reproducible, and truly scalable runtime designed to replace legacy frameworks and power mission-critical enterprise AI.

Why Lamied? See Lamied vs LangChain for a detailed comparison of competitive advantages.

🚀 Quick Start

Installation

Option 1: Install from Source (Recommended)

# Clone the repository
git clone https://github.com/sefineh-ai/Lamied.git
cd Lamied

# Build Rust core
cd core
cargo build --release

# Install Python SDK with pip
cd ../sdk/python
pip install -e .

Option 2: Install from PyPI (Recommended)

pip install Lamied

Note: The Rust core is automatically built and included in the PyPI package. See INSTALLATION.md for complete instructions.

Prerequisites

  • Rust (latest stable): Install Rust
  • Python 3.8+ (for Python SDK)
  • Cargo (comes with Rust)

Python SDK Usage

from Lamied import Agent, Runtime
import json
import os

# Initialize runtime
runtime = Runtime()
runtime.start()

# Create agent with Gemini API key
agent = Agent(
    name="MyAgent",
    seed=42,  # For deterministic execution
    runtime=runtime,
    gemini_api_key=os.getenv("GEMINI_API_KEY")
)

# Create workflow with LLM step
workflow = json.dumps([{
    "step_id": "llm_step",
    "step_type": "LLMCall",
    "prompt": "Answer: {input}",
    "tool_calls": [],
    "condition": None
}])

agent.set_workflow(workflow)

# Set up event handlers (optional)
@agent.on("LLMCallCompleted")
def on_complete(event):
    payload = event.get('payload', {})
    print(f"Response: {payload.get('response')}")

# Run agent
result = agent.run("What is artificial intelligence?")
print(result)

# Clean up
runtime.stop()

JavaScript/TypeScript SDK Usage

import { Agent, Runtime } from 'Lamied-sdk';

const runtime = new Runtime();
runtime.start();

const agent = new Agent({
  name: 'MyAgent',
  seed: 42,
  runtime: runtime
});

const result = await agent.run('Summarize recent AI research');
console.log(result);

🏗️ Architecture

Core Components

  • core/engine/ - Tokio-based event loop, scheduler, and event bus
  • core/tools/ - Deterministic tool orchestration with caching and retries
  • core/adapters/ - LLM adapters (Gemini) and vector DB integrations
  • core/Lamied-core/ - Public API and FFI bindings for SDKs
  • sdk/python/ - Python SDK with PyO3 bindings
  • sdk/js/ - JavaScript/TypeScript SDK
  • playground/ - Visual debugger and trace viewer

Core Principles

🎯 Event-Driven - Every LLM call, agent step, and workflow action emits events. Agents react to events instead of blocking.
Rust Concurrency - All CPU- or I/O-heavy operations run in Rust-native concurrency. Python is optional and sequential if needed.
🎲 Determinism - Seeded RNG and deterministic scheduling for reproducibility.
Premium Features - Parallel execution, worker pools, channel-based event bus, task throttling, and priority queues.

Key Features

Event-Driven Architecture - Pure pub/sub system, all operations emit events
Deterministic Execution - Seeded RNG for reproducible workflows
LLM Integration - Built-in Gemini adapter with event-driven calls
Error Handling - Automatic termination on errors, no hanging
True Concurrency - Rust async runtime, no Python GIL limits
Native Tool System - Built-in tool orchestration with caching
Hierarchical Memory - Global → Agent → Step → Tool layers
Production Ready - Timeout protection, proper error propagation
Premium Concurrency - Parallel event handling, concurrent tools, task scheduling

📚 Documentation

🧪 Examples

See the examples/ directory for:

  • Simple agent creation
  • Deterministic workflows
  • Tool integration
  • Multi-step agents

🛠️ Development

Building the Rust Core

cd core
cargo build --release

Running Tests

# Rust tests
cd core
cargo test

# Python tests
cd sdk/python
pytest

# JS tests
cd sdk/js
npm test

Development Mode

# Watch mode for Rust
cd core
cargo watch -x "test"

# Python SDK in editable mode
cd sdk/python
pip install -e .

📊 Performance Goals

Metric Target
Step latency < 20ms
Concurrent agents/node > 1000
Memory per agent < 5MB
Cold start < 200ms
Trace replay < 10ms

🤝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📜 License

Lamied © 2025 — MIT License. See LICENSE for details.

👤 Author

Sefineh — AI Engineer & LLM Framework Builder

Building Lamied to redefine how agentic systems think, act, and scale.


Status: 🚧 In Active Development

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

lamied-0.1.1.tar.gz (46.7 kB view details)

Uploaded Source

Built Distribution

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

lamied-0.1.1-cp312-cp312-manylinux_2_34_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

File details

Details for the file lamied-0.1.1.tar.gz.

File metadata

  • Download URL: lamied-0.1.1.tar.gz
  • Upload date:
  • Size: 46.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for lamied-0.1.1.tar.gz
Algorithm Hash digest
SHA256 aa4e5ae2f991d76604e05d959af136a6bd9135c9a81a93e91ba6a6fd583374bb
MD5 275b32a5f42e00da46f9a1b8c9cbfa79
BLAKE2b-256 578b7973cc954c2c155e49eac65ce1e60e87010685b10b3cfeb89de0ff08cf11

See more details on using hashes here.

File details

Details for the file lamied-0.1.1-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for lamied-0.1.1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 75f35b6a3bad3a232bfef6df71fb60f21e305a9acd97b8ce15f0d13d922ba5f8
MD5 591e86e4b74637e273e11a4bc2e97993
BLAKE2b-256 f86706ebba8cc153d346ddd98bcc98124d975146249063f99e8dfe589b390da7

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