Docs · Start
What Sentinel is
Sentinel is a coding agent that lives in your terminal. It streams answers from your choice of LLM, reads and edits files through a sandboxed local tool set, manages chat sessions as plain JSON on disk, and optionally exposes itself to other AI tools over MCP.
What's inside
bin/sentinel.js: entry point (TUI / ask / mcp / --version)src/agent/: loop, providers, tools glue, cost, sessions, promptsrc/shared/tools/: read, write, edit, glob, grep, bash…src/shared/models/: registry + live discovery from provider APIssrc/tui/: the Ink (React) terminal UImcp/: MCP stdio server (health, ask, review-diff)
The agent loop
src/agent/loop.js is the whole brain: user input → stream from provider → execute tool calls in-process (sandboxed to the project directory) → feed results back → repeat until done or MAX_ITERATIONS. It yields typed events (text, tool_call, tool_result, finish, error) that both the TUI and CLI consume.
bin/sentinel.js entry point
src/cli/main.js ask, version, help
src/agent/ loop, providers, sessions
src/shared/tools/ sandboxed local tools
src/tui/ Ink terminal UI
mcp/ stdio server