Modular agent orchestrator for reasoning pipelines
Project description
OrKa
Orchestrator Kit for Agentic Reasoning - OrKa is a modular AI orchestration system that transforms Large Language Models (LLMs) into composable agents capable of reasoning, fact-checking, and constructing answers with transparent traceability.
🚀 Features
- Modular Agent Orchestration: Define and manage agents using intuitive YAML configurations.
- Configurable Reasoning Paths: Utilize Redis streams to set up dynamic reasoning workflows.
- Comprehensive Logging: Record and trace every step of the reasoning process for transparency.
- Built-in Integrations: Support for OpenAI agents, web search functionalities, routers, and validation mechanisms.
- Command-Line Interface (CLI): Execute YAML-defined workflows with ease.
🛠️ Installation
- Ensure you have Python and Redis installed on your system.
- Ensure redis is up and running
-
Clone the Repository:
git clone https://github.com/marcosomma/orka.git cd orka
-
Install Dependencies:
pip install -e .
-
Create a
.envfile in the root directory with your API credentials and settings:OPENAI_API_KEY=your_openai_api_key BASE_OPENAI_MODEL=gpt-4o-mini GOOGLE_API_KEY=sksdsadasqwdad.... GOOGLE_CSE_ID=1234
📄 Usage
OrKa operates based on YAML configuration files that define the orchestration of agents.
- Prepare a YAML Configuration: Create a YAML file (e.g.,
example.yml) that outlines your agentic workflow. - Run OrKa with the Configuration:
python -m orka.orka_cli ./example.yml "Your input question" --log-to-file
This command processes the input question through the defined workflow and logs the reasoning steps.
📝 YAML Configuration Structure
The YAML file specifies the agents and their interactions. Below is an example configuration:
orchestrator:
id: fact-checker
strategy: sequential
queue: orka:fact-core
agents:
- domain_classifier
- is_fact
- validate_fact
agents:
- id: domain_classifier
type: openai-classification
prompt: >
Classify this question into one of the following domains:
- science, geography, history, technology, date check, general
options: [science, geography, history, technology, date check, general]
queue: orka:domain
- id: is_fact
type: openai-binary
prompt: >
Is this a {{ input }} factual assertion that can be verified externally? Answer TRUE or FALSE.
queue: orka:is_fact
- id: validate_fact
type: openai-binary
prompt: |
Given the fact "{{ input }}", and the search results "{{ previous_outputs.duck_search }}"?
queue: validation_queue
Key Sections
-
agents: Defines the individual agents involved in the workflow. Each agent has:
- name: Unique identifier for the agent.
- type: Specifies the agent's function (e.g.,
search,llm).
-
workflow: Outlines the sequence of interactions between agents:
- from: Source agent or input.
- to: Destination agent or output.
Settings such as the model and API keys are loaded from the .env file, keeping your configuration secure and flexible.
🧪 Example
To see OrKa in action, use the provided example.yml configuration:
python -m orka.orka_cli ./example.yml "What is the capital of France?" --log-to-file
This will execute the workflow defined in example.yml with the input question, logging each reasoning step.
📚 Documentation
🤝 Contributing
We welcome contributions! Please see our CONTRIBUTING.md for guidelines.
📜 License & Attribution
This project is licensed under the CC BY-NC 4.0 License. For more details, refer to the LICENSE file.
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 orka_reasoning-0.0.1.tar.gz.
File metadata
- Download URL: orka_reasoning-0.0.1.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6ea8de84c39f1ef21342b21f7c251297a9169aa31e559973abf9357d98a8eb9
|
|
| MD5 |
c8ce5b0d74f46d4b15e7e5eda580d16b
|
|
| BLAKE2b-256 |
a5a729a0c7731982c1d5a58c2c2e4425b4055ddaf8d184a99b6d0785668faf24
|
File details
Details for the file orka_reasoning-0.0.1-py3-none-any.whl.
File metadata
- Download URL: orka_reasoning-0.0.1-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
937b07ccdfab66576f795679351403f18f5bb9622b58cc31e58642f605e77a4c
|
|
| MD5 |
17fed268a996a298aee1635417255042
|
|
| BLAKE2b-256 |
d9d9eaa3a2bc2ea115d0588a6542d3285cbf404cc5c9fcb516b8a2c4a01b8b01
|