Skip to content

chedevlooper-creator/agent-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agent Web

Self-hosted AI agent workspace with streaming chat, tool execution, persistent sessions, and skill-based extensions. pnpm monorepo: Next.js web app, shared core/db packages, optional CLI and Electron desktop shell.

Features

  • Streaming chat — Real-time markdown responses via custom fetch + getReader() parsing of the Vercel AI SDK data stream (no useChat).
  • 14 built-in tools — Terminal, file read/write/list/search, web search/fetch, sandboxed code execution, git, read-only DB queries, API testing, knowledge search, and image generation; extend at runtime with MCP servers and plugin gateway tools.
  • Multi-provider LLM — OpenAI, OpenRouter, DeepSeek, Anthropic, and Google Gemini (bring your own API keys or custom OpenAI-compatible endpoints).
  • Persistent sessions — SQLite via Drizzle ORM and libsql; sessions and messages survive reloads.
  • Memory & knowledge — Structured memory injection into the system prompt; FTS5-backed knowledge bases for RAG.
  • Skills system — Load SKILL.md files from disk and toggle enabled skills from the UI.
  • MCP & plugins — Connect stdio MCP servers and gateway plugins; tools merge into the chat tool registry.
  • Context compression — Token counting and sliding-window trim before each request.
  • Auth — Username/password with HttpOnly session cookies.
  • Obsidian sync — Optional vault sync for sessions as markdown.
  • Docker — Dev and production Compose workflows; optional sandbox container for terminal/code execution.
  • Desktop & CLI — Electron shell (apps/desktop) and agent-web CLI entry (apps/cli).
  • Dark-first UI — Glassmorphism layout, Tailwind CSS v3, shadcn/ui primitives.

Quick Start

Prerequisites: Node.js 22+ (see Dockerfile), pnpm 9.0.0 (packageManager in root package.json).

corepack enable && corepack prepare pnpm@9.0.0 --activate
git clone <repo-url>
cd agent-web-github
pnpm install
cp .env.example .env.local   # Set at least one LLM API key (e.g. OPENAI_API_KEY)
pnpm dev                     # Turborepo: builds packages + starts Next.js → http://localhost:3000

For Docker-based development, see docs/GETTING-STARTED.md.

Key Commands

Command Description
pnpm dev Start dev servers for all workspaces (Turborepo)
pnpm build Production build for all packages and the web app
pnpm lint Run ESLint across the monorepo
pnpm format Format **/*.{ts,tsx,md} with Prettier
pnpm test Run Vitest in workspaces that define tests
pnpm docker:dev Start development stack via Docker Compose
pnpm docker:dev:down Tear down development Compose stack
pnpm docker:prod Start production Compose stack (detached)
pnpm docker:prod:down Tear down production Compose stack
pnpm --filter web dev Next.js dev server only
pnpm --filter web test Vitest unit tests for the web app
pnpm --filter web test:e2e Playwright end-to-end tests
pnpm --filter @agent-web/core build Compile @agent-web/core
pnpm --filter @agent-web/db build Compile @agent-web/db

Tech Stack

Layer Technologies (from package.json)
Monorepo pnpm 9 workspaces, Turborepo 2, Prettier 3
Web app (apps/web) Next.js 16.2.6, React 19.2.4, Tailwind CSS 3, Zustand 5, AI SDK 4 (ai, @ai-sdk/openai), NextAuth 5 beta, Vitest 4, Playwright, ESLint 9
Core (packages/core) TypeScript 5, AI SDK 4, Zod 3, Model Context Protocol SDK
Database (packages/db) Drizzle ORM 0.36, @libsql/client 0.14
Runtime packages @agent-web/model-runtime, @agent-web/agent-runtime (workspace libraries)
Desktop (apps/desktop) Electron 35
CLI (apps/cli) Node bin agent-web
Containers Docker Compose; Node 22 slim base image

Documentation

  • Getting Started — Prerequisites, installation, first run, troubleshooting
  • Architecture — Monorepo layout, chat data flow, tools, and persistence

Additional guides: Development, Testing, Configuration, Deployment.

Monorepo Layout

apps/web          # Next.js App Router UI + API routes
apps/cli          # agent-web CLI
apps/desktop      # Electron shell
packages/core     # LLM client, tools, context compression
packages/db       # Drizzle schema, SQLite client, migrations
packages/model-runtime
packages/agent-runtime

Extending

  • LLM provider — Add provider config and a branch in the chat route key resolution; update the settings UI provider list.
  • New tool — Create packages/core/src/tools/<name>.ts with tool() + Zod; register in packages/core/src/tools/registry.ts.
  • Skill — Add SKILL.md under .verdent/skills/<name>/ (or user skill dirs) with name and description frontmatter.

About

AI-powered terminal agent with streaming chat, tools, memory & skills system

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors