Skip to main content

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())

Metadata

Release files for akasa-mas 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for akasa-mas 0.1.0
File Size Uploaded
akasa_mas-0.1.0.tar.gz 7.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for akasa-mas 0.1.0
File Interpreter ABI Platform
akasa_mas-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.6 kB

Release files / akasa_mas-0.1.0.tar.gz

Download URL akasa_mas-0.1.0.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ee2467d037b196ad6d8ceb5705937981ba360e88c6c8a189a64d0faae18df596
BLAKE2b-256 checksum
How to use checksums
5785bae64232dfb4793f144dae18092a324a6a2a2b75342278e9a6885347c56d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.0

Release files / akasa_mas-0.1.0-py3-none-any.whl

Download URL akasa_mas-0.1.0-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e0ce88b03c469cc2b55e3714b09045d4a3903dd0c76ed678fdc7f48f7c4ede7
BLAKE2b-256 checksum
How to use checksums
c3f5ca01d4d07b174dc5b74d4dd088d0fbd950549e2b66e4c40791391c4a1a62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page