Skip to content

Repository files navigation

███╗   ███╗ ██████╗ ███████╗███████╗███████╗████████╗
████╗ ████║██╔═══██╗██╔════╝██╔════╝██╔════╝╚══██╔══╝
██╔████╔██║██║   ██║███████╗█████╗  █████╗     ██║
██║╚██╔╝██║██║   ██║╚════██║██╔══╝  ██╔══╝     ██║
██║ ╚═╝ ██║╚██████╔╝███████║██║     ███████╗   ██║
╚═╝     ╚═╝ ╚═════╝ ╚══════╝╚═╝     ╚══════╝   ╚═╝

Index

Description

Mosfet is an LLM-powered agent that you extend by adding Skills, Tools and MCP Servers. Each skill describes a capability or piece of knowledge the agent can draw on, tools let it take action, and MCP servers connect it to external systems. The goal is to empower the LLM by simply dropping in more of these building blocks.

Status: early-stage / work in progress. A model-agnostic chat agent that reasons through multiple tool calls before answering, extending itself with skills and MCP servers along the way, with guardrails checking what goes in and out.

Tech Stack

Image Alt

AI Stack

How it looks?

CLI

looks

Discord

discord

Features

  • Chat with the agent through your terminal or other communication channels.
  • The agent can create skills for itself and reuse them whenever they apply.
  • Connect the agent to MCP servers so it can use their tools.
  • The agent can work through multiple steps on its own before giving you a final answer.
  • See what the agent is doing as it works, like loading a skill or calling a tool, instead of just watching a spinner.
  • Messages are checked for sensitive personal information before they reach the LLM and before a response reaches you.
  • Point the agent at whichever LLM provider and model you want, hosted or local, and change it anytime.
  • Install once and run the agent from anywhere on your machine.

Project Structure

.
 src/
 ├── main.py                     # Entry point
 ├── llm.py                      # Guarded LLM entry point used by the agent loop
 ├── config_setup.py             # Guided setup/update for provider config and credentials
 ├── core/                       # Agent loop and skill/tool orchestration
 ├── adapters/                   # Per-provider LLM and web-search adapters behind common interfaces
 │    ├── llm_providers/
 │    └── web_search_providers/
 ├── config/                     # Provider selection, seed messages, and shared paths
 ├── extensions/                 # Skills, tools, and MCP servers available to the agent
 │    ├── mcp/
 │    ├── skills/
 │    └── tools/
 ├── guardrails/                 # Content checks run on messages going into and out of the LLM
 ├── ui/                         # Front-ends: terminal chat loop and Discord bot
 └── utils/                      # Shared helpers used across the codebase
 scripts/
 ├── install.sh                  # Installs Mosfet into ~/.mosfet and adds `mosfet` to PATH
 ├── publish_docker_beta.sh      # Builds and pushes the beta Docker image
 └── restart_docker.sh           # Restarts the local Mosfet container

Commands

Every option below runs the same commands, just with a different prefix in place of mosfet. The commands themselves:

Set up or update your provider, model, and web search provider, prompting for whichever credentials you need. Run it again anytime to change your setup. Rarely-changed settings like Ollama's server URL or Anthropic's response length cap live in src/config/advanced_providers.py if you ever need to adjust them.

mosfet config

Start chatting. Defaults to the terminal.

mosfet

Start chatting on Discord. Runs in the background by default so you don't need to keep a terminal open for it.

mosfet discord              # start in the background
mosfet discord --foreground # attach to this terminal instead
mosfet discord --stop       # stop a background bot

How to run the project?

Option 1: Install script

bash <(curl -fsSL https://mosfet.shahtech.info)

This clones the latest Mosfet release, sets up an isolated Python environment, and installs a mosfet command on your PATH. Once it finishes, run the commands in Commands as they are.

Option 2: Manual setup (for development)

  1. Clone the repo:

    git clone git@github.com:busycaesar/Mosfet.git
    cd Mosfet
  2. Create a virtual environment and install dependencies:

    python3 -m venv .venv
    source .venv/bin/activate
    pip install -r req.txt
  3. Run the commands in Commands, replacing mosfet with python3 src/main.py, e.g.:

    python3 src/main.py config
    python3 src/main.py

Option 3: Docker

  1. Create a docker-compose.yml in the project directory:

    services:
      mosfet-app:
        image: busycaesar/mosfet:latest
        volumes:
          - ./mosfet.config.json:/app/mosfet.config.json
          - ./.env:/app/.env
  2. Create mosfet.config.json and .env in the same directory (an empty .env and a mosfet.config.json containing {} are enough to start):

    echo '{}' > mosfet.config.json
    touch .env
  3. Start the container:

    docker compose up -d
  4. Run the commands in Commands, prefixing mosfet with docker compose exec -it mosfet-app, e.g.:

    docker compose exec -it mosfet-app mosfet config
    docker compose exec -it mosfet-app mosfet

    mosfet.config.json and .env are bind-mounted, so anything mosfet config writes is saved straight back to those files in your project directory.

License

MIT

Author

Dev J. Shah

About

Mosfet is an LLM-powered agent you extend by skill files, tools and MCP servers into designated directories, so the LLM can draw on them to answer questions and carry out workflows.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages