neqsim-agent-handoff
Skill167 starsChanged 7 months agoApache-2.0View on GitHub
Agent-to-agent communication schema for NeqSim. USE WHEN: composing multi-agent pipelines where one agent's output feeds another agent's input. Defines structured result formats for fluid definitions, simulation results, and design outputs that agents can pass to each other.
In this repository140 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- analyze-convergenceSkill
- analyze-gibbs-convergenceSkill
- book-creationSkill
- design-flash-benchmarkSkill
- design-reactor-benchmarkSkill
- figure-discussionSkill
- generate-publication-figuresSkill
- journal-formattingSkill
- neqsim-acid-gas-treatingSkill
- neqsim-advanced-control-mpc-and-virtual-sensingSkill
- neqsim-agentic-process-optimizationSkill
- neqsim-api-patternsSkill
- neqsim-autonomous-investigationSkill
- neqsim-capability-mapSkill
- neqsim-capacity-and-utilization-analysisSkill
- neqsim-capacity-increase-screeningSkill
- neqsim-ccs-hydrogenSkill
- neqsim-code-healthSkill
- neqsim-code-hygieneSkill
- neqsim-code-reviewSkill
- neqsim-column-internals-and-rate-basedSkill
- neqsim-compressor-antisurge-recycleSkill
- neqsim-consequence-analysisSkill
- neqsim-continuous-task-improvementSkill
- neqsim-controllability-operabilitySkill
- neqsim-cooling-waterSkill
- neqsim-cpa-water-boundariesSkill
- neqsim-depressurization-mdmtSkill
- neqsim-distillation-designSkill
- neqsim-document-intelligence-extractionSkill
- neqsim-dynamic-equipment-implementationSkill
- neqsim-dynamic-simulationSkill
- neqsim-electrolyte-systemsSkill
- neqsim-emulsion-separationSkill
- neqsim-energy-systems-and-electrificationSkill
- neqsim-engineering-design-packageSkill
- neqsim-eos-regressionSkill
- neqsim-equipment-cost-estimationSkill
- neqsim-exploration-strategy-selectionSkill
- neqsim-field-developmentSkill
- neqsim-field-economicsSkill
- neqsim-firewater-deluge-designSkill
- neqsim-flow-accelerated-corrosionSkill
- neqsim-flow-assuranceSkill
- neqsim-flow-assurance-study-reportSkill
- neqsim-forward-separator-trainSkill
- neqsim-future-operation-studySkill
- neqsim-hazid-fmea-eta-ftaSkill
- neqsim-heat-integrationSkill
- neqsim-hydrogen-productionSkill
- neqsim-input-validationSkill
- neqsim-integrated-production-and-lifecycleSkill
- neqsim-in-writingSkill
- neqsim-java8-rulesSkill
- neqsim-jurisdiction-regulatory-basisSkill
- neqsim-literature-searchSkill
- neqsim-lng-liquefactionSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
When agents need to pass results to other agents (e.g., @process-model output feeding @mechanical-design), use these structured formats to …
- Distinctive: line 155
When you receive a handoff from another agent:
- Distinctive: line 173
When receiving a handoff, verify consistency:
- Distinctive: line 183
If a consistency check fails, alert the user before proceeding.
- Distinctive: line 187
Use when passing a complete simulation state between agents — e.g., from a process simulation agent to a mechanical design agent, or …
- Distinctive: line 264
When multiple agents produce states at different design iterations, compare them:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
NeqSim Agent Handoff Schema
When agents need to pass results to other agents (e.g., @process-model output
feeding @mechanical-design), use these structured formats to ensure no
information is lost.
Handoff Principles
- Explicit over implicit — include all parameters, don't assume the receiving agent can infer
- Units always included — every numerical value has a unit
- Code-ready — the receiving agent can directly use the values in NeqSim API calls
- Traceable — include the source agent and any assumptions made
Schema 1: Fluid Definition Handoff
Pass from @thermo-fluid to any other agent:
{
"handoff_type": "fluid_definition",
"source_agent": "thermo.fluid",
"eos_class": "SystemSrkEos",
"mixing_rule": "classic",
"temperature_K": 298.15,
"pressure_bara": 60.0,
"components": [
{"name": "methane", "mole_fraction": 0.85},
{"name": "ethane", "mole_fraction": 0.10},
{"name": "propane", "mole_fraction": 0.05}
],
"multi_phase_check": false,
"characterization": null,
"java_code": "SystemInterface fluid = new SystemSrkEos(298.15, 60.0);\nfluid.addComponent(\"methane\", 0.85);\nfluid.addComponent(\"ethane\", 0.10);\nfluid.addComponent(\"propane\", 0.05);\nfluid.setMixingRule(\"classic\");",
"assumptions": ["Lean gas — no water, no C4+ components"]
}Schema 2: Process Simulation Handoff
Pass from @process-model to @mechanical-design, @safety-depressuring, etc.:
{
"handoff_type": "process_simulation",
"source_agent": "process.model",
"fluid_definition": { "...": "Schema 1 above" },
"equipment": [
{
"name": "HP Separator",
"type": "Separator",
"inlet_temperature_C": 30.0,
"inlet_pressure_bara": 60.0,
"outlet_gas_temperature_C": 30.0,
"outlet_gas_pressure_bara": 60.0,
"outlet_liquid_temperature_C": 30.0,
"outlet_liquid_pressure_bara": 60.0,
"gas_flow_rate_kg_hr": 42000.0,
"liquid_flow_rate_kg_hr": 8000.0,
"gas_density_kg_m3": 45.2,
"liquid_density_kg_m3": 520.0
}
],
"mass_balance_error_pct": 0.001,
"energy_balance_error_pct": 0.01,
"assumptions": ["Adiabatic separator", "No liquid carryover"]
}Schema 3: Mechanical Design Handoff
Pass from @mechanical-design to @solve-task for reporting:
{
"handoff_type": "mechanical_design",
"source_agent": "mechanical.design",
"equipment_name": "HP Separator",
"design_pressure_barg": 72.0,
"design_temperature_C": 100.0,
"material_grade": "SA-516-70",
"wall_thickness_mm": 28.5,
"corrosion_allowance_mm": 3.0,
"weight_empty_kg": 15200.0,
"design_standard": "ASME VIII Div.1",
"company_tr": "Equinor TR2000",
"cost_estimate_usd": 450000.0,
"assumptions": ["Joint efficiency 0.85", "No external loads"]
}Schema 4: Flow Assurance Handoff
Pass from @flow-assurance to @solve-task or @process-model:
{
"handoff_type": "flow_assurance",
"source_agent": "flow.assurance",
"hydrate_temperature_C": 18.5,
"operating_temperature_C": 25.0,
"subcooling_margin_C": 6.5,
"hydrate_risk": "LOW",
"wax_appearance_temperature_C": -5.0,
"pipeline_pressure_drop_bar": 12.3,
"arrival_temperature_C": 8.5,
"assumptions": ["No MEG injection", "Seawater at 4 C"]
}Schema 5: Safety Analysis Handoff
Pass from @safety-depressuring to reporting:
{
"handoff_type": "safety_analysis",
"source_agent": "safety.depressuring",
"scenario": "Fire case blowdown",
"initial_pressure_bara": 85.0,
"final_pressure_bara": 6.9,
"blowdown_time_minutes": 15.0,
"minimum_temperature_C": -45.0,
"mdmt_C": -46.0,
"mdmt_margin_C": 1.0,
"psv_required_area_cm2": 12.5,
"assumptions": ["API 521 fire case", "Orifice Cd = 0.85"]
}How to Use Handoff Schemas
Sending Agent (produces the handoff)
At the end of your work, format results into the appropriate schema:
# In a notebook or agent output
handoff = {
"handoff_type": "process_simulation",
"source_agent": "process.model",
"equipment": [...],
# ... fill all fields
}
# Include in the response to the orchestrating agentReceiving Agent (consumes the handoff)
When you receive a handoff from another agent:
- Validate the handoff — check all required fields are present
- Use the values directly — temperatures, pressures, flows are ready to use
- Preserve assumptions — carry forward assumptions from the source agent
- Add your own assumptions — append to the assumptions list
Router Agent (orchestrates handoffs)
The @neqsim.help router agent manages handoffs when composing multi-agent pipelines:
- Runs Agent A, captures handoff output
- Passes handoff as context to Agent B
- Agent B uses handoff values as inputs
- Final results aggregated for user
Cross-Agent Consistency Checks
When receiving a handoff, verify consistency:
| Check | Rule |
| Temperature units | Must be in C or K (never mixed) |
| Pressure units | Must be bara (never barg or psia without conversion) |
| Flow rate units | Must include unit string |
| Mass balance | Sum of outlet flows = inlet flow (within 0.1%) |
| Phase consistency | If source says 2 phases, receiving agent should see 2 phases |
If a consistency check fails, alert the user before proceeding.
Schema 6: Lifecycle State Handoff
Use when passing a complete simulation state between agents — e.g., from a process simulation agent to a mechanical design agent, or between task iterations.
{
"schema": "neqsim-lifecycle-state",
"version": "1.0",
"handoff": {
"source_agent": "process-model",
"target_agent": "mechanical-design",
"state_type": "ProcessSystemState | ProcessModelState",
"state_name": "Gas Processing Base Case",
"state_version": "1.0.0",
"state_json": "<serialized JSON from ProcessSystemState.toJson()>",
"compressed_bytes_base64": "<optional: base64-encoded compressed bytes for large states>",
"validation": {
"is_valid": true,
"checksum": "abc123..."
},
"context": {
"description": "HP/LP separation train for 50 MMSCFD wet gas",
"key_results": {
"gas_export_rate_MSm3_day": 1.2,
"liquid_rate_m3_hr": 45.0
}
},
"assumptions": [
"SRK EOS with classic mixing rule",
"Steady-state operation at plateau rate"
]
}
}Lifecycle State Fields
| Field | Type | Required | Description |
| state_type | string | Yes | ProcessSystemState (single area) or ProcessModelState (multi-area) |
| state_name | string | Yes | Human-readable name for the state |
| state_version | string | Yes | Semver version string |
| state_json | string | Yes | Serialized JSON from state.toJson() |
| compressed_bytes_base64 | string | No | Base64-encoded compressed bytes for large states |
| validation.is_valid | boolean | Yes | Result of state.validate().isValid() |
| validation.checksum | string | No | Integrity checksum from the state object |
| context.description | string | Yes | What the process does |
| context.key_results | object | No | Summary of important results |
Creating a Lifecycle State Handoff
// Source agent creates the state
ProcessSystemState state = ProcessSystemState.fromProcessSystem(process);
state.setName("Gas Processing Base Case");
state.setVersion("1.0.0");
String stateJson = state.toJson();
boolean isValid = state.validate().isValid();
// For large states, use compressed bytes
byte[] compressed = state.toCompressedBytes();
String base64 = java.util.Base64.getEncoder().encodeToString(compressed);Consuming a Lifecycle State Handoff
// Target agent loads the state
ProcessSystemState loaded = ProcessSystemState.fromJson(handoff.state_json);
ProcessSystemState.ValidationResult result = loaded.validate();
assert result.isValid();
// For multi-area states
ProcessModelState modelState = ProcessModelState.fromJson(handoff.state_json);Version Comparison Across Handoffs
When multiple agents produce states at different design iterations, compare them:
ProcessModelState v1 = ProcessModelState.fromJson(handoff1.state_json);
ProcessModelState v2 = ProcessModelState.fromJson(handoff2.state_json);
ProcessModelState.ModelDiff diff = ProcessModelState.compare(v1, v2);
// diff.getModifiedParameters(), diff.getAddedEquipment(), diff.getRemovedEquipment()Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

