Skip to main content

ContextAgent

Defined in the Context Agent module.
AI Agent Advanced Context Engineering Agent - Comprehensive context generation for AI coding assistants. Implements the Context Engineering methodology from the PRD template: Phase 1: Deep Codebase Analysis (using gitingest, AST analysis, etc.) Phase 2: Pattern Extraction and Documentation Phase 3: Comprehensive PRP Generation Phase 4: Validation Framework Creation Phase 5: Implementation Blueprint Generation This follows the exact principles from the PRD template but adapted for PraisonAI architecture. NEW: Saves every single agent response along the way for complete traceability!

Constructor

Optional[str]
No description available.
Optional[str]
No description available.
Optional[str]
No description available.
Optional[str]
No description available.
Optional[str]
No description available.
Optional
No description available.
Optional
No description available.
Optional[str]
No description available.
bool
default:"True"
No description available.

Methods

setup_logging()

Setup comprehensive logging based on debug mode.

setup_output_directories()

Setup all output directories for comprehensive saving.

log_debug()

Enhanced debug logging with optional data.

save_markdown_output()

Save content as markdown file with proper formatting.

save_comprehensive_session_report()

Save a comprehensive markdown report of the entire session (debug mode only).

analyze_codebase_with_gitingest()

Analyze codebase using gitingest for comprehensive understanding.

perform_ast_analysis()

Perform AST (Abstract Syntax Tree) analysis for code patterns.

extract_implementation_patterns()

Extract reusable implementation patterns following PRD methodology.

analyze_test_patterns()

Analyze testing patterns for validation framework creation.

generate_comprehensive_prp()

Generate comprehensive Product Requirements Prompt following PRD template exactly.

create_validation_framework()

Create comprehensive validation framework following PRD methodology.

compile_context_documentation()

Compile all context documentation following PRD methodology.

analyze_integration_points()

Analyze integration points and external dependencies following PRD methodology.

build_implementation_blueprint()

Build detailed implementation blueprint following PRD template.

create_quality_gates()

Create quality gates for validation following PRD methodology.

generate_feature_prp()

Generate a comprehensive PRP for a specific feature request following PRD methodology.

execute_prp()

Execute a PRP following PRD methodology (placeholder for future implementation).

start()

Start Context Engineering analysis with structured input parsing.

get_agent_interaction_summary()

Get summary of all agent interactions.

analyze_codebase()

Protocol-compatible alias for analyze_codebase_with_gitingest.

generate_prp()

Protocol-compatible alias for generate_comprehensive_prp.

create_implementation_blueprint()

Protocol-compatible alias for build_implementation_blueprint.

aanalyze_codebase()

Async version of analyze_codebase.

agenerate_prp()

Async version of generate_prp.

acreate_implementation_blueprint()

Async version of create_implementation_blueprint.

Source

View on GitHub

praisonaiagents/agent/context_agent.py at line 89

Agents Concept

Single Agent Guide

Multi-Agent Guide

Agent Configuration

Auto Agents