Skip to main content

Liman AgentOps Core Library

Project description

Liman Core

codecov

Core library for Liman - a declarative YAML-based agent framework with custom DSL for building AI workflows.

What is it?

Liman Core provides low-level building blocks for creating AI agents through YAML manifests.
This repo introduces a Node and NodeActor architecture for defining and executing agent workflows.
Nodes are stateless specifications that store configuration, while NodeActors are stateful instances that execute specific nodes. Use these components to build your own orchestration system or use the built-in one in liman.

Key Features

  • YAML-First: Define entire agent workflows in declarative YAML
  • Node Architecture: LLM, Tool, Function, and custom nodes with automatic composition
  • Edge DSL: Smart conditional routing between nodes with custom expressions
  • Multi-Language: Built-in localization for prompts and descriptions
  • Plugin System: Extensible architecture with authentication, telemetry, and custom plugins
  • NodeActor: Async execution engine with state management and error handling

Installation

pip install liman_core

Requires Python 3.10+

Quick Example

from liman_core import LLMNode, ToolNode, NodeActor, Registry

# Initialize registry
registry = Registry()

# Create tool
tool_spec = {
    "kind": "ToolNode",
    "name": "calculator",
    "func": "math.sqrt",
    "description": {"en": "Calculate square root"}
}
tool = ToolNode.from_dict(tool_spec, registry)

# Create LLM node with tool
llm_spec = {
    "kind": "LLMNode",
    "name": "assistant",
    "tools": ["calculator"],
    "prompts": {"system": {"en": "You are a math assistant"}}
}
llm_node = LLMNode.from_dict(llm_spec, registry)

# Execute with NodeActor
actor = NodeActor.create(llm_node, llm=your_llm_instance)
result = await actor.execute("What's the square root of 16?", execution_id)

Core Components

Nodes (Stateless Specifications)

  • LLMNode: LLM requests with system prompts and tool integration
  • ToolNode: Function definitions for LLM tool calling
  • FunctionNode: Custom Python functions

Nodes are building blocks that store configuration and behavior but contain no execution state.

NodeActor (Stateful Execution)

Stateful execution engine that wraps a specific node, handles state management, and executes async operations with error handling and recovery.

Edge DSL

nodes:
  - target: success_handler
    when: "status == 'complete' and retry_count < 3"
  - target: error_handler
    when: "failed and critical == true"

Registry & Plugins

Central component registry with extensible plugin system for auth, telemetry, and custom functionality.

Architecture

Registry → Node (stateless) → NodeActor (stateful) → Execution
    ↓           ↓                    ↓
 Plugins    Spec Config        State Management

Use .print_spec() on any node to inspect its YAML specification.

Development

# Activate virtual environment
source .venv/bin/activate

# Run tests
poe test

# Type checking
poe mypy

# Linting
poe lint

# Formatting
poe format

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

liman_core-0.1.0a3.tar.gz (35.5 kB view details)

Uploaded Source

Built Distribution

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

liman_core-0.1.0a3-py3-none-any.whl (39.3 kB view details)

Uploaded Python 3

File details

Details for the file liman_core-0.1.0a3.tar.gz.

File metadata

  • Download URL: liman_core-0.1.0a3.tar.gz
  • Upload date:
  • Size: 35.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for liman_core-0.1.0a3.tar.gz
Algorithm Hash digest
SHA256 c654c74001670d17b88e6d71ab027540bb969a1ddafbfab72f21d45877a822ff
MD5 4b154dba3b11adcb0f32bcbcb49d76d4
BLAKE2b-256 126bda835bebe116529c999856ee4fd714635d0c0c9c5d0faea862251cca4ac4

See more details on using hashes here.

Provenance

The following attestation bundles were made for liman_core-0.1.0a3.tar.gz:

Publisher: release.yaml on gurobokum/liman

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file liman_core-0.1.0a3-py3-none-any.whl.

File metadata

  • Download URL: liman_core-0.1.0a3-py3-none-any.whl
  • Upload date:
  • Size: 39.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for liman_core-0.1.0a3-py3-none-any.whl
Algorithm Hash digest
SHA256 146dbb4c2a16aef03b6a60d6dfbe93023304e775b3b94afda032fd74a4e18f70
MD5 32a3cbc4b35eb49ebc6cdd6f8434ed93
BLAKE2b-256 c74e30c235dd706bb5a89f19537153fa48e5172ee5bf9ddc7a8cc01ecf700ad6

See more details on using hashes here.

Provenance

The following attestation bundles were made for liman_core-0.1.0a3-py3-none-any.whl:

Publisher: release.yaml on gurobokum/liman

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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