Skip to content

guillermolc/agentic-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

agentic-react

agentic-react bridges the gap between business users and AI-powered software development. By wrapping GitHub Copilot's agentic capabilities in a clean, intuitive interface, it empowers product managers, business analysts, and stakeholders to actively participate in the Software Development Lifecycle β€” no IDE or CLI required.

Simply point it at any GitHub or Bitbucket repository, describe what you need, and a chained pipeline of AI agents does the heavy lifting:

  • πŸ” Deep Research β€” understands the existing codebase.
  • πŸ“‹ PRD Writer β€” translates ideas into product requirements.
  • πŸ“ Technical Docs β€” produces developer-ready specifications.

Each agent hands off its output to the next, streaming results in real time. The result? Business users can drive spec creation, align with engineering early, and accelerate delivery β€” turning GitHub Copilot from a developer tool into a shared team superpower.


Table of Contents


Features

  • 6 AI agents β€” Deep Research β†’ PRD Writer β†’ Technical Docs form the analysis pipeline, with Spec Writer, PRD Repo Writer, and Issue Creator as action agents
  • 3 action agents β€” Spec Writer creates spec branches/PRs, PRD Repo Writer creates PRD docs on repo, Issue Creator creates GitHub issues β€” all triggered from post-action buttons
  • Repository targeting β€” search and clone any GitHub or Bitbucket Server repository; agents run directly inside the cloned repo
  • Streaming chat β€” real-time SSE streaming powered by the GitHub Copilot SDK and Google Vertex AI
  • Agent handoff β€” forward one agent's output as context to the next with a single click
  • Knowledge Base (KDB) β€” attach Copilot Spaces or external KDB-Vector-Grafo instances to inject reference context into agent sessions
  • Atlassian integration β€” search Jira issues and Confluence pages, download them as Markdown context documents, auto-inject into agent sessions
  • WorkIQ integration β€” search Microsoft 365 data (emails, meetings, documents, Teams) and attach results as context
  • Parallel context gathering β€” all context sources (handoff, Copilot Spaces, WorkIQ, KDB, Atlassian) are fetched concurrently via Promise.allSettled β€” a single source failure never aborts a run
  • Multi-provider LLM β€” choose between GitHub Copilot and Google Vertex AI (Gemini) at runtime via the model selector in the agent page header
  • Dashboard β€” session history and activity log persisted in SQLite (backend); per-session and bulk delete, per-session export to Markdown
  • Admin panel β€” create, view, and edit agents (model, tools, prompt) at runtime from /admin/agents β€” backed by SQLite
  • Feature flags β€” toggle visibility of KDB, WorkIQ, Atlassian, and action buttons from /settings
  • Quick prompts β€” one-click prompt buttons on PRD and Technical Docs agents to auto-fill context-based prompts
  • Bitbucket Server support β€” clone and search Bitbucket Server repositories with PAT-based auth and self-signed SSL support
  • Server-side auth β€” all LLM and integration credentials live in backend/.env β€” no secrets stored in the browser

Architecture

flowchart TD
    Browser["πŸ–₯ Next.js Frontend\nlocalhost:3000"]
    Backend["βš™οΈ Express Backend\nlocalhost:3001"]
    SDK["@github/copilot-sdk"]
    Vertex["☁️ Google Vertex AI\n(Gemini)"]
    GitHub["☁️ GitHub API\n+ Copilot Spaces"]
    Bitbucket["🏒 Bitbucket Server\n(on-prem)"]
    Atlassian["🏒 Jira / Confluence\n(on-prem)"]
    WorkIQ["πŸ’Ό WorkIQ MCP\n(M365: email Β· meetings Β· docs)"]
    Disk[("πŸ’Ύ ~/work/user/repo\nCloned repositories")]
    DB[("πŸ—„ SQLite\nagents.db")]

    Browser -- "REST + SSE" --> Backend
    Backend -- "Copilot SDK sessions" --> SDK
    SDK -- "tool execution\ngrep / glob / bash" --> Disk
    Backend -- "Gemini API streaming" --> Vertex
    Backend -- "git clone / gh CLI" --> GitHub
    Backend -- "git clone + PAT" --> Bitbucket
    Backend -- "search + download" --> Atlassian
    Backend -- "MCP proxy" --> WorkIQ
    Backend -- "agent CRUD\nsessions Β· messages\nactivity" --> DB
    SDK --> GitHub
Loading
Layer Responsibilities
Frontend / Agent selector Β· /agents/[slug] Streaming chat Β· /dashboard Session history Β· /kdb Knowledge Base Β· /settings Feature flags Β· /admin/agents Agent CRUD editor. Active-repo state via AppProvider (React Context) + localStorage; sessions/messages/activity fetched from the backend API.
Backend REST + SSE API. Clones repos via gh (GitHub) or git (Bitbucket). Routes agent runs to Copilot SDK or Vertex AI. Proxies Atlassian, WorkIQ, and KDB requests. Persists agent configs, sessions, messages, and activity events in SQLite.
Copilot SDK Agent sessions via @github/copilot-sdk with tool permissions (grep, glob, view, bash) defined per agent in the database.
Vertex AI Gemini models via @google/genai β€” same SSE streaming interface as Copilot, selectable at runtime.
Atlassian Jira issue + Confluence page search; pages are converted to Markdown via Turndown and stored as context documents on disk.
WorkIQ M365 queries (emails, meetings, docs, Teams) proxied via the WorkIQ MCP CLI and injected as agent context.

The backend persists agent configs, sessions, messages, and activity events in agents.db (SQLite). The only client-side state is the active repository selection, stored in localStorage.

For detailed sequence diagrams see ARCHITECTURE.md.


Technology Stack

Layer Technology
Frontend framework Next.js 16 (App Router, Turbopack)
UI language React 18, TypeScript 5
Styling Tailwind CSS 3.4
Icons Lucide React ^0.462
Markdown rendering react-markdown ^10.1, remark-gfm ^4.0
Linting ESLint (via Next.js)
Backend runtime Node.js 18+ (ESM β€” "type": "module")
Backend framework Express 4.21
Backend language TypeScript 5 (ES2022, NodeNext)
AI SDK (Copilot) @github/copilot-sdk ^0.1.25
AI SDK (Vertex) @google/genai ^1.45
MCP client @modelcontextprotocol/sdk ^1.27
Database better-sqlite3 ^12.8 (SQLite β€” agent configs)
HTML β†’ Markdown turndown ^7.2 + cheerio ^1.2 (Atlassian doc conversion)
Agent config YAML ^2.8 (seed files only)
Dev tooling nodemon, tsx, concurrently ^9
Monorepo npm workspaces

Getting Started

Prerequisites

Requirement Version Notes
Node.js 18+ nodejs.org
GitHub CLI (gh) Latest cli.github.com β€” must be authenticated (gh auth login)
GitHub Personal Access Token β€” See token requirements below β€” create one

PAT Permissions

Classic token β€” check these scopes: repo, read:user, copilot

Fine-grained token β€” select the following:

  • Account permissions: Copilot Editor Chat β†’ Read-only
  • Repository permissions: Contents β†’ Read-only, Metadata β†’ Read-only (auto-selected)

Fine-grained tokens must be scoped to your personal account (not just an org) for the Copilot Spaces API to work.

Install

From the repository root, install dependencies for all workspaces at once:

npm run install:all

Or equivalently:

npm install --workspaces --include-workspace-root

Run

Option A β€” single command from the root (recommended)

npm run dev

This uses concurrently to start both the frontend (port 3000) and backend (port 3001) in a single terminal session.

Option B β€” two separate terminals

# Terminal 1 β€” Backend (port 3001)
cd backend
npm run dev
# Terminal 2 β€” Frontend (port 3000)
cd frontend
npm run dev

Then open http://localhost:3000 in your browser.

First-Time Setup

  1. Copy backend/.env.example to backend/.env and configure at least one LLM provider (see Environment Variables).
  2. Click Select repo in the repository bar, search for a GitHub repository, and select it β€” it will be cloned automatically to ~/work/{owner}/{repo}.
  3. Choose an agent from the landing page, pick a provider/model from the model selector in the page header, and start chatting.
  4. (Optional) Configure Atlassian and/or WorkIQ credentials to unlock additional context sources.

Project Structure

agentic-react/
β”œβ”€β”€ package.json                    # npm workspaces root
β”œβ”€β”€ README.md
β”œβ”€β”€ ARCHITECTURE.md
β”œβ”€β”€ frontend/                       # Next.js 16 application (port 3000)
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ layout.tsx              # Root layout β€” Nav + RepoBar
β”‚   β”‚   β”œβ”€β”€ page.tsx                # Agent selector landing page
β”‚   β”‚   β”œβ”€β”€ globals.css
β”‚   β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”‚   β”œβ”€β”€ agent/run/route.ts  # SSE proxy β†’ backend /api/agent/run
β”‚   β”‚   β”‚   └── backend/workiq/search/route.ts  # WorkIQ proxy (90 s timeout)
β”‚   β”‚   β”œβ”€β”€ agents/[slug]/page.tsx  # Dynamic agent chat page
β”‚   β”‚   β”œβ”€β”€ admin/
β”‚   β”‚   β”‚   β”œβ”€β”€ page.tsx            # Admin landing
β”‚   β”‚   β”‚   └── agents/page.tsx     # Agent CRUD UI
β”‚   β”‚   β”œβ”€β”€ dashboard/page.tsx      # Session history + activity log
β”‚   β”‚   β”œβ”€β”€ kdb/page.tsx            # Knowledge Base / Copilot Spaces
β”‚   β”‚   └── settings/page.tsx       # Feature flags toggle panel
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ ChatInterface.tsx       # Streaming chat UI
β”‚   β”‚   β”œβ”€β”€ Nav.tsx                 # Top navigation bar
β”‚   β”‚   β”œβ”€β”€ RepoBar.tsx             # Active repository status bar
β”‚   β”‚   β”œβ”€β”€ ModelSelector.tsx       # LLM provider and model picker
β”‚   β”‚   β”œβ”€β”€ RepoSelectorModal.tsx   # Repository search and clone modal
β”‚   β”‚   β”œβ”€β”€ ActionPanel.tsx         # Streaming action agent modal
β”‚   β”‚   β”œβ”€β”€ AgentForm.tsx           # Agent create/edit form (Admin)
β”‚   β”‚   β”œβ”€β”€ SpaceSelector.tsx       # Multi-select Copilot Spaces
β”‚   β”‚   β”œβ”€β”€ KDBSelector.tsx         # External KDB selector
β”‚   β”‚   β”œβ”€β”€ AtlassianSelector.tsx   # Jira/Confluence context selector
β”‚   β”‚   β”œβ”€β”€ WorkIQModal.tsx         # WorkIQ search & context picker
β”‚   β”‚   β”œβ”€β”€ WorkIQContextChips.tsx  # Attached WorkIQ context display
β”‚   β”‚   └── SettingsDropdown.tsx    # User settings menu
β”‚   └── lib/
β”‚       β”œβ”€β”€ agents.ts               # AgentConfig type + helpers
β”‚       β”œβ”€β”€ agents-api.ts           # REST client for /api/agents
β”‚       β”œβ”€β”€ sessions-api.ts         # REST client for /api/sessions + /api/activity
β”‚       β”œβ”€β”€ export.ts               # sessionToMarkdown + downloadMarkdown helpers
β”‚       β”œβ”€β”€ storage.ts              # localStorage helpers (SSR-safe, active repo only)
β”‚       β”œβ”€β”€ context.tsx             # AppProvider β€” global React context
β”‚       β”œβ”€β”€ repo-cache.ts           # Repository search cache
β”‚       β”œβ”€β”€ spaces-cache.ts         # Copilot Spaces cache (5-min TTL)
β”‚       β”œβ”€β”€ kdb-cache.ts            # External KDB list cache
β”‚       └── workiq.ts               # WorkIQ availability checker
β”œβ”€β”€ backend/                        # Express API server (port 3001)
β”‚   β”œβ”€β”€ agents/                     # YAML seed files (first-run only)
β”‚   β”‚   β”œβ”€β”€ deep-research.agent.yaml
β”‚   β”‚   β”œβ”€β”€ prd.agent.yaml
β”‚   β”‚   β”œβ”€β”€ technical-docs.agent.yaml
β”‚   β”‚   β”œβ”€β”€ spec-writer.agent.yaml
β”‚   β”‚   β”œβ”€β”€ prd-writer.agent.yaml
β”‚   β”‚   └── issue-creator.agent.yaml
β”‚   β”œβ”€β”€ data/                       # SQLite database (git-ignored at runtime)
β”‚   └── src/
β”‚       β”œβ”€β”€ index.ts                # Server entry β€” registers all routers
β”‚       β”œβ”€β”€ lib/
β”‚       β”‚   β”œβ”€β”€ db.ts               # SQLite setup (agents + external_kdbs)
β”‚       β”‚   β”œβ”€β”€ providers.ts        # LLM provider credential reader
β”‚       β”‚   β”œβ”€β”€ copilot-runner.ts   # GitHub Copilot SDK execution
β”‚       β”‚   β”œβ”€β”€ vertex-runner.ts    # Google Vertex AI (Gemini) execution
β”‚       β”‚   β”œβ”€β”€ context-gatherer.ts # Parallel context aggregation
β”‚       β”‚   β”œβ”€β”€ kdb-query.ts        # External KDB vector query helper
β”‚       β”‚   β”œβ”€β”€ seed.ts             # Seeds agents from YAML on first run
β”‚       β”‚   β”œβ”€β”€ workiq-client.ts    # WorkIQ MCP client singleton
β”‚       β”‚   └── atlassian/
β”‚       β”‚       β”œβ”€β”€ atlassian-client.ts   # Jira + Confluence API client
β”‚       β”‚       β”œβ”€β”€ confluence-parser.ts  # Confluence HTML β†’ Markdown
β”‚       β”‚       └── document-store.ts     # Downloaded document file store
β”‚       └── routes/
β”‚           β”œβ”€β”€ repos.ts            # clone Β· status Β· remove Β· tree Β· search Β· me
β”‚           β”œβ”€β”€ agent.ts            # POST /run β€” SSE streaming (provider routing)
β”‚           β”œβ”€β”€ agents.ts           # CRUD /api/agents
β”‚           β”œβ”€β”€ providers.ts        # GET /models
β”‚           β”œβ”€β”€ sessions.ts         # CRUD /api/sessions Β· /api/activity
β”‚           β”œβ”€β”€ kdb.ts              # GET /spaces (Copilot Spaces proxy)
β”‚           β”œβ”€β”€ kdb-external.ts     # CRUD /api/kdb/external
β”‚           β”œβ”€β”€ atlassian.ts        # GET /status Β· POST /search
β”‚           β”œβ”€β”€ atlassian-download.ts # POST /download Β· GET+DELETE /documents
β”‚           β”œβ”€β”€ workiq.ts           # POST /search Β· GET /status
β”‚           └── admin.ts            # Legacy agent endpoints (delegates to DB)
└── reference/                      # Reference materials and sample data

Agents

Agents are stored in a SQLite database (backend/data/agents.db). On first startup, the backend seeds the database from the YAML files in backend/agents/. After seeding, the database is the single source of truth β€” YAML files are not read at runtime.

Agents can be managed via:

  • Admin UI at /admin/agents β€” full CRUD with a visual form
  • REST API β€” GET/POST/PUT/DELETE /api/agents

Agent Pipeline

flowchart LR
    DR["πŸ” Deep Research"]
    PRD["πŸ“‹ PRD Writer"]
    TD["πŸ“ Technical Docs"]
    SW["⚑ Spec Writer"]
    PW["πŸ“„ PRD Repo Writer"]
    IC["πŸ› Issue Creator"]

    DR -->|hand-off| PRD
    PRD -->|hand-off| TD
    TD -->|action| SW
    TD -->|action| PW
    TD -->|action| IC

    style DR fill:#2d333b,stroke:#539bf5,color:#cdd9e5
    style PRD fill:#2d333b,stroke:#539bf5,color:#cdd9e5
    style TD fill:#2d333b,stroke:#539bf5,color:#cdd9e5
    style SW fill:#2d333b,stroke:#f47067,color:#cdd9e5
    style PW fill:#2d333b,stroke:#f47067,color:#cdd9e5
    style IC fill:#2d333b,stroke:#f47067,color:#cdd9e5
Loading

The three action agents (Spec Writer, PRD Repo Writer, Issue Creator) are triggered from buttons on the Technical Docs chat page. They receive the tech-docs output as context and execute write operations against the target repository.

Agent Details

Agent Slug Default Model Tools Description
Deep Research deep-research o4-mini grep, glob, view, bash Analyzes codebase structure, technology constraints, patterns, and dependencies
PRD Writer prd o4-mini grep, glob, view Consumes research output and generates a structured Product Requirements Document
Technical Docs technical-docs o4-mini grep, glob, view, bash Produces implementation task breakdowns and technical specifications
Spec Writer spec-writer gpt-4.1 bash Creates a spec branch with spec.md + story files, commits, and opens a PR
PRD Repo Writer prd-writer gpt-4.1 bash Creates a PRD markdown file on a branch and opens a PR
Issue Creator issue-creator gpt-4.1 bash Creates hierarchical GitHub issues (parent + sub-issues) via gh CLI

API Reference

All API endpoints are served by the backend on port 3001.

Repositories

Method Endpoint Description
POST /api/repos/clone Clone a repository into ~/work/{owner}/{repo}
GET /api/repos/status Check whether a repository has already been cloned
DELETE /api/repos/remove Remove a cloned repository from disk
GET /api/repos/tree Return the file tree of a cloned repository
GET /api/repos/search?q= Search GitHub repositories (server-side PAT)
GET /api/repos/me Get authenticated GitHub username from env PAT

Agent Execution

Method Endpoint Description
POST /api/agent/run Start an agent session; streams SSE tokens (chunk, reasoning, done, error)
GET /api/providers/models List available models grouped by configured provider

Agent Management

Method Endpoint Description
GET /api/agents List all agents
GET /api/agents/:slug Get a single agent
POST /api/agents Create a new agent
PUT /api/agents/:slug Update an agent
DELETE /api/agents/:slug Delete an agent
GET /api/admin/agents Legacy: list agents (delegates to DB)
GET /api/admin/agents/:slug Legacy: get agent (delegates to DB)
PUT /api/admin/agents/:slug Legacy: update agent (delegates to DB)

Knowledge Base

Method Endpoint Description
GET /api/kdb/spaces Proxy β€” fetch GitHub Copilot Spaces (avoids CORS)
GET /api/kdb/external List saved external KDB instances
POST /api/kdb/external Add an external KDB instance
DELETE /api/kdb/external/:id Remove an external KDB instance

Atlassian (Jira + Confluence)

Method Endpoint Description
GET /api/atlassian/status Check if Atlassian credentials are configured
POST /api/atlassian/search Search Jira issues and Confluence pages
POST /api/atlassian/download Download a Confluence page as a Markdown context document
GET /api/atlassian/documents List downloaded Atlassian documents
DELETE /api/atlassian/documents/:filename Delete a downloaded document

WorkIQ (Microsoft 365)

Method Endpoint Description
POST /api/workiq/search Search M365 data via WorkIQ MCP CLI
GET /api/workiq/status Check if WorkIQ CLI is available

Sessions & Activity

Method Endpoint Description
GET /api/sessions List all sessions (with message count), newest first
POST /api/sessions Create a new session
GET /api/sessions/:id Get a single session with all messages
PUT /api/sessions/:id Update session title / updatedAt
DELETE /api/sessions/:id Delete a session and its messages
DELETE /api/sessions Delete all sessions
GET /api/activity List recent activity events
POST /api/activity Record an activity event

Other

Method Endpoint Description
GET /health Health check β€” returns { status: "ok" }
POST /api/backend/workiq/search Next.js proxy route β€” forwards WorkIQ search (90 s timeout)

Environment Variables

Environment variables are consumed by the backend only. Create a .env file in the backend/ directory.

Variable Default Description
PORT 3001 Port the Express server listens on
WORK_DIR ~/work Base directory where repositories are cloned
GITHUB_PAT β€” GitHub Personal Access Token (enables Copilot provider, repo clone, Copilot Spaces)
VERTEX_SERVICE_ACCOUNT_B64 β€” Base64-encoded Google Cloud service account JSON (enables Vertex AI provider)
VERTEX_LOCATION us-central1 Google Cloud region for Vertex AI requests
BITBUCKET_SERVER_URL β€” Bitbucket Server base URL (e.g., https://bitbucket.example.com)
BITBUCKET_PAT β€” Bitbucket Server Personal Access Token
JIRA_URL β€” Jira Server base URL (e.g., https://jira.example.com)
JIRA_PAT β€” Jira Server Personal Access Token
CONFLUENCE_URL β€” Confluence Server base URL (e.g., https://confluence.example.com)
CONFLUENCE_PAT β€” Confluence Server Personal Access Token
ALLOW_SELF_SIGNED_SSL false Set to true to allow self-signed SSL certificates (for on-prem Bitbucket/Jira/Confluence)

At least one LLM provider (GITHUB_PAT or VERTEX_SERVICE_ACCOUNT_B64) must be configured. The frontend requires no environment variables β€” all credentials are kept server-side.


Development

Hot Reload

  • Frontend β€” Next.js 16 with Turbopack; near-instant HMR.
  • Backend β€” nodemon + tsx; server restarts automatically on .ts file changes.

Root Scripts

Script Description
npm run dev Start both frontend and backend concurrently
npm run build Build the frontend for production
npm run build --workspace=backend Compile backend TypeScript β†’ dist/
npm run install:all Install dependencies for all workspaces

Adding an Agent

Agents can now be added at runtime through the Admin UI at /admin/agents or via the REST API:

curl -X POST http://localhost:3001/api/agents \
  -H 'Content-Type: application/json' \
  -d '{"slug":"my-agent","name":"my-agent","displayName":"My Agent","prompt":"You are...","model":"gpt-4.1"}'

To add via YAML seed: add a backend/agents/<slug>.agent.yaml file and delete backend/data/agents.db β€” the seed will recreate it on next startup.


Testing

There are no automated test suites. Verification uses static analysis and manual end-to-end checks.

Type Checking

# Frontend
cd frontend && npx tsc --noEmit

# Backend
cd backend && npx tsc --noEmit

Linting

cd frontend && npm run lint

Manual Testing Flows

Flow Steps
Auth Set GITHUB_PAT in backend/.env β†’ restart backend β†’ confirm model selector (agent page header) shows Copilot provider
Repo clone Click Select repo β†’ search for a public repo β†’ select it β†’ confirm it appears in the repo bar
Agent run Pick any agent β†’ type a prompt β†’ confirm streamed tokens appear in the chat
Agent handoff Complete a Deep Research session β†’ click Send to PRD Writer β†’ confirm context is prepopulated
KDB / Copilot Spaces Navigate to /kdb β†’ connect a Copilot Space β†’ start a session β†’ confirm context is included
External KDB Navigate to /kdb β†’ add an external KDB URL β†’ attach it to a session
Atlassian Configure JIRA_URL/JIRA_PAT β†’ use AtlassianSelector in chat β†’ search and attach a Jira issue
WorkIQ Click WorkIQ button in chat β†’ search β†’ attach a result β†’ confirm context is included
Dashboard Navigate to /dashboard β†’ confirm past sessions and activity events are listed
Admin Navigate to /admin/agents β†’ edit an agent's prompt β†’ save β†’ re-run agent to confirm change
Feature flags Navigate to /settings β†’ toggle a flag off β†’ confirm the corresponding UI element is hidden
Action agents Complete a Technical Docs session β†’ click an action button β†’ confirm ActionPanel streams output

Contributing

  1. Fork the repository and create a feature branch: git checkout -b feat/your-feature
  2. Make your changes, ensuring code follows the existing TypeScript and ESLint conventions.
  3. Run npm run dev and manually test affected flows.
  4. Open a pull request with a clear description of the change and its motivation.

License

MIT License. See LICENSE for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors