Liman AgentOps Core Library
Project description
Liman Core
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
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.0.tar.gz.
File metadata
- Download URL: liman_core-0.1.0.tar.gz
- Upload date:
- Size: 53.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b30132b75cf743563beea2f4b1477c3038cdc38ea1e807b7c0ec6f0023f281ab
|
|
| MD5 |
5bc70de8c58bdf23f856d082fcfc6be1
|
|
| BLAKE2b-256 |
ce9021ee4901679caa9efec7cb6bf799d78c1dbd738185a070b1ad8a78bf4e9b
|
Provenance
The following attestation bundles were made for liman_core-0.1.0.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.0.tar.gz -
Subject digest:
b30132b75cf743563beea2f4b1477c3038cdc38ea1e807b7c0ec6f0023f281ab - Sigstore transparency entry: 1435928207
- Sigstore integration time:
-
Permalink:
gurobokum/liman@51183eb39b6df01a8a781e5055544734629a4844 -
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@51183eb39b6df01a8a781e5055544734629a4844 -
Trigger Event:
push
-
Statement type:
File details
Details for the file liman_core-0.1.0-py3-none-any.whl.
File metadata
- Download URL: liman_core-0.1.0-py3-none-any.whl
- Upload date:
- Size: 49.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7f0000d3bca1ea0c2c730bdecb2ca73c79d22ca18c91186b69fc99d18ffcf69
|
|
| MD5 |
b7ce9825e7c7de7b69b1562fbade4712
|
|
| BLAKE2b-256 |
3b0f9298c5a6869c107959460b37276b007827bfbf6cb5255924fa2ba111c3a7
|
Provenance
The following attestation bundles were made for liman_core-0.1.0-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.0-py3-none-any.whl -
Subject digest:
c7f0000d3bca1ea0c2c730bdecb2ca73c79d22ca18c91186b69fc99d18ffcf69 - Sigstore transparency entry: 1435928215
- Sigstore integration time:
-
Permalink:
gurobokum/liman@51183eb39b6df01a8a781e5055544734629a4844 -
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@51183eb39b6df01a8a781e5055544734629a4844 -
Trigger Event:
push
-
Statement type: