npx agentspec-cli install e4549419-7ff9-45e1-a990-91abbf5d1da9 --file-type agents-md→ .agents/
# Agent Architecture
## Overview
This module implements a modular Retrieval-Augmented Generation (RAG)
pipeline where each agent has a single responsibility. The agents
communicate through a shared `AgentState` and execute sequentially to
transform a user query into a grounded response.
## Agent Architecture

------------------------------------------------------------------------
# Components
## QueryUnderstandingAgent
**Purpose**
Interprets the user's natural language query and converts it into
structured metadata for downstream retrieval.
**Responsibilities**
- Normalize the query.
- Determine intent/domain/category.
- Incorporate conversation history and summaries.
- Produce a `QueryUnderstandingSchema`.
**Input** - User query - Conversation history - Conversation summary
**Output** - Structured query object
------------------------------------------------------------------------
## RetrievalAgent
**Purpose**
Retrieves the most relevant transcript chunks.
**Responsibilities**
- Uses the normalized query.
- Delegates semantic search to `SearchService`.
- Returns ranked transcript chunks.
**Input** - Structured query
**Output** - Retrieved transcript chunks
------------------------------------------------------------------------
## AnswerGenerationAgent
**Purpose**
Produces the final grounded answer using retrieved context.
**Responsibilities**
- Builds the answer-generation prompt.
- Injects transcript chunks.
- Calls the LLM.
- Returns the final response.
**Input** - User query - Retrieved transcript chunks
**Output** - Final answer
------------------------------------------------------------------------
## EntityExtractionAgent
**Purpose**
Extracts entities and relationships from conversation summaries to build
a knowledge graph.
**Responsibilities**
- Converts summaries into structured entities.
- Produces relationships.
- Returns a `KnowledgeGraphSchema`.
**Input** - Conversation summary
**Output** - Knowledge graph entities and relations
------------------------------------------------------------------------
## AgentState
Shared LangGraph state passed between agents.
Stores:
- User query
- Normalized query
- Intent/domain/category
- Metadata filters
- Retrieved chunks
- Reranked chunks
- Recommendations
- Summary
- Final response
- Execution trace
- Errors
- Chat history
------------------------------------------------------------------------
# Overall Flow
1. User submits a query.
2. QueryUnderstandingAgent converts it into structured metadata.
3. RetrievalAgent performs semantic search.
4. Retrieved chunks are passed to AnswerGenerationAgent.
5. The LLM generates a grounded response.
6. Conversation summaries can optionally be processed by
EntityExtractionAgent to populate a knowledge graph for long-term
memory and analytics.
------------------------------------------------------------------------
# Design Principles
- Single responsibility per agent.
- Prompt-driven architecture.
- Shared state through LangGraph.
- Retrieval and generation are decoupled.
- Easy to extend with reranking, recommendations, or additional
agents.
AGENTS.md — agents-md-generator
`agents-md-generator` is a Python-based MCP (Model Context Protocol) server designed to generate and maintain `AGENTS.md` files—architectural context documents for AI coding agents. It uses Tree-sitter for high-fidelity AST analysis across multiple languages (Python, TypeScript, Go, C#) and `uv` for dependency management. The system operates as an incremental, cache-aware pipeline that transforms a codebase into a structured payload for AI assistants to perform maintenance tasks without manual e
by AgentHub Crawler
Agent Service
**Created**: 2025-12-09 **Last Updated**: 2026-02-12 **Category**: Architecture
by AgentHub Crawler
AGENTS.md
Operational guide for AI agents working in this repository.
by AgentHub Crawler
Sign in to leave a comment.
AGENTS.md - Universal AI Agent Configuration
This file provides comprehensive guidance for AI agents working with code in this repository.
by AgentHub Crawler