Skip to main content

fugacio-copilot

Chemical-engineering design copilot/agent for the Fugacio stack. It sits on top of fugacio.sim and turns natural-language design goals into engineering calculations: flowsheets, equipment sizing, and (eventually) techno-economic / life-cycle analysis.

The bridge between a language model and the differentiable engine is a tool registry, deterministic, JSON-in/JSON-out functions exposed with the same function-calling schemas OpenAI/Anthropic expect:

  • Properties & equilibrium: list_components, component_properties, saturation_pressure, bubble_pressure, flash_drum.
  • Molecular PC-SAFT: saft_flash, saft_density, saft_saturation_pressure, saft_bubble_pressure, and saft_residual_enthalpy, the molecular EOS preferred for associating fluids (water, alcohols).
  • Unit operations: heat_exchanger, compressor (and turbine), pump, valve, each closing a rigorous energy balance.
  • Distillation: shortcut_distillation (Fenske-Underwood-Gilliland) and rigorous_distillation (multistage column with duties).
  • Gradient-based optimization: optimize_flash_temperature and optimize_column_reflux solve for the operating variable that hits a target by differentiating straight through the equilibrium flash and the column.

A model-agnostic agent loop (run_agent) drives plan→act→answer; the planner is injected, so the loop is fully testable with a scripted planner while a real LLM drops in behind the optional llm extra.

from fugacio.copilot import call_tool, run_agent, tool_schemas

# Call an engine-backed tool directly (JSON in / JSON out):
call_tool("saturation_pressure", {"component": "propane", "temperature": 300.0})

# Or drive the agent loop with your own planner (an LLM in production):
def planner(goal, tools, transcript):
    if not transcript:
        return {"tool": "flash_drum", "arguments": {
            "components": ["methane", "propane", "n-pentane"],
            "z": [0.5, 0.3, 0.2], "flow": 100.0,
            "temperature": 320.0, "pressure": 20e5,
        }}
    vf = transcript[-1]["result"]["vapor_fraction"]
    return {"final_answer": f"vapor fraction = {vf:.3f}"}

run_agent("Flash this feed", planner).answer  # 'vapor fraction = 0.747'

tool_schemas() returns the schemas to hand an LLM. LLM-backed planning lives behind the optional llm extra:

pip install "fugacio-copilot[llm]"

Part of the fugacio namespace; installs independently: pip install fugacio-copilot.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fugacio_copilot-0.2.0.tar.gz (51.2 kB view details)

Uploaded Source

Built Distribution

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

fugacio_copilot-0.2.0-py3-none-any.whl (47.6 kB view details)

Uploaded Python 3

File details

Details for the file fugacio_copilot-0.2.0.tar.gz.

File metadata

  • Download URL: fugacio_copilot-0.2.0.tar.gz
  • Upload date:
  • Size: 51.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fugacio_copilot-0.2.0.tar.gz
Algorithm Hash digest
SHA256 05f441159cd111be4f6a72583401a8a9e3b1900cea789b16559a44c1ea4b6540
MD5 d0d592c698ebb14fcc247c4b086d8704
BLAKE2b-256 b8ddb47e155a9486a4fd0c4ff86f7f4c2aed52b5e5f9386ad57231f143eed573

See more details on using hashes here.

File details

Details for the file fugacio_copilot-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: fugacio_copilot-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 47.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fugacio_copilot-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1b8a989c8b5145c0982aa60bd10ff972df4e33f2764aa1f1e41cfb5ebcd18900
MD5 7cf880c9e91961ef16a285303f868456
BLAKE2b-256 e9ce0f22798250731beca1f3c52be00c82d8a7c7a5e68481996682e79891741a

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 Sentry Error logging StatusPage Status page