Skip to content

ctonneslan/ai-agent-workflows

Repository files navigation

AI Agent Workflows

An autonomous AI agent system that executes multi-step workflows with tool calling, reasoning traces, and real-time progress visualization. Demonstrates the agentic AI pattern: plan, act, observe, reason, repeat.

TypeScript Next.js AI Agent

Why This Exists

AI agents are the next wave beyond simple chatbot wrappers. This project demonstrates the core patterns: multi-step reasoning, tool calling with structured inputs/outputs, workflow orchestration, and transparent decision traces. The UI shows every step of the agent's reasoning so you can see exactly how it plans and acts.

Workflows

1. Triage GitHub Issues

Agent fetches open issues, analyzes severity, classifies by type and priority, assigns to team members, and generates a summary report.

2. Review Pull Request

Agent examines code diffs, runs static analysis, identifies bugs and code quality issues, and submits a structured review with inline comments.

3. Incident Response

Agent queries error logs, checks infrastructure health, identifies root cause, executes remediation runbook, and generates an incident report with timeline.

4. Dependency Audit

Agent scans for security vulnerabilities, checks for outdated packages, analyzes license compatibility, and produces a prioritized action plan.

Architecture

User selects workflow
        |
        v
+-------------------+
|   Agent Runner     |
|                    |
|  1. Think          | <- Plan next action based on goal + observations
|  2. Tool Call      | <- Execute tool with structured input
|  3. Observe        | <- Process tool result
|  4. Repeat         | <- Loop until goal achieved
|  5. Respond        | <- Final structured output
|                    |
+-------------------+
        |
        v
  Real-time step UI
  (thinking, tools, results)

Agent Step Types

Type Icon Description
Thinking Brain Agent's internal reasoning and planning
Tool Call Wrench Executing a tool with structured input
Tool Result Clipboard Response from a tool execution
Response Check Final structured output to the user

Tools Available

Tool Category Description
github.list_issues GitHub Fetch open issues from a repository
github.get_issue GitHub Get detailed issue information
github.add_labels GitHub Apply labels to an issue
github.assign_issue GitHub Assign an issue to a team member
github.get_pull_request GitHub Fetch PR details and metadata
github.get_pr_diff GitHub Get the code diff for a PR
github.create_review GitHub Submit a code review
code.analyze Analysis Run static analysis on code files
logs.query Observability Search and filter application logs
infra.check_service Infrastructure Check service health status
infra.check_disk Infrastructure Inspect disk usage breakdown
runbook.execute Operations Execute a predefined remediation runbook
npm.audit Security Scan for known vulnerabilities
npm.outdated Packages Check for outdated dependencies
license.check Compliance Scan dependency licenses

Tech Stack

Component Technology Why
Frontend Next.js 15 + Tailwind CSS Modern React with dark theme
Agent Engine TypeScript async generators Clean step-by-step execution
Rendering Dynamic import (no SSR) Client-side only for interactivity

Quick Start

git clone https://github.com/ctonneslan/ai-agent-workflows.git
cd ai-agent-workflows
npm install
npm run dev

Open http://localhost:3000 and select a workflow.

Project Structure

src/
├── app/
│   ├── globals.css         # Dark theme styles
│   ├── layout.tsx          # Root layout
│   └── page.tsx            # Main page
├── components/
│   ├── WorkflowRunner.tsx  # Workflow selector + step renderer
│   └── AgentStep.tsx       # Individual step display
└── lib/
    └── agent.ts            # Agent engine, workflows, tool definitions

License

MIT

About

AI agent with tool-calling, multi-step reasoning, and workflow execution

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors