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.functionfor 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57c35f41d283957db8957c92811250a2fba2b4e5678c85d4c95269913fcce8ff
|
|
| MD5 |
24aada4469ab57e1afe443fddbedc267
|
|
| BLAKE2b-256 |
92835249f41c326ef4eaa9cc2ff4a4460f587ec6d3a9f59fb3b15f168126b068
|
Provenance
The following attestation bundles were made for liman_core-0.1.0a0.tar.gz:
Publisher:
release.yaml on gurobokum/liman
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
liman_core-0.1.0a0.tar.gz -
Subject digest:
57c35f41d283957db8957c92811250a2fba2b4e5678c85d4c95269913fcce8ff - Sigstore transparency entry: 345903524
- Sigstore integration time:
-
Permalink:
gurobokum/liman@a4ba4c772a80719bbee6155d0332e61a5740c342 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/gurobokum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@a4ba4c772a80719bbee6155d0332e61a5740c342 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f12002dce619cffa10da70785e874e19a9501202ff29169c7e0d318cb005ea8c
|
|
| MD5 |
93a11203d159e2632559c982d1fc31d8
|
|
| BLAKE2b-256 |
609b8689eb8ba273502be70613562af4fe005185ba9f3fb54b8c5fa2f9cbdbb4
|
Provenance
The following attestation bundles were made for liman_core-0.1.0a0-py3-none-any.whl:
Publisher:
release.yaml on gurobokum/liman
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
liman_core-0.1.0a0-py3-none-any.whl -
Subject digest:
f12002dce619cffa10da70785e874e19a9501202ff29169c7e0d318cb005ea8c - Sigstore transparency entry: 345903525
- Sigstore integration time:
-
Permalink:
gurobokum/liman@a4ba4c772a80719bbee6155d0332e61a5740c342 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/gurobokum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@a4ba4c772a80719bbee6155d0332e61a5740c342 -
Trigger Event:
push
-
Statement type: