Skip to main content

A lightweight orchestration framework for LLM agents, no abstractions you don’t need, no bloated APIs, just clean coordination logic that works.

Project description

Orkes logo
No abstractions. No black boxes. Just Your Logic

PyPI version License: MIT Docs

Orkes is a Python library for building, coordinating, and observing any complex workflow that can be represented as a graph. While it is well-suited for building LLM-powered agentic systems, its core focus is on providing a flexible and intuitive graph-based framework with an emphasis on explicit control flow, transparent logic, and comprehensive traceability.

Core Concepts

At the heart of Orkes is a powerful graph-based architecture inspired by NetworkX. This design allows you to define your workflows as a graph of nodes and edges, where each node is a simple Python function.

  • OrkesGraph: The main canvas for your workflow. It holds the nodes and edges that define your application's logic.
  • Stateful Execution: A shared state object is passed between nodes, allowing for seamless data flow and management throughout the graph's execution.
  • Graph Traceability: Orkes provides a built-in traceability and visualization system. When you run a graph, Orkes can generate a detailed execution trace that can be visualized as an interactive HTML file, making it easy to debug and understand your workflows.

Features

  • Graph-based Architecture: Define complex workflows as a graph of nodes and edges, with support for conditional branching and loops.
  • Traceability and Visualization: Generate interactive traces of your graph executions to visualize the flow of data and control.
  • Pluggable LLM Integrations: A flexible and extensible system for integrating with LLMs, with out-of-the-box support for OpenAI, Anthropic's Claude, and Google's Gemini.
  • Agent and Tool Support: Define custom tools and use them within your graph's nodes to interact with external APIs and services.
  • Familiar Interface: The graph-based interface is inspired by NetworkX, providing a familiar and powerful paradigm for those with experience in graph-based programming.

Getting Started

Here's a simple example of how to build and run a graph with Orkes:

from typing import TypedDict
from orkes.graph.core import OrkesGraph
from orkes.graph.runner import GraphRunner

# 1. Define the state
class GreetingState(TypedDict):
    name: str
    greeting: str

# 2. Create the graph and nodes
graph = OrkesGraph(GreetingState)

def greeter_node(state: GreetingState) -> GreetingState:
    state['greeting'] = f"Hello, {state['name']}!"
    return state

graph.add_node('greeter', greeter_node)

# 3. Connect the nodes with edges
graph.add_edge(graph.START, 'greeter')
graph.add_edge('greeter', graph.END)

# 4. Compile and run the graph
compiled_graph = graph.compile()
runner = GraphRunner(compiled_graph)
initial_state = GreetingState(name="World", greeting="")
final_state = runner.run(initial_state)

print(final_state)
# Expected output: {'name': 'World', 'greeting': 'Hello, World!'}

# 5. Visualize the trace
runner.visualize_trace("greeting_trace.html")

Here is an example how the orkes graph visualization will look like:

example

Roadmap

Feature Description Status
Boilerplate Agent Provide a well-structured boilerplate for creating new agents to accelerate the development of agentic systems. Planned
Parallel Graph Execution Enhance the graph runner to support parallel execution of independent branches for improved performance. Planned
Tracer Web Platform Develop a standalone web-based platform for visualizing and inspecting graph traces in real-time. Planned

Documentation

For more details, visit our Documentation Page.

Contributing

Contributions are welcome! Please see the Contributing Guide for more information.

License

Orkes is licensed under the MIT License.

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

orkes-0.1.3.2.tar.gz (34.7 kB view details)

Uploaded Source

Built Distribution

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

orkes-0.1.3.2-py3-none-any.whl (39.1 kB view details)

Uploaded Python 3

File details

Details for the file orkes-0.1.3.2.tar.gz.

File metadata

  • Download URL: orkes-0.1.3.2.tar.gz
  • Upload date:
  • Size: 34.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0rc1

File hashes

Hashes for orkes-0.1.3.2.tar.gz
Algorithm Hash digest
SHA256 0e42908c78b9f34d54de5086a575f83327501f5deef5faffd4b2324f658b77de
MD5 d52748ddfaa357f68e2e5de67704e0c3
BLAKE2b-256 e96edd44f57bb788ed203024ba39e4ffd8f0f0c31886c4ee4789b940a0a8b87d

See more details on using hashes here.

File details

Details for the file orkes-0.1.3.2-py3-none-any.whl.

File metadata

  • Download URL: orkes-0.1.3.2-py3-none-any.whl
  • Upload date:
  • Size: 39.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0rc1

File hashes

Hashes for orkes-0.1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b308798a939b27d26c77c9f076f9baea3bab2010cef4d935db6de0b0f988b4fd
MD5 93fe5ea2dfbccc701f889436b48c9b8e
BLAKE2b-256 d147d288c5cd36bb3e870959a39bc9fe80632e69cf31de2499eb4fadd5efa262

See more details on using hashes here.

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