Skip to main content

Liman AgentOps Core Library

Project description

Liman Core

Core library of the Liman framework providing low-level building blocks for declarative YAML-based agent workflows with custom DSL.

Features

  • Declarative YAML Configuration: Define agents using simple YAML manifests
  • Multi-language Support: Built-in localization for prompts and descriptions
  • Node-based Architecture: Compose workflows from LLM, Tool, and custom nodes
  • Edge DSL: Connect nodes with conditional expressions and function references

Node Types

LLMNode

Wraps LLM requests with system prompts and tool integration.

kind: LLMNode
name: assistant
prompts:
  system:
    en: |
      You are a helpful assistant.
    es: |
      Eres un asistente útil.
tools:
  - calculator
nodes:
  - target: analyzer
    when: "result == 'success'"
  - target: error_handler
    when: "result != 'success' and retry_count < 3"

ToolNode

Defines function calls for LLM tool integration.

kind: ToolNode
name: calculator
description:
  en: |
    Performs mathematical calculations
func: my_module.calculate
arguments:
  - name: expression
    type: str
    description:
      en: Mathematical expression to evaluate

Installation

pip install liman_core

Quick Start

from liman_core import LLMNode, ToolNode

# Load from YAML
llm_node = LLMNode.from_yaml_path("agent.yaml")

# Create from dict
tool_spec = {
    "kind": "ToolNode",
    "name": "calculator",
    "description": {"en": "Math tool"},
    "func": "math.sqrt"
}
tool_node = ToolNode.from_dict(tool_spec)

# Compile and invoke
llm_node.compile()
result = llm_node.invoke("What is the square root of 16?")

Edge DSL

Connect nodes using the custom DSL for conditional execution:

nodes:
  # Simple target reference
  - analyzer

  # Conditional execution with variables
  - target: success_handler
    when: "status == 'complete' and errors == 0"

  # Logical operators
  - target: retry_handler
    when: "failed and (retry_count < 3 or critical == true)"

  # Function reference for complex logic
  - target: custom_validator
    when: "validators.check_output"

Supported DSL features:

  • Constants: true, false, numbers, strings
  • Comparisons: ==, !=, >, <
  • Logical operators: and/&&, or/||, not/!
  • Function references: module.function for custom logic
  • Parentheses: For expression grouping

API Reference

All nodes inherit from BaseNode and provide:

  • .from_dict() - Create from dictionary
  • .from_yaml_path() - Load from YAML file
  • .compile() - Prepare node for execution
  • .invoke() / .ainvoke() - Synchronous/asynchronous execution
  • .print_spec() - Display formatted specification

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.0a1.tar.gz (25.0 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.0a1-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: liman_core-0.1.0a1.tar.gz
  • Upload date:
  • Size: 25.0 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.0a1.tar.gz
Algorithm Hash digest
SHA256 5e00152054fb898270fe3e72a160a04fe329620f7419170b19a2aecee4504253
MD5 1471218f22107455818be1e2080cb3b3
BLAKE2b-256 b609afc6b35c87a7a6ed51171f4df215e07a9ca511570d82f879c009d693e7b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for liman_core-0.1.0a1.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.0a1-py3-none-any.whl.

File metadata

  • Download URL: liman_core-0.1.0a1-py3-none-any.whl
  • Upload date:
  • Size: 23.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.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 44e1794478a34f3bce9d354190f5a64b35bca45edd9e7675b584bcdda4155560
MD5 f5ccb35fa11aa58aa20e455926704e9a
BLAKE2b-256 80cb525ae1d477478b70c8818387d9a53263bad21963fc297aed0a254b682c87

See more details on using hashes here.

Provenance

The following attestation bundles were made for liman_core-0.1.0a1-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