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

Uploaded Python 3

File details

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

File metadata

  • Download URL: liman_core-0.1.0a0.tar.gz
  • Upload date:
  • Size: 24.3 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.0a0.tar.gz
Algorithm Hash digest
SHA256 57c35f41d283957db8957c92811250a2fba2b4e5678c85d4c95269913fcce8ff
MD5 24aada4469ab57e1afe443fddbedc267
BLAKE2b-256 92835249f41c326ef4eaa9cc2ff4a4460f587ec6d3a9f59fb3b15f168126b068

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: liman_core-0.1.0a0-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.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 f12002dce619cffa10da70785e874e19a9501202ff29169c7e0d318cb005ea8c
MD5 93a11203d159e2632559c982d1fc31d8
BLAKE2b-256 609b8689eb8ba273502be70613562af4fe005185ba9f3fb54b8c5fa2f9cbdbb4

See more details on using hashes here.

Provenance

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