Skip to main content

A framework for Causal Intelligence in Multi-Agent Generative AI.

Project description

๐Ÿš€ CISO-GENAI-Framework: Causal Intelligence for Multi-Agent Generative AI

Table of Contents

About CISO-GENAI-Framework

The CISO-GENAI-Framework implements core concepts from Causal Invariant Synergy Optimization (CISO), a novel approach designed to bring causal reasoning, geometric cooperation, and topological group discovery to multi-agent reinforcement learning (MARL). As Generative AI systems scale to many interacting LLMs and agents, coordinating their efforts becomes a significant challenge. CISO aims to cut through the noise, identify true causal contributions, foster intelligent collaboration, and dynamically discover effective agent teams.

This repository provides a foundational demo illustrating how the CISO components analyze agent interactions within a simple environment.

Key Features

  • Causal Advantage Interventions: Understands what truly made the difference in multi-agent outcomes, moving beyond mere correlation to pinpoint causal credit.
  • Emergent Synergy Manifolds: Models the optimal collaboration surface among agents, aiming to unlock fluid and intelligent teamwork.
  • Topological Group Formation: Dynamically discovers natural, high-performing agent groups based on their interactions and proximity in state space.

Project Structure

CISO-GENAI/
โ”œโ”€โ”€ configs/
โ”‚   โ””โ”€โ”€ ciso_default.yaml         # Default configurations for CISO components
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ envs/
โ”‚   โ”‚   โ””โ”€โ”€ gridworld.py          # Gymnasium GridWorld environment setup
โ”‚   โ”œโ”€โ”€ causal_engine.py          # Implementation of Causal Advantage
โ”‚   โ”œโ”€โ”€ policies.py               # Base policy network for agents
โ”‚   โ”œโ”€โ”€ synergy_engine.py         # Approximation of Emergent Synergy Manifolds
โ”‚   โ”œโ”€โ”€ topology_engine.py        # Implementation of Topological Group Formation
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ agent_demo/                   # Directory for the multi-agent CISO
โ”‚   โ”œโ”€โ”€ demo_config.yaml          # Configurations specific to the demo
โ”‚   โ”œโ”€โ”€ demo_env.py               # The GridWorldEnv used in the demo
โ”‚   โ”œโ”€โ”€ agents.py                 # Defines the agent classes (Planner, Coder, Debater)
โ”‚   โ””โ”€โ”€ demo_app.py               # Main script to run the CISO multi-agent demo
โ”œโ”€โ”€ README.md                     # This file
โ”œโ”€โ”€ requirements.txt              # Python dependencies
โ”œโ”€โ”€ setup.py                      # (Optional) For packaging the framework
โ””โ”€โ”€ train.py                      # (Example) Script for full training (not demo focused)

Setup and Installation

To set up and run the CISO-GENAI demo, follow these steps:

1. Clone the Repository

git clone https://github.com/harshbopaliya/CISO-GENAI-Framework.git
cd CISO-GENAI-Framework

2. Create a Virtual Environment (Recommended)

python -m venv venv

# On Windows:
.\venv\Scripts\activate

# On macOS/Linux:
source venv/bin/activate

3. Install Dependencies

pip install -r requirements.txt

Note: If requirements.txt is missing, install manually:

pip install torch numpy gymnasium ripser PyYAML

Running the Demo

Navigate to the root directory of the CISO-GENAI-Framework and run the demo application:

python -m agent_demo.demo_app

This will start a simulation in the GridWorld environment with three agents. The CISO framework components will analyze their interactions at each step.

Understanding the Demo Output

The demo output will display information at each simulation step:

  • Agent Positions: The (x, y) coordinates of each agent on the grid
  • Rewards: The individual reward each agent receives (negative Euclidean distance to the grid center)
  • Causal Advantage (Global): A scalar value indicating the estimated global causal impact of the current state/actions
  • Emergent Synergy (Mean HJB Value): A scalar value approximating the overall synergy or fluidity of collaboration
  • Topological Groups Discovered: A list of lists, where each inner list contains the numerical indices of agents identified as a cohesive group based on their proximity

Note: [] (empty list) means no two agents are within the topology_eps threshold defined in agent_demo/demo_config.yaml. To see groups, consider increasing topology_eps (e.g., to 1.5, 2.0, or 2.5) as the grid coordinates are integers.

Agents in the Demo

The demo features three agents with conceptual roles:

  • agent_0 (PlannerAgent): Conceptually for high-level strategy
  • agent_1 (CoderAgent): Conceptually for implementation logic
  • agent_2 (DebaterAgent): Conceptually for communication/conflict resolution

Important: In this current demo, these agents are functionally identical. They all inherit from BaseAgent and use a stochastic policy to move randomly within the GridWorld, aiming for individual rewards based on proximity to the center. They do not perform specific "planning," "coding," or "debating" tasks. The names serve as a conceptual scaffold for future, more complex CISO implementations.

Future Work & Contribution

This framework is a starting point for exploring CISO. Future work could include:

  • Implementing actual learning algorithms (learn method) for agents
  • Developing richer environments with more complex, collaborative tasks
  • Introducing explicit communication channels and role-specific behaviors for agents
  • Full implementation of the advanced mathematical formulations of CISO

Contributions are welcome! Feel free to fork the repository, make improvements, and submit pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

Harsh Bopaliya

  • GitHub: [https://github.com/harshbopaliya]
  • LinkedIn: [https://www.linkedin.com/in/harshbopaliya2003/]
  • Email: [bopaliyaharsh7@gmail.com]

โญ If you find this project helpful, please consider giving it a star!

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

ciso_genai-0.0.1.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

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

ciso_genai-0.0.1-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file ciso_genai-0.0.1.tar.gz.

File metadata

  • Download URL: ciso_genai-0.0.1.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ciso_genai-0.0.1.tar.gz
Algorithm Hash digest
SHA256 0057c3941eefc5f5f4330328221a52ddd0e736b746723101b3740d5b41f03e85
MD5 0c1e811ef778d348d99b23d905180982
BLAKE2b-256 2d617f86b47f715b483c69e14c74c5132a60980cc4a28240bf2d1d01ac00d1d0

See more details on using hashes here.

File details

Details for the file ciso_genai-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: ciso_genai-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ciso_genai-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0d2891ce74fbb55fe8cd9a8eab23913de01a87c694295aead0352563d20d3930
MD5 894a1b259a7f9dc4b52764fbd2ef45ca
BLAKE2b-256 81706dd2a32627d6466373e3755c40f7947eff4b7bff6652827fa280d62eefcc

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