How hindavishewale/api_documentation_agent works
API Documentation Agent turns API source and existing documentation into normalized contracts, then generates documentation and analyzes drift, version changes, quality, and impact. The main user path is the Streamlit dashboard into the agent workflow, followed by parsing, analysis, self-healing validation, and downloadable artifacts. SQLite knowledge memory, optional Gemini reasoning, and optional RAG are distinct capabilities. Some dashboard wiring and advertised capabilities are supported by the README or source index rather than complete excerpts; uncertain runtime links are omitted.
Main entry points: graph.py Agent execution · domain.py Domain contracts · toolkit.py Validation and repair · app.py Streamlit dashboard
Components 16
Dashboard
- Streamlit dashboard
app.py
Agent Workflow
- Agent execution
agent/graph.py - Intent planner
agent/planner.py - Analysis state
agent/state.py
Contract Analysis
- Static API parser
parsers/openapi_parser.py - Domain contracts
models/domain.py - Version comparison
tools/analysis.py - Drift detection
tools/analysis.py - Impact analysis
tools/analysis.py - Health scoring
tools/analysis.py
Documentation Outputs
- Validation and repair
tools/toolkit.py - Artifact generation
generators/artifacts.py
Memory & Integrations
- SQLite knowledge store
storage.py - Standards retrieval
rag/retriever.py - Gemini reasoning
Other components
- API author
Connections 24
- API author → Streamlit dashboard: submits API inputs
README.md - Streamlit dashboard → Agent execution: starts analysis
app.py - Streamlit dashboard → SQLite knowledge store: uses knowledge store
app.py - Agent execution → Intent planner: plans tools
agent/graph.py - Agent execution → Analysis state: processes state
agent/graph.py - Agent execution → Static API parser: parses inputs
agent/graph.py - Agent execution → Version comparison: compares versions
agent/graph.py - Agent execution → Drift detection: detects drift
agent/graph.py - Agent execution → Impact analysis: builds impact graph
agent/graph.py - Agent execution → Health scoring: scores documentation
agent/graph.py - Agent execution → Validation and repair: validates and repairs
agent/graph.py - Agent execution → Artifact generation: renders artifacts
agent/graph.py - Static API parser → Domain contracts: creates models
parsers/openapi_parser.py - Version comparison → Domain contracts: compares models
tools/analysis.py - Drift detection → Domain contracts: checks contracts
tools/analysis.py - Impact analysis → Domain contracts: analyzes relationships
tools/analysis.py - Health scoring → Domain contracts: scores contracts
tools/analysis.py - Validation and repair → Version comparison: delegates analysis
tools/toolkit.py - Validation and repair → Drift detection: validates drift
tools/toolkit.py - Validation and repair → Health scoring: calculates score
tools/toolkit.py - Validation and repair → Artifact generation: generates docs
tools/toolkit.py - Artifact generation → Domain contracts: renders models
generators/artifacts.py - Agent execution → Gemini reasoning: requests explanations
agent/graph.py - Intent planner → Standards retrieval: plans retrieval
agent/planner.py