Skip to content

A Python agent that uses LangChain, LangGraph, and Gemini to assist with Linux tasks by executing shell commands, managing files, and searching the web—responding in a natural conversational style.

License

Notifications You must be signed in to change notification settings

jrtoriaga/linux-shell-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linux Shell Agent

A conversational Python agent powered by LangChain, LangGraph, and Gemini that assists with Linux tasks — responding with charm, wit, and a warm British accent.
It can execute shell commands, manage files, and search the web naturally.

✨ Features

  • Conversational agent for Linux Mint
  • Runs shell commands safely via ShellTool
  • File creation and text reading
  • Web search using Tavily
  • Conversation summarization and memory via LangGraph
  • Graceful exit with quit or exit

🚀 Usage

Run the agent:

python agent.py

To run in LangGraph dev mode:

langgraph dev

To exit, type exit or quit.

📁 Project Structure

core/
  ├── graph.py        # Defines the conversation graph
  ├── settings.py     # Model config
  ├── utils.py        # System prompt loader
  └── prompt.txt      # System prompt text
tools/
  ├── files.py        # File-related tools
  └── search.py       # Web search tool
agent.py              # CLI entry point
agent-graph.py        # Graph entry for LangGraph dev
langgraph.json        # LangGraph config
requirements.txt

📦 Requirements

  • Python 3.9+
  • LangChain
  • LangGraph
  • Google Generative AI
  • Tavily API key
GOOGLE_API_KEY=<YOUR-GOOGLE-API-KEY>
TAVILY_API_KEY=<YOUR-TAVILY-API-KEY>

Install dependencies:

pip install -r requirements.txt

⚙️ Versioning

This project follows Semantic Versioning:
MAJOR.MINOR.PATCH

  • MAJOR – breaking changes
  • MINOR – new features
  • PATCH – fixes and improvements

Current version: v1.1.0

📝 License

MIT

About

A Python agent that uses LangChain, LangGraph, and Gemini to assist with Linux tasks by executing shell commands, managing files, and searching the web—responding in a natural conversational style.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages