Skip to main content

MoziChem-AI brings powerful analysis tools to your browser with AI-driven workflows.

Project description

MoziChem-AI

MoziChem-AI Logo

PyPI Downloads PyPI Version Supported Python Versions License MCP

MoziChem-AI is a modern Python-powered UI for interacting with LLM agents via LangGraph. It lets you easily configure LLM model parameters, connect to multiple Model Context Protocol (MCP) tools, and track agent reasoning in real time.

MoziChem-AI UI

Dynamic MCP Tool Management — MoziChem-AI lets you attach or detach any number of MCP tools at runtime. Once changes are made, you can restart the LangGraph agent with the updated toolset, enabling instant reconfiguration without modifying the underlying code.

MoziChem-AI MCP


🏗️ Architecture

Backend: FastAPI

  • Manages the LLM agent
  • Integrates MCP tools
  • Streams responses and agent steps

Frontend: Angular

  • Fast, reactive UI
  • Configure, interact, and track the agent

⚡ Key Features

Interactive LLM Configuration

  • Choose model provider (OpenAI, Anthropic, Gemini, etc.)
  • Select model name
  • Adjust temperature, max tokens, and more

LangGraph Agent Integration

  • Core agent defined with LangGraph
  • Supports multi-MCP connections (attach multiple external tool APIs)
  • Automatic reasoning and tool chaining

Multi-MCP Tool Support

  • Works with MoziChem-Hub or any MCP-compatible server
  • Tools range from chemistry models to general automation
  • Call MCPs independently or in combination during conversations

Response Tracking & Streaming

  • View agent steps in real time
  • Monitor MCP tool calls, inputs, and outputs
  • Ideal for debugging, transparency, and validation

📦 Dependencies

The main dependencies required for MoziChem-AI are:

fastapi[standard]>=0.115.14
langchain>=0.3.27
langchain-anthropic>=0.3.18
langchain-google-genai>=2.1.8
langchain-openai>=0.3.27
langchain-mcp-adapters>=0.1.8
langgraph>=0.6.3
pydantic>=2.11.7
pydantic-settings>=2.10.1
python-dotenv>=1.1.1
rich>=14.0.0
websockets>=15.0.1

These packages are automatically installed when you run:

pip install mozichem-ai

🚀 Get Started

  1. Install the local agent:
pip install mozichem-ai

🖥️ Launch the App

To start the MoziChem-AI agent with browser UI and MCP tool support, use the provided launch.py script:

1.Set up your environment variables

  • Create a .env file in the project root and add your API keys (e.g., OPENAI_API_KEY, LANGCHAIN_API_KEY, TAVILY_API_KEY).

2.Run the launch script

  • From the examples directory, execute:
uv run launch.py

This will:

  • Load your environment variables
  • Configure the agent and MCP sources
  • Start the FastAPI backend
  • Automatically open the browser UI for interaction

You can customize the agent prompt, model provider, and MCP sources by editing examples/launch.py.


⚙️ launch.py Method Details

The launch.py script uses the mozichem_chat method to start the agent and UI. Here are the main arguments and how to set them:

Arguments for mozichem_chat

model_provider (str)

LLM provider to use (e.g., OpenAI, Anthropic, Gemini). Example: "openai"

model_name (str)

Model name to use for the agent. Example: "gpt-4o-mini"

agent_name (str)

Name for the agent instance. Example: "MoziChemAgent"

agent_prompt (str)

System prompt for agent behavior. Example: see launch.py for a template.

mcp_source (dict)

MCP tool sources (API endpoints or remote configs). Example: see launch.py for details.

memory_mode (bool)

Enable/disable agent memory (conversation history). Example: True

open_browser (bool)

Automatically open browser UI when app starts. Example: True

How to Set Arguments

  • Edit examples/launch.py: Change values directly in the script before running.
  • Environment Variables: API keys and some config (e.g., OPENAI_API_KEY, LANGCHAIN_API_KEY) should be set in a .env file.
  • MCP Source: You can configure MCP endpoints or remote tools by editing the mcp_source dictionary in launch.py.

Example Usage

mozichem_chat(
  model_provider="openai",
  model_name="gpt-4o-mini",
  agent_name="MoziChemAgent",
  agent_prompt="You are a helpful assistant...",
  mcp_source=None,  # or your MCP config
  memory_mode=True,
  open_browser=True,
)

Refer to examples/launch.py for a full template and customize as needed for your use case.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request to improve the project.

📝 License

This project is licensed under the MIT License. You are free to use, modify, and distribute this software in your own applications or projects. However, if you choose to use this app in another app or software, please ensure that my name, Sina Gilassi, remains credited as the original author. This includes retaining any references to the original repository or documentation where applicable. By doing so, you help acknowledge the effort and time invested in creating this project.

❓ FAQ

For any questions, contact me on LinkedIn.

👨‍💻 Authors

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

mozichem_ai-0.1.0.tar.gz (227.6 kB view details)

Uploaded Source

Built Distribution

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

mozichem_ai-0.1.0-py3-none-any.whl (230.0 kB view details)

Uploaded Python 3

File details

Details for the file mozichem_ai-0.1.0.tar.gz.

File metadata

  • Download URL: mozichem_ai-0.1.0.tar.gz
  • Upload date:
  • Size: 227.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.3

File hashes

Hashes for mozichem_ai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ef59865a0d1677e8de2d6068231891499c4ac39687f241f1636e793c2b40ecaf
MD5 3f83afeb4c9b2e7815f135ef13bfc1eb
BLAKE2b-256 74c61fe72bb206cd5d04b0adde4783d269d71b03090cb0c307a118ca5e821dd6

See more details on using hashes here.

File details

Details for the file mozichem_ai-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mozichem_ai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4ee624916cb8cd402983730eceb9a63f92c1baf73c54861cd05126df913a3c3d
MD5 fe23e557e6333f821b5db5e55e3f917b
BLAKE2b-256 113615d002a87dda85c15a9c95f2944de946690e95782f4953ca15a5fabc985a

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