| 
1 |  | -# 🚀 Agentic - Production-Ready TUI Framework  | 
 | 1 | +# Agentic  | 
2 | 2 | 
 
  | 
3 |  | -[](https://github.com/gitcoder89431/agentic/actions/workflows/rust.yml)  | 
4 |  | -[](https://opensource.org/licenses/MIT)  | 
 | 3 | +```  | 
 | 4 | +    █████╗  ██████╗ ███████╗███╗   ██╗████████╗██╗ ██████╗  | 
 | 5 | +   ██╔══██╗██╔════╝ ██╔════╝████╗  ██║╚══██╔══╝██║██╔════╝  | 
 | 6 | +   ███████║██║  ███╗█████╗  ██╔██╗ ██║   ██║   ██║██║       | 
 | 7 | +   ██╔══██║██║   ██║██╔══╝  ██║╚██╗██║   ██║   ██║██║       | 
 | 8 | +   ██║  ██║╚██████╔╝███████╗██║ ╚████║   ██║   ██║╚██████╗  | 
 | 9 | +   ╚═╝  ╚═╝ ╚═════╝ ╚══════╝╚═╝  ╚═══╝   ╚═╝   ╚═╝ ╚═════╝  | 
 | 10 | +```  | 
5 | 11 | 
 
  | 
6 |  | -> **Version:** 0.1.0    | 
7 |  | -> **Status:** Production Ready ✅  | 
 | 12 | +[](https://github.com/gitcoder89431/agentic/actions)  | 
 | 13 | +[](LICENSE)  | 
 | 14 | +[](https://crates.io/crates/agentic)  | 
8 | 15 | 
 
  | 
9 |  | -A beautiful, responsive terminal user interface (TUI) application built with modern Rust architecture. Features Everforest theming, Taffy flexbox layouts, and comprehensive event handling.  | 
 | 16 | +**Agentic :: The agent you work WITH**    | 
 | 17 | +**AI Model Orchestrator & Agent Framework**  | 
10 | 18 | 
 
  | 
11 |  | -## 🎨 Features  | 
 | 19 | +<!-- GIF Demo placeholder - add your demo GIF here -->  | 
 | 20 | +  | 
12 | 21 | 
 
  | 
13 |  | -- **🌲 Everforest Theme System**: Dark/Light theme variants with runtime switching  | 
14 |  | -- **📐 Responsive Layouts**: Taffy-powered flexbox-style layout engine  | 
15 |  | -- **⚡ Event-Driven Architecture**: Clean async/await with proper state management    | 
16 |  | -- **🔧 Production Ready**: Comprehensive CI/CD pipeline with quality gates  | 
17 |  | -- **🎯 Zero Dependencies**: Minimal, focused dependency tree  | 
18 |  | -- **✨ Beautiful ASCII Art**: Elegant logo with centered presentation  | 
 | 22 | +## Core Philosophy  | 
19 | 23 | 
 
  | 
20 |  | -## 🚀 Quick Start  | 
 | 24 | +Agentic transforms the typical command-response dynamic into true collaboration. Instead of barking orders at an AI, you work together through thoughtful query refinement and synthesis. Our "Karesansui" design philosophy creates a zen garden of computational thought - clean, minimalist, and purposeful. Every interaction flows like carefully placed stones in sand, building toward profound understanding rather than quick answers.  | 
21 | 25 | 
 
  | 
22 |  | -### Prerequisites  | 
 | 26 | +## Key Features  | 
23 | 27 | 
 
  | 
24 |  | -- **Rust 1.70+** (tested with latest stable)  | 
25 |  | -- **Terminal** with true color support recommended  | 
 | 28 | +• **Collaborative Query Refinement** via a Local AI Orchestrator    | 
 | 29 | +• **Seamless Integration** with Powerful Cloud Models (via OpenRouter)    | 
 | 30 | +• **Minimalist, Keyboard-Driven** "Zen Garden" TUI    | 
 | 31 | +• **Creates Structured, "Atomic Notes"** (Markdown + YAML) for your Knowledge Base    | 
 | 32 | +• **Built in Rust** 🦀 for a Fast, Native Experience  | 
26 | 33 | 
 
  | 
27 |  | -### Installation & Running  | 
 | 34 | +## Installation  | 
28 | 35 | 
 
  | 
29 |  | -```bash  | 
30 |  | -# Clone the repository  | 
31 |  | -git clone https://github.com/gitcoder89431/agentic.git  | 
32 |  | -cd agentic  | 
 | 36 | +### Download Release Binaries  | 
33 | 37 | 
 
  | 
34 |  | -# Run the application  | 
35 |  | -cargo run  | 
36 |  | - | 
37 |  | -# Or build for release  | 
38 |  | -cargo build --release  | 
39 |  | -./target/release/agentic  | 
 | 38 | +**macOS (Intel/Apple Silicon)**  | 
 | 39 | +```bash  | 
 | 40 | +curl -L https://github.com/gitcoder89431/agentic/releases/download/v0.1.0/agentic-macos.tar.gz | tar xz  | 
 | 41 | +sudo mv agentic /usr/local/bin/  | 
40 | 42 | ```  | 
41 | 43 | 
 
  | 
42 |  | -### Controls  | 
43 |  | - | 
44 |  | -- **ESC / q**: Quit application    | 
45 |  | -- **t / T**: Toggle between Dark/Light themes  | 
46 |  | -- **Ctrl+C**: Force quit with signal handling  | 
47 |  | -- **Terminal Resize**: Automatic layout recalculation  | 
48 |  | - | 
49 |  | -## 🛠️ Development  | 
50 |  | - | 
51 |  | -### Local Development  | 
52 |  | - | 
53 |  | -Before pushing changes, run these checks locally:  | 
54 |  | - | 
 | 44 | +**Linux (x86_64)**    | 
55 | 45 | ```bash  | 
56 |  | -# Format code  | 
57 |  | -cargo fmt  | 
58 |  | - | 
59 |  | -# Check formatting  | 
60 |  | -cargo fmt --check  | 
61 |  | - | 
62 |  | -# Run lints    | 
63 |  | -cargo clippy -- -D warnings  | 
64 |  | - | 
65 |  | -# Run tests  | 
66 |  | -cargo test  | 
67 |  | - | 
68 |  | -# Check compilation  | 
69 |  | -cargo check  | 
 | 46 | +curl -L https://github.com/gitcoder89431/agentic/releases/download/v0.1.0/agentic-linux.tar.gz | tar xz  | 
 | 47 | +sudo mv agentic /usr/local/bin/  | 
70 | 48 | ```  | 
71 | 49 | 
 
  | 
72 |  | -### 🔧 CI/CD Pipeline  | 
 | 50 | +**Windows**  | 
 | 51 | +```powershell  | 
 | 52 | +# Download from releases page and add to PATH  | 
 | 53 | +# https://github.com/gitcoder89431/agentic/releases/download/v0.1.0/agentic-windows.zip  | 
 | 54 | +```  | 
73 | 55 | 
 
  | 
74 |  | -Our GitHub Actions CI pipeline ensures code quality with multiple validation layers:  | 
 | 56 | +### Build from Source  | 
 | 57 | +```bash  | 
 | 58 | +git clone https://github.com/gitcoder89431/agentic.git  | 
 | 59 | +cd agentic  | 
 | 60 | +cargo build --release  | 
 | 61 | +./target/release/agentic-tui  | 
 | 62 | +```  | 
75 | 63 | 
 
  | 
76 |  | -#### Pipeline Jobs  | 
 | 64 | +## Configuration  | 
77 | 65 | 
 
  | 
78 |  | -1. **🏗️ Build & Test** (`build_and_test`)  | 
79 |  | -   - Code formatting validation (`cargo fmt --check`)  | 
80 |  | -   - Lint checking with zero warnings (`cargo clippy -- -D warnings`)  | 
81 |  | -   - Compilation verification (`cargo build --verbose`)  | 
82 |  | -   - Test suite execution (`cargo test --verbose`)  | 
 | 66 | +⚠️ **Important**: Agentic requires **BOTH** a local AI model (for query orchestration) and a cloud model (for synthesis) to function. The local model privately refines your questions, then the cloud model creates the final insights.  | 
83 | 67 | 
 
  | 
84 |  | -2. **🛡️ Security Audit** (`security_audit`)  | 
85 |  | -   - Vulnerability scanning with `cargo audit`  | 
86 |  | -   - Checks for known security issues in dependencies  | 
 | 68 | +### Complete Setup Guide  | 
87 | 69 | 
 
  | 
88 |  | -3. **📦 Dependency Check** (`check_dependencies`)  | 
89 |  | -   - Validates dependency freshness with `cargo outdated`  | 
90 |  | -   - Ensures we're using up-to-date packages  | 
 | 70 | +Follow these steps in order - you need both components:  | 
91 | 71 | 
 
  | 
92 |  | -#### Trigger Conditions  | 
 | 72 | +#### Step 1: Local AI Setup (Required)  | 
93 | 73 | 
 
  | 
94 |  | -- **Pushes to `main`**: Full pipeline execution  | 
95 |  | -- **Pull Requests**: All jobs run before merge approval  | 
96 |  | -- **Manual triggers**: Available via GitHub Actions UI  | 
 | 74 | +1. **Install Ollama** (Free, runs on your computer)  | 
 | 75 | +   ```bash  | 
 | 76 | +   # macOS  | 
 | 77 | +   brew install ollama  | 
 | 78 | +     | 
 | 79 | +   # Or download from: https://ollama.ai  | 
 | 80 | +   ```  | 
97 | 81 | 
 
  | 
98 |  | -#### Performance Optimizations  | 
 | 82 | +2. **Download a Local Model**  | 
 | 83 | +   ```bash  | 
 | 84 | +   # Start Ollama service  | 
 | 85 | +   ollama serve  | 
 | 86 | +     | 
 | 87 | +   # In another terminal, pull a model (this may take a few minutes)  | 
 | 88 | +   ollama pull llama3.2:3b    # Good balance of speed/quality  | 
 | 89 | +   # or  | 
 | 90 | +   ollama pull qwen2.5:7b     # Higher quality, needs more RAM  | 
 | 91 | +   ```  | 
99 | 92 | 
 
  | 
100 |  | -- **Cargo Registry Cache**: Speeds up dependency downloads  | 
101 |  | -- **Target Directory Cache**: Accelerates compilation   | 
102 |  | -- **Hash-Based Invalidation**: Efficient cache management with `Cargo.lock`  | 
 | 93 | +3. **Configure in Agentic**  | 
 | 94 | +   - In Settings, set "Local Endpoint" to `localhost:11434`  | 
 | 95 | +   - Select your downloaded model from the list  | 
 | 96 | +   - This handles initial query refinement privately on your machine  | 
103 | 97 | 
 
  | 
104 |  | -#### Common Failure Scenarios & Fixes  | 
 | 98 | +#### Step 2: Cloud Setup (Required)  | 
105 | 99 | 
 
  | 
106 |  | -| Error | Cause | Fix |  | 
107 |  | -|-------|-------|-----|  | 
108 |  | -| `cargo fmt --check failed` | Inconsistent formatting | Run `cargo fmt` locally |  | 
109 |  | -| `cargo clippy warnings` | Lint violations | Fix warnings or use `#[allow(...)]` |  | 
110 |  | -| `tests failed` | Broken functionality | Fix failing tests |  | 
111 |  | -| `security vulnerabilities` | Outdated dependencies | Run `cargo audit fix` |  | 
 | 100 | +1. **Get an OpenRouter Account**  | 
 | 101 | +   - Visit [openrouter.ai](https://openrouter.ai) and sign up (takes 2 minutes)  | 
 | 102 | +   - Generate an API key from your dashboard  | 
 | 103 | +   - Add $5-10 credit OR use free models (see guide below)  | 
112 | 104 | 
 
  | 
113 |  | -### 🏗️ Architecture  | 
 | 105 | +2. **Configure in Agentic**  | 
 | 106 | +   - Run `agentic` in your terminal  | 
 | 107 | +   - Press `s` to open Settings  | 
 | 108 | +   - Navigate to "Cloud API Key" and paste your OpenRouter key  | 
 | 109 | +   - Browse available models and select one (see model selection guide below)  | 
 | 110 | +   - Press `s` to save  | 
114 | 111 | 
 
  | 
115 |  | -```  | 
116 |  | -┌─────────────────────────────────────────────────────────┐  | 
117 |  | -│                    AGENTIC TUI                          │  | 
118 |  | -├─────────────────────────────────────────────────────────┤  | 
119 |  | -│  Event System     │  Theme Engine    │  Layout Engine   │  | 
120 |  | -│  ──────────────   │  ─────────────   │  ─────────────   │  | 
121 |  | -│  • AppEvent       │  • Everforest    │  • Taffy 3-Layer │  | 
122 |  | -│  • AppState       │  • Dark/Light    │  • Header/Body   │  | 
123 |  | -│  • Async Runtime  │  • Runtime Switch│  • Footer/Flex   │  | 
124 |  | -├─────────────────────────────────────────────────────────┤  | 
125 |  | -│                    Ratatui Core                         │  | 
126 |  | -│                  Crossterm Backend                      │  | 
127 |  | -└─────────────────────────────────────────────────────────┘  | 
128 |  | -```  | 
 | 112 | +### 🎯 Model Selection Guide  | 
129 | 113 | 
 
  | 
130 |  | -### 📁 Project Structure  | 
 | 114 | +When choosing a cloud model in Agentic's settings, look for these indicators:  | 
131 | 115 | 
 
  | 
132 |  | -```  | 
133 |  | -agentic/  | 
134 |  | -├── .github/workflows/    # CI/CD pipeline configuration  | 
135 |  | -├── src/  | 
136 |  | -│   ├── events.rs        # Event handling & state management  | 
137 |  | -│   ├── layout.rs        # Taffy flexbox layout engine  | 
138 |  | -│   ├── theme.rs         # Everforest theme system    | 
139 |  | -│   ├── ui/              # User interface components  | 
140 |  | -│   │   ├── app.rs       # Main application logic  | 
141 |  | -│   │   └── mod.rs       # UI module declarations  | 
142 |  | -│   ├── lib.rs           # Library root  | 
143 |  | -│   └── main.rs          # Application entry point  | 
144 |  | -├── examples/            # Demo applications  | 
145 |  | -├── Cargo.toml          # Project dependencies  | 
146 |  | -└── README.md           # Project documentation  | 
147 |  | -```  | 
 | 116 | +**💰 Cost Structure:**  | 
 | 117 | +- Models with `:free` suffix = Completely free (perfect for learning)  | 
 | 118 | +- Models with pricing = Pay per token (~$0.50-10 per 1M tokens)  | 
 | 119 | +- Check the "pricing" column to see prompt/completion costs  | 
148 | 120 | 
 
  | 
149 |  | -## 🧪 Testing  | 
 | 121 | +**🧠 Model Types:**  | 
 | 122 | +- Look for `:instruct` or `:chat` in the name = Good for conversations (what you want)  | 
 | 123 | +- Avoid `:base` models = Raw models without instruction training  | 
 | 124 | +- Avoid `:embed` models = For embeddings only, not chat  | 
150 | 125 | 
 
  | 
151 |  | -### Unit Tests  | 
 | 126 | +**📏 Context Length:**  | 
 | 127 | +- 4k-8k tokens = Good for short conversations    | 
 | 128 | +- 32k-128k tokens = Better for longer discussions  | 
 | 129 | +- 1M+ tokens = Can handle very long contexts (costs more)  | 
152 | 130 | 
 
  | 
153 |  | -```bash  | 
154 |  | -# Run all tests  | 
155 |  | -cargo test  | 
 | 131 | +**🏷️ Model Families:**  | 
 | 132 | +- `anthropic/claude-*` = Excellent reasoning and safety  | 
 | 133 | +- `openai/gpt-*` = Well-rounded performance  | 
 | 134 | +- `meta-llama/*` = Open source, good quality  | 
 | 135 | +- `google/gemini-*` = Strong at analysis and coding  | 
 | 136 | +- `deepseek/*` = Often have free versions available  | 
156 | 137 | 
 
  | 
157 |  | -# Run tests with output  | 
158 |  | -cargo test -- --nocapture  | 
 | 138 | +**💡 Beginner Tips:**  | 
 | 139 | +- Start with any `:free` model to test the system  | 
 | 140 | +- If you have credits, try `anthropic/claude-3.5-sonnet` for quality  | 
 | 141 | +- Higher context length = more expensive but can handle longer discussions  | 
 | 142 | +- The model list updates frequently - newer models often perform better  | 
159 | 143 | 
 
  | 
160 |  | -# Run specific test  | 
161 |  | -cargo test test_name  | 
162 |  | -```  | 
 | 144 | +#### Step 3: Ready to Collaborate!  | 
163 | 145 | 
 
  | 
164 |  | -### Manual Testing  | 
 | 146 | +- Type your question naturally  | 
 | 147 | +- Watch the local model orchestrate thoughtful proposals  | 
 | 148 | +- Choose a proposal for the cloud model to synthesize  | 
 | 149 | +- Save the resulting "atomic note" to your knowledge base  | 
 | 150 | +- **Files are automatically saved** to `~/Documents/ruixen/` as Markdown with YAML metadata  | 
165 | 151 | 
 
  | 
166 |  | -```bash  | 
167 |  | -# Theme demo  | 
168 |  | -cargo run --example theme_demo  | 
 | 152 | +### Why Both Models?  | 
169 | 153 | 
 
  | 
170 |  | -# Layout demo    | 
171 |  | -cargo run --example layout_demo  | 
 | 154 | +The **local model** (Ollama) handles query orchestration privately on your machine, while the **cloud model** (OpenRouter) provides powerful synthesis capabilities. This hybrid approach gives you both privacy and cutting-edge AI performance!  | 
172 | 155 | 
 
  | 
173 |  | -# Input handling demo  | 
174 |  | -cargo run --example issue_4_demo  | 
175 |  | -```  | 
 | 156 | +### Troubleshooting  | 
176 | 157 | 
 
  | 
177 |  | -## 📦 Dependencies  | 
 | 158 | +**"Local endpoint not accessible"**  | 
 | 159 | +- Make sure Ollama is running: `ollama serve`  | 
 | 160 | +- Check the endpoint in settings: `localhost:11434`  | 
178 | 161 | 
 
  | 
179 |  | -### Core Dependencies  | 
180 |  | -- **ratatui** (0.27): Terminal UI framework  | 
181 |  | -- **crossterm** (0.27): Cross-platform terminal handling  | 
182 |  | -- **tokio** (1.0): Async runtime    | 
183 |  | -- **taffy** (0.4): Flexbox layout engine  | 
 | 162 | +**"OpenRouter API key invalid"**    | 
 | 163 | +- Verify your key starts with `sk-or-v1-`  | 
 | 164 | +- Check you have credits or selected a free model  | 
184 | 165 | 
 
  | 
185 |  | -### Development Dependencies  | 
186 |  | -- **GitHub Actions**: Automated CI/CD  | 
187 |  | -- **cargo-audit**: Security vulnerability scanning  | 
188 |  | -- **cargo-outdated**: Dependency freshness checks  | 
 | 166 | +**"Model not found"**  | 
 | 167 | +- For local: ensure model is downloaded with `ollama list`  | 
 | 168 | +- For cloud: verify model name exactly matches OpenRouter's list  | 
 | 169 | + | 
 | 170 | +## Usage  | 
 | 171 | + | 
 | 172 | +**Navigation**  | 
 | 173 | +- `Tab/Shift+Tab` - Navigate between UI elements  | 
 | 174 | +- `↑/↓ or j/k` - Move through lists and proposals    | 
 | 175 | +- `Enter` - Select/Confirm actions  | 
 | 176 | +- `Esc` - Return to previous screen  | 
 | 177 | +- `q` - Quit application  | 
 | 178 | + | 
 | 179 | +**Slash Commands**  | 
 | 180 | +- `/settings` - Open configuration modal  | 
 | 181 | +- `/about` - View application information    | 
 | 182 | +- `/quit` - Exit the application  | 
 | 183 | + | 
 | 184 | +**Key Bindings**  | 
 | 185 | +- `s` - Quick access to Settings  | 
 | 186 | +- `a` - Quick access to About  | 
 | 187 | +- `Left/Right` - Scroll through About page content  | 
189 | 188 | 
 
  | 
190 |  | -## 🤝 Contributing  | 
 | 189 | +## Architecture  | 
191 | 190 | 
 
  | 
192 |  | -1. **Fork** the repository  | 
193 |  | -2. **Create** a feature branch (`git checkout -b feature/amazing-feature`)  | 
194 |  | -3. **Run** local checks (`cargo fmt && cargo clippy && cargo test`)  | 
195 |  | -4. **Commit** changes (`git commit -m 'Add amazing feature'`)  | 
196 |  | -5. **Push** to branch (`git push origin feature/amazing-feature`)  | 
197 |  | -6. **Open** a Pull Request  | 
 | 191 | +Agentic follows the RuixenOS workspace architecture:  | 
198 | 192 | 
 
  | 
199 |  | -### Pull Request Process  | 
 | 193 | +```  | 
 | 194 | +agentic/  | 
 | 195 | +├── crates/  | 
 | 196 | +│   ├── agentic-core/     # The "motor" - reusable AI logic  | 
 | 197 | +│   ├── agentic-tui/      # The "drill" - terminal interface    | 
 | 198 | +│   └── starlit-gui/      # Future graphical interface  | 
 | 199 | +└── Cargo.toml            # Workspace configuration  | 
 | 200 | +```  | 
200 | 201 | 
 
  | 
201 |  | -- ✅ All CI checks must pass (formatting, lints, tests, security)  | 
202 |  | -- ✅ Code must follow Rust best practices  | 
203 |  | -- ✅ Include tests for new functionality    | 
204 |  | -- ✅ Update documentation as needed  | 
 | 202 | +This modular design allows the same AI capabilities to power multiple interfaces while maintaining clean separation between logic and presentation.  | 
205 | 203 | 
 
  | 
206 |  | -## 📄 License  | 
 | 204 | +## License  | 
207 | 205 | 
 
  | 
208 |  | -This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.  | 
 | 206 | +MIT License - see [LICENSE](LICENSE) for details.  | 
209 | 207 | 
 
  | 
210 |  | -## 🙏 Acknowledgments  | 
 | 208 | +## Contributing  | 
211 | 209 | 
 
  | 
212 |  | -- **Ratatui Community** for the excellent TUI framework  | 
213 |  | -- **Taffy Team** for the powerful layout engine    | 
214 |  | -- **Everforest** color scheme for beautiful aesthetics  | 
215 |  | -- **Rust Community** for amazing tooling and ecosystem  | 
 | 210 | +Built with constitutional Rust patterns and love. Issues and PRs welcome!  | 
216 | 211 | 
 
  | 
217 | 212 | ---  | 
218 | 213 | 
 
  | 
219 |  | -**Built with ❤️ using Rust** 🦀  | 
 | 214 | +*The curiosity machine doesn't just process queries - it awakens wonder.*  | 
0 commit comments