Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
# Essay Writer Agent An AI-powered agent that helps write well-structured essays based on your provided topic and references from PDF documents. ## Features - Automated essay planning and research - PDF document ingestion and vector-based retrieval - Multi-stage writing process with critiques and revisions - LangGraph-based agent architecture ## Installation Clone the repository: ```bash git clone https://github.com/yourusername/essay-writer-agent.git cd essay-writer-agent ``` Create a virtual environment and install dependencies: ```bash python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -e . ``` ## Configuration Copy the example environment file and set your variables: ```bash cp .env.example .env ``` Edit the `.env` file with your API keys and configuration settings. ## Usage ### 1. Add your PDF documents Place your PDF reference documents in the `documents/` directory. ### 2. Build the vector store ```bash python -m essay_writer.vector_store.pdf_store build ``` ### 3. Run the essay writer agent ```bash python scripts/run_agent.py --topic "Your essay topic" --max-revisions 3 ``` ### Using as a library ```python from essay_writer.agent.graph import create_essay_agent agent = create_essay_agent() result = agent.invoke({ 'task': "What is the difference between LangChain and LangSmith", 'max_revisions': 2 }) print(result['draft']) # Print the final essay ``` ## Development Run tests: ```bash pytest ``` ## License MIT