How bocai-harry/mirofish works
MiroFish is a multi-agent prediction engine: users submit seed material and a natural-language prediction requirement, build a graph-backed world, configure and run social simulations, then generate a report and interact with simulated agents or the report agent. The diagram preserves the README’s five domain stages and key graph, memory, OASIS, reporting, and interaction capabilities. Source excerpts establish several backend calls and frontend API relationships; unsampled subsystems are included where documented, with uncertain links left dashed.
Main entry points: graph.py Graph endpoints · simulation_manager.py Simulation lifecycle · simulation.py Simulation endpoints · simulation_runner.py OASIS runner
Components 34
User experience
- Project entry
frontend/src/views/Home.vue - Pending upload
frontend/src/store/pendingUpload.js - Workflow process
frontend/src/views/Process.vue - Graph building
frontend/src/components/Step1GraphBuild.vue - Environment setup
frontend/src/components/Step2EnvSetup.vue - Simulation controls
frontend/src/components/Step3Simulation.vue - Report view
frontend/src/components/Step4Report.vue - World interaction
frontend/src/components/Step5Interaction.vue - Graph API client
frontend/src/api/graph.js - Simulation API client
frontend/src/api/simulation.js - Report API client
frontend/src/api/report.js
Seed and graph
- Graph endpoints
backend/app/api/graph.py - Seed text parsing
backend/app/utils/file_parser.py - Text processing
backend/app/services/text_processor.py - Ontology generation
backend/app/services/ontology_generator.py - Graph construction
backend/app/services/graph_builder.py - Zep graph memory
World simulation
- Simulation endpoints
backend/app/api/simulation.py - Entity selection
backend/app/services/zep_entity_reader.py - Agent profiles
backend/app/services/oasis_profile_generator.py - Simulation configuration
backend/app/services/simulation_config_generator.py - Simulation lifecycle
backend/app/services/simulation_manager.py - OASIS runner
backend/app/services/simulation_runner.py - Simulation IPC
backend/app/services/simulation_ipc.py - Temporal memory updates
backend/app/services/zep_graph_memory_updater.py - OASIS engine
- Simulation data
backend/app/config.py
Reports and interaction
- Report endpoints
backend/app/api/report.py - Report agent
backend/app/services/report_agent.py - Graph retrieval tools
backend/app/services/zep_tools.py - Report history
backend/app/api/report.py
Runtime foundations
- Project state
backend/app/models/project.py - Task tracking
backend/app/models/task.py
Other components
- User
Connections 46
- User → Project entry: submits seed
frontend/src/views/Home.vue - Project entry → Pending upload: stages upload
frontend/src/views/Home.vue - Pending upload → Workflow process: provides upload
frontend/src/views/Process.vue - Workflow process → Graph building: renders
frontend/src/views/Process.vue - Workflow process → Graph API client: requests graph
frontend/src/views/Process.vue - Graph building → Simulation API client: calls
frontend/src/components/Step1GraphBuild.vue - Graph building → Graph API client: calls
frontend/src/components/Step1GraphBuild.vue - Workflow process → Environment setup: renders
frontend/src/views/Process.vue - Environment setup → Simulation API client: requests setup
frontend/src/components/Step2EnvSetup.vue - User → Simulation controls: starts run
README.md - Simulation controls → Simulation API client: controls run
frontend/src/api/simulation.js - User → Report view: reviews report
README.md - Report view → Report API client: requests report
frontend/src/components/Step4Report.vue - User → World interaction: interacts
README.md - World interaction → Report API client: uses report chat
- Graph API client → Graph endpoints: HTTP requests
- Simulation API client → Simulation endpoints: HTTP requests
- Report API client → Report endpoints: HTTP requests
- Graph endpoints → Seed text parsing: parses uploads
backend/app/api/graph.py - Graph endpoints → Text processing: processes text
backend/app/api/graph.py - Graph endpoints → Ontology generation: generates ontology
backend/app/api/graph.py - Graph endpoints → Graph construction: builds graph
backend/app/api/graph.py - Graph endpoints → Task tracking: tracks tasks
backend/app/api/graph.py - Graph endpoints → Project state: persists project
backend/app/api/graph.py - Graph construction → Zep graph memory: writes graph
- Simulation endpoints → Simulation lifecycle: manages runs
backend/app/api/simulation.py - Simulation endpoints → Entity selection: filters entities
backend/app/api/simulation.py - Simulation endpoints → OASIS runner: reads run status
backend/app/api/simulation.py - Simulation endpoints → Project state: reads project
backend/app/api/simulation.py - Simulation lifecycle → Entity selection: reads entities
backend/app/services/simulation_manager.py - Simulation lifecycle → Agent profiles: generates profiles
backend/app/services/simulation_manager.py - Simulation lifecycle → Simulation configuration: generates parameters
backend/app/services/simulation_manager.py - Simulation lifecycle → Simulation data: stores state
backend/app/services/simulation_manager.py - Entity selection → Zep graph memory: reads graph
backend/app/services/zep_entity_reader.py - Agent profiles → Zep graph memory: reads graph memory
- OASIS runner → Simulation IPC: uses IPC
backend/app/services/simulation_runner.py - OASIS runner → Temporal memory updates: updates memory
backend/app/services/simulation_runner.py - OASIS runner → OASIS engine: runs simulation
- OASIS runner → Simulation data: writes run data
backend/app/services/simulation_runner.py - Report endpoints → Report agent: generates and chats
backend/app/api/report.py - Report endpoints → Simulation lifecycle: loads simulation
backend/app/api/report.py - Report endpoints → Graph retrieval tools: searches graph
backend/app/api/report.py - Report endpoints → Report history: lists reports
backend/app/api/report.py - Report agent → Graph retrieval tools: uses retrieval tools
backend/app/services/report_agent.py - Graph retrieval tools → Zep graph memory: queries graph
- Agent profiles → Zep graph memory: injects agent memory