Below is a sample README.md that you can include in your project’s root directory. It summarizes the current state of the code, explains its purpose, outlines the folder structure, and acknowledges that the project may still be in a “broken” or experimental state.
Polymind is an experimental multi-persona AI MVP built on top of the Arkaine framework.
Its goal is to demonstrate a Jungian-inspired approach to AI—combining multiple “persona” agents (e.g., Persona, Shadow, Anima) into a unified response.
Important: This project is still in development and may be partially or entirely broken in its current state. Use at your own risk.
-
Multi-Persona Concept:
- We define several “persona” agents (Persona, Shadow, Anima, etc.) using Arkaine’s
SimpleAgentclass, each offering a unique viewpoint. - Their outputs are then merged by an aggregator tool (the “Self”), aiming to provide a more holistic response to user prompts.
- We define several “persona” agents (Persona, Shadow, Anima, etc.) using Arkaine’s
-
Arkaine Integration:
- Uses Arkaine’s core classes (
Tool,SimpleAgent,Argument) to build agents. - Attempts to use or has used Arkaine’s flow classes (
Branch,Linear), but encountered version mismatches leading to errors.
- Uses Arkaine’s core classes (
-
Current Status:
- Broken / Incomplete – The code may fail at runtime due to mismatched Arkaine versions or older constructor signatures.
- We’re collaborating with the Arkaine creator to resolve these compatibility issues.
Here’s a simplified outline of the main directories and files:
polymind/
├── src/
│ ├── main.py # Entry point for running the MVP
│ ├── persona_agents.py # Definitions of Persona, Shadow, Anima
│ ├── aggregator.py # Tool that merges persona outputs
│ ├── pipeline.py # (Optional) pipeline/flow code
│ └── (other Python files) # Additional experimental code
├── arkaine/ # Local copy of Arkaine (or submodules)
│ ├── tools/
│ ├── toolbox/
│ ├── flow/
│ └── (other Arkaine modules)
├── venv/ # Python virtual environment
├── .env # Environment variables (e.g., OPENAI_API_KEY)
├── requirements.txt # Python dependencies
└── README.md # This file
- Clone/Download this repository.
- Create or activate a Python virtual environment (optional but recommended).
- Install dependencies from
requirements.txt:pip install -r requirements.txt
- Set your environment variables in
.env(e.g.,OPENAI_API_KEY=sk-xxxx).
- Navigate to the
src/directory:cd src - Run
main.py:python main.py
- Potential Errors:
- You may see
TypeErrororAttributeErrordue to mismatched Arkaine signatures. _executorwarnings are common in older Arkaine versions but usually harmless.
- You may see
- Version Mismatch:
The local Arkaine code inarkaine/may not match the installed PyPI version. Try:pip uninstall arkaine pip install -e /path/to/arkaine # If you have a local dev copy - Flow Constructors:
If you see errors aboutconcurrency,formatters, or missing arguments, check theBranchandLinearconstructors inarkaine/flow/. The code inpipeline.pymust match those signatures. - Manual Pipeline:
An alternative is to avoidBranch/Linearentirely and create a single custom tool that calls each persona agent and merges results manually (seepipeline_funcexamples).
- Partial Implementation: Some code references older or newer Arkaine features that may not align with the local version.
- No Guarantee of Functionality: The MVP might fail to run end-to-end until the Arkaine version mismatch is resolved.
- No Production Readiness: This is purely an experimental prototype, not meant for production use.
- Sync with Arkaine:
- Coordinate with the Arkaine maintainer to finalize stable signatures for
Branch,Linear,Tool, andSimpleAgent. - Update local references to match that stable version.
- Coordinate with the Arkaine maintainer to finalize stable signatures for
- Polish the Persona Flow:
- Finalize a “Self aggregator” that merges each persona’s output in a single pass or iterative loop.
- Optionally add concurrency or iterative refinement once the version issues are solved.
- Add Testing:
- Implement basic tests (e.g.,
pytest) for each persona agent and aggregator logic.
- Implement basic tests (e.g.,
- Arkaine: Thanks to hlfshell for creating the Arkaine framework and assisting with version alignment.
- Contributors: This MVP is maintained by [Zach] and others, with the shared goal of a multi-persona AI approach.
Disclaimer: This repository is a work in progress. The code may not function correctly in its current state. Use caution if you decide to run or extend this project. Feedback and pull requests are welcome to help fix the underlying Arkaine compatibility issues.