Skip to main content

Akasa-MAS: The Agentic Orchestrator for Educational RAG Pipelines

Project description

Akasa-MAS (The Agentic Orchestrator)

Akasa is the primary orchestrator that acts as the "brain" of your educational AI system. It decides when to use traditional ML models, localized LLMs (like Qwen 1.5B), or advanced reasoning LLMs (like Qwen 3B).

To be used alongside Sutra-RAG and Mandala-GNN.

Key Features

  1. Smart Triage (Intent Classifier): A traditional ML model (e.g., Random Forest/SVM) that inspects input:

    • Simple Input: Answered directly by a template/traditional ML.
    • Technical Input: Routed to Qwen 1.5B.
    • Reasoning Input: Routed to Qwen 3B.
  2. Reinforcement Learning for Adaptation (RL):

    • Memory Buffer: Stores (Student State, Agent Action, Reward/Result).
    • Policy Update: Uses historical data to optimize the prompt sent to the LLM (Automated Prompt Tuning).
  3. Agent Roles:

    • Learner Profiling Agent: Monitors student psychology and progress.
    • Evaluation Agent: Diagnoses misconceptions.
    • Coordinator Agent: Orchestrates the turn-taking of other agents.

Installation

pip install akasa-mas

Quick Start

from akasa.orchestrator import AkasaOrchestrator
from akasa.rl_buffer import SQLiteMemoryBuffer

# 1. Custom model routing (Swap LLMs to your preference)
custom_routing = {
    "simple": "Local-Regex-Template",
    "technical": "Qwen-1.5B-Local",
    "reasoning": "Qwen-3B-Cloud"
}

# 2. Inject your own Database / Memory interface (e.g. MySQL, PgVector)
# For the simplest setup, use the built-in SQLite buffer.
memory = SQLiteMemoryBuffer(db_path="demo_memory.db")

orchestrator = AkasaOrchestrator(
    memory_buffer=memory,
    model_routing=custom_routing
)

user_query = "Why does the moon shine?"
route_info = orchestrator.process_request(user_id="std_01", query=user_query)

print(f"Routing to: {route_info['target_model']}")
print(f"Optimized Prompt: {route_info['optimized_prompt']}")

Integration with Sutra-RAG and Mandala-GNN

Akasa-MAS is designed to sit at the top of the stack:

  • Akasa-MAS: Orchestrates the intent and final prompt tuning.
  • Sutra-RAG: Provides retrieval context for factual accuracy.
  • Mandala-GNN: Manages learning paths and structured knowledge graphs.

Check examples/02_full_stack_orchestration.py for a complete implementation.

Examples Breakdown

Custom RL Buffer

You can inject your own database (MySQL, PostgreSQL, etc.) by implementing BaseMemoryBuffer:

from akasa.rl_buffer import BaseMemoryBuffer

class MyPostgresBuffer(BaseMemoryBuffer):
    def add_experience(self, state, action, reward):
        # Your SQL implementation here
        pass
    
    def get_successful_actions(self, limit=3):
        # Return successful metadata
        return []

orchestrator = AkasaOrchestrator(memory_buffer=MyPostgresBuffer())

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

akasa_mas-0.1.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

akasa_mas-0.1.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file akasa_mas-0.1.0.tar.gz.

File metadata

  • Download URL: akasa_mas-0.1.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for akasa_mas-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ee2467d037b196ad6d8ceb5705937981ba360e88c6c8a189a64d0faae18df596
MD5 0c4b2c55517925d0c6af1b8b67bc4ced
BLAKE2b-256 5785bae64232dfb4793f144dae18092a324a6a2a2b75342278e9a6885347c56d

See more details on using hashes here.

File details

Details for the file akasa_mas-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for akasa_mas-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e0ce88b03c469cc2b55e3714b09045d4a3903dd0c76ed678fdc7f48f7c4ede7
MD5 100ceffb43dfe5294a9668ba874660f2
BLAKE2b-256 c3f5ca01d4d07b174dc5b74d4dd088d0fbd950549e2b66e4c40791391c4a1a62

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