███╗ ███╗ ██████╗ ███████╗███████╗███████╗████████╗ ████╗ ████║██╔═══██╗██╔════╝██╔════╝██╔════╝╚══██╔══╝ ██╔████╔██║██║ ██║███████╗█████╗ █████╗ ██║ ██║╚██╔╝██║██║ ██║╚════██║██╔══╝ ██╔══╝ ██║ ██║ ╚═╝ ██║╚██████╔╝███████║██║ ███████╗ ██║ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚══════╝ ╚═╝
- Description
- Tech Stack
- AI Stack
- How it looks?
- Features
- Project Structure
- Commands
- How to run the project?
- License
- Author
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. The current codebase implements a chat-completion agent that is model-agnostic — you point it at whichever LLM provider and model you want to use, whether hosted or running locally — with an interactive terminal chat loop, a tool the LLM can call to save new skills, and a
/skill_namechat command that loads a saved skill back into the conversation. The agent is also told what skills are available to it at the start of every conversation, and can decide on its own to load and follow one when it fits the request. The agent can chain multiple tool calls in a row before giving a final answer. MCP server support is not yet implemented.
- Chat with the agent right from your terminal
- Chat with the agent through direct messages on Discord
- Ask the agent to create a new skill, and it will save one for later use
- Bring a saved skill into a conversation whenever you need it
- The agent knows which skills it has available and can recognize on its own when one applies, loading it without you having to ask
- The agent can work through multiple steps on its own before giving you a final answer
- The agent can search the web and read pages to answer questions that need current or specific information
- Messages are checked for things like emails, phone numbers, and other 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
- Set up or change your provider, model, and credentials anytime through a short guided prompt
- Install once and run the agent from anywhere on your machine
.
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
├── communications.py # Picks and launches the configured front-end
├── 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_servers/
│ ├── 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
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 configStart chatting. Defaults to the terminal.
mosfetStart chatting on a specific communication channel.
mosfet --<channel>
# cli, discordbash <(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.
-
Clone the repo:
git clone git@github.com:busycaesar/Mosfet.git cd Mosfet -
Create a virtual environment and install dependencies:
python3 -m venv .venv source .venv/bin/activate pip install -r req.txt -
Run the commands in Commands, replacing
mosfetwithpython3 src/main.py, e.g.:python3 src/main.py config python3 src/main.py
-
Create a
docker-compose.ymlin the project directory:services: mosfet-app: image: busycaesar/mosfet:latest volumes: - ./mosfet.config.json:/app/mosfet.config.json - ./.env:/app/.env
-
Create
mosfet.config.jsonand.envin the same directory (an empty.envand amosfet.config.jsoncontaining{}are enough to start):echo '{}' > mosfet.config.json touch .env
-
Start the container:
docker compose up -d
-
Run the commands in Commands, prefixing
mosfetwithdocker compose exec -it mosfet-app, e.g.:docker compose exec -it mosfet-app mosfet config docker compose exec -it mosfet-app mosfet
mosfet.config.jsonand.envare bind-mounted, so anythingmosfet configwrites is saved straight back to those files in your project directory.