The Writing Agent is an AI-powered research assistant designed to help users gather structured information on any topic. By leveraging advanced language models and tools, the agent provides concise summaries, sources, and insights, making it an invaluable tool for researchers, students, and professionals.
- Interactive Streamlit Web Interface: A user-friendly interface to interact with the AI agent.
- Structured Research Output: Provides topic summaries, sources, and tools used.
- Tool Integration: Utilizes tools like DuckDuckGo search, Wikipedia queries, and file-saving capabilities.
- Customizable: Easily extendable to include additional tools or modify the agent's behavior.
- Python 3.8 or higher
pip(Python package manager)
- Clone the repository:
git clone https://github.com/A-Najjar/writing_agent.git cd writing_agent - Install the required dependencies:
pip install -r requirements.txt
- Set up environment variables:
- Copy the
sample.envfile to.env:cp sample.env .env
- Add your API keys for OpenAI and Anthropic in the
.envfile:OPENAI_API_KEY="your_openai_api_key" ANTHROPIC_API_KEY="your_anthropic_api_key"
- Copy the
- Start the Streamlit app:
streamlit run streamlit_app.py
- Open the app in your browser (usually at
http://localhost:8501). - Enter your research topic and click "Run Research" to get structured results.
- Topic: Artificial Intelligence
- Summary: AI refers to the simulation of human intelligence in machines that are programmed to think and learn.
- Sources:
- Tools Used: search, wiki_tool
writing_agent/
├── main.py # Entry point for the agent
├── tools.py # Custom tools for the agent
├── streamlit_app.py # Streamlit web interface
├── requirements.txt # Python dependencies
├── sample.env # Environment variable template
├── README.md # Project documentation
To add new tools or modify the agent's behavior:
- Define a new tool in
tools.py. - Import and include the tool in the
toolslist inmain.py.
Contributions are welcome! Feel free to open issues or submit pull requests.
This project is licensed under the MIT License. See the LICENSE file for details.