From research queries to comprehensive, cited documents in seconds.
About • Tech Stack • Architecture • Getting Started • Kiro Integration
Agent Scrivener is an AI-first Multi-Agent Research Platform that transforms natural language queries into comprehensive, fully-cited research documents. Unlike traditional research tools that require manual coordination, Agent Scrivener employs autonomous specialized agents that actively explore, analyze, and synthesize information from diverse sources in real-time.
By combining Multi-Agent Orchestration, the Model Context Protocol (MCP), and AWS Bedrock AgentCore, Agent Scrivener bridges the gap between research intent and execution. It manages the entire research lifecycle—from web scraping and academic database queries to content analysis and citation management—autonomously coordinating agents, processing data, and generating professional documents directly in your workflow.
- Manual to Autonomous: No more juggling multiple research tools. Describe your research need, and the agents orchestrate the entire workflow.
- Scattered to Synthesized: Agents don't just collect information; they analyze, cross-reference, and synthesize insights from web sources and academic databases.
- Static to Integrated: Through MCP servers, research capabilities integrate seamlessly into your IDE, making research a natural part of your development workflow.
Agent Scrivener is designed for seamless integration with agentic IDEs through the Model Context Protocol (MCP). We provide three specialized MCP servers that transform your IDE into a research powerhouse.
We expose high-level MCP Tools that any compatible IDE can invoke:
- Citation Formatter Server: Format citations in APA, MLA, Chicago, or Harvard styles with automatic DOI validation
- Web Research Server: Search the web, extract content, and retrieve metadata from any URL
- Academic Search Server: Query 10+ academic databases including arXiv, PubMed, Google Scholar, OpenAlex, and CORE
MCP provides a standardized interface between Agent Scrivener and your IDE:
- What it solves: Usually, research tools are isolated from your development environment
- How it works: Our MCP servers expose research capabilities through a standard protocol. Your IDE uses these tools as if they were native features
Behind the MCP interface, specialized agents coordinate to deliver results:
- Planner Agent: Analyzes queries and orchestrates the research workflow
- Research Agent: Autonomously browses and extracts web content
- API Agent: Queries academic databases and retrieves papers
- Analysis Agent: Processes data and generates insights
- Citation Agent: Tracks sources and formats bibliographies
Agent Scrivener follows a Multi-Agent Orchestration architecture where specialized agents coordinate through a central orchestrator.
graph TB
User[👤 Researcher] -->|Natural Language Query| Orchestrator[🧠 Agent Orchestrator]
subgraph "🤖 Specialized Agents"
Orchestrator -->|Coordinate| Planner[📋 Planner Agent]
Orchestrator -->|Coordinate| Research[🔍 Research Agent]
Orchestrator -->|Coordinate| API[📚 API Agent]
Orchestrator -->|Coordinate| Analysis[📊 Analysis Agent]
Orchestrator -->|Coordinate| Draft[✍️ Drafting Agent]
Orchestrator -->|Coordinate| Citation[📖 Citation Agent]
end
subgraph "🔌 MCP Integration Layer"
Research -->|Expose| WebMCP[Web Research Server]
API -->|Expose| AcademicMCP[Academic Search Server]
Citation -->|Expose| CitationMCP[Citation Formatter Server]
end
subgraph "🎯 External Services"
Research -->|Query| Web[Web Sources]
API -->|Query| Databases[Academic Databases]
Analysis -->|Process| NLP[NLP Pipeline]
end
subgraph "💾 Data Layer"
Orchestrator -->|Store| Memory[Session Memory]
Orchestrator -->|Persist| Storage[Document Storage]
end
subgraph "🖥️ IDE Integration"
WebMCP -->|MCP Protocol| IDE[Kiro / Any MCP IDE]
AcademicMCP -->|MCP Protocol| IDE
CitationMCP -->|MCP Protocol| IDE
end
Draft -->|Generate| Document[📄 Research Document]
classDef agent fill:#7c3aed,stroke:#5b21b6,stroke-width:2px,color:#fff;
classDef mcp fill:#0ea5e9,stroke:#0369a1,stroke-width:2px,color:#fff;
classDef external fill:#059669,stroke:#047857,stroke-width:2px,color:#fff;
class Orchestrator,Planner,Research,API,Analysis,Draft,Citation agent;
class WebMCP,AcademicMCP,CitationMCP mcp;
class Web,Databases,NLP external;
Agent Scrivener is built on a modern, production-ready stack:
- Agent Framework: AWS Bedrock AgentCore Runtime
- Integration Protocol: Model Context Protocol (MCP)
- LLMs: AWS Bedrock (Claude, Titan models)
- NLP Processing: spaCy, NLTK for content analysis
- Framework: FastAPI (async/await support)
- Language: Python 3.9+ with type hints
- Data Validation: Pydantic v2
- WebSocket: Real-time progress updates
- Web Scraping: BeautifulSoup4, Playwright
- Academic APIs: arXiv, PubMed, Semantic Scholar, OpenAlex, CORE
- Citation Management: CrossRef API integration
- Search: DuckDuckGo API
- Cloud Platform: AWS (Lambda, S3, DynamoDB)
- Deployment: Serverless Framework
- Testing: pytest with comprehensive coverage
- Validation: Production readiness validation framework
Agent Scrivener provides native integration with Kiro through MCP servers. To integrate with Kiro:
- Configure the MCP servers in your Kiro settings file (
.kiro/settings/mcp.json):
{
"mcpServers": {
"citation-formatter": {
"command": "python",
"args": ["/path/to/agent-scrivener/mcp_servers/citation_formatter_server.py"],
"disabled": false,
"autoApprove": ["format_citation", "validate_doi"]
},
"web-research": {
"command": "python",
"args": ["/path/to/agent-scrivener/mcp_servers/web_research_server.py"],
"disabled": false,
"autoApprove": ["search_web", "extract_content"]
},
"academic-search": {
"command": "uvx",
"args": ["mcp-server-academic-search"],
"disabled": false,
"autoApprove": ["search_arxiv", "search_pubmed"]
}
}
}-
Restart Kiro or reconnect the MCP servers from the MCP Server view in the Kiro feature panel.
-
Start researching - The tools are now available in your Kiro workspace for:
- Formatting citations in multiple styles
- Searching academic databases
- Extracting web content
- Validating DOIs and retrieving paper metadata
Agent Scrivener follows the Model Context Protocol (MCP) specification, making it compatible with any MCP-enabled IDE:
- Locate your IDE's MCP configuration file
- Add the Agent Scrivener MCP servers using the configuration format above
- Adjust the
commandandargsfields to match your IDE's requirements - Restart your IDE or reload the MCP configuration
Once integrated, your IDE will have access to:
Citation Formatter Tools:
format_citation: Format citations in APA, MLA, Chicago, or Harvard stylevalidate_doi: Validate DOIs and retrieve metadata from CrossRefgenerate_bibliography: Generate formatted bibliographies from multiple citations
Web Research Tools:
search_web: Search the web using DuckDuckGoextract_content: Extract main content from web pagesget_page_metadata: Retrieve metadata from URLs
Academic Search Tools:
search_arxiv,search_pubmed,search_google_scholar: Search major academic databasessearch_openalex,search_core,search_semantic: Access comprehensive research indexessearch_biorxiv,search_medrxiv,search_iacr: Specialized preprint serversget_paper_by_doi: Retrieve papers by DOIsearch_authors,get_author_papers: Find authors and their publicationsget_openalex_citations,get_openalex_references: Explore citation networksdownload_paper,read_paper: Download and extract text from PDFs
- Python 3.9 or higher
- pip or uv package manager
- AWS Account with Bedrock access (for production deployment)
- API Keys for:
- AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY: For AWS Bedrock
- Optional: Academic database API keys for enhanced access
- Clone the repository:
git clone https://github.com/Keerthivasan-Venkitajalam/Agent-Scrivener.git
cd agent-scrivener- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Install the package in development mode:
pip install -e .- Install MCP server dependencies:
cd mcp_servers
pip install -r requirements.txt
cd ..Create a config.json file in the project root:
{
"debug": false,
"log_level": "INFO",
"max_concurrent_sessions": 10,
"agentcore": {
"region": "us-east-1",
"timeout_seconds": 300
},
"processing": {
"max_sources_per_query": 20,
"confidence_threshold": 0.7
}
}Or use environment variables:
export AWS_REGION=us-east-1
export DEBUG=false
export LOG_LEVEL=INFO
export MAX_CONCURRENT_SESSIONS=10Start the FastAPI server:
uvicorn agent_scrivener.api.main:app --host 0.0.0.0 --port 8000Run MCP servers individually (for testing):
# Citation formatter server
python mcp_servers/citation_formatter_server.py
# Web research server
python mcp_servers/web_research_server.pySubmit a research request:
curl -X POST "http://localhost:8000/research" \
-H "Content-Type: application/json" \
-d '{"query": "Latest developments in quantum computing"}'agent_scrivener/
├── agents/ # Agent implementations
│ ├── planner_agent.py # Query analysis and orchestration
│ ├── research_agent.py # Web research and extraction
│ ├── api_agent.py # Academic database queries
│ ├── analysis_agent.py # Data processing and insights
│ ├── drafting_agent.py # Content synthesis
│ └── citation_agent.py # Citation management
├── models/ # Pydantic v2 data models
│ ├── core.py # Core data structures
│ └── analysis.py # Analysis models
├── tools/ # AgentCore tool wrappers
│ ├── browser_wrapper.py # Web browsing tools
│ ├── code_interpreter_wrapper.py
│ └── gateway_wrapper.py # API gateway tools
├── utils/ # Common utilities
│ ├── config.py # Configuration management
│ ├── logging.py # Logging setup
│ └── monitoring.py # Performance monitoring
├── deployment/
│ └── validation/ # Production readiness validation
│ ├── orchestrator.py # Validation orchestrator
│ ├── cli.py # CLI interface
│ └── validators/ # Individual validators
├── api/ # FastAPI application
│ ├── main.py # API entry point
│ ├── models.py # API request/response models
│ ├── websocket.py # WebSocket support
│ └── routes.py # API endpoints
├── mcp_servers/ # Model Context Protocol servers
│ ├── citation_formatter_server.py
│ ├── web_research_server.py
│ └── README.md
├── tests/
│ ├── unit/ # Unit tests
│ ├── integration/ # Integration tests
│ ├── validation/ # Validation framework tests
│ └── performance/ # Performance benchmarks
└── docs/ # Documentation
├── validation_guide.md
└── validation_development.md
# Run all tests
pytest
# Run with coverage
pytest --cov=agent_scrivener --cov-report=html
# Run specific test categories
pytest tests/unit/
pytest tests/integration/
pytest tests/validation/# Format code
black agent_scrivener/
isort agent_scrivener/
# Type checking
mypy agent_scrivener/
# Linting
flake8 agent_scrivener/Before deploying, run the comprehensive validation suite:
python -m agent_scrivener.deployment.validation.cli validate-allThis validates:
- API endpoints and response formats
- Security configurations
- Data persistence mechanisms
- AWS infrastructure setup
- Monitoring and observability
- Documentation completeness
- Performance benchmarks
- End-to-end workflows
The system is designed for deployment on AWS Bedrock AgentCore Runtime:
# Deploy to AWS
cd deployment/
serverless deploy --stage productionBuild and run with Docker:
docker build -t agent-scrivener .
docker run -p 8000:8000 agent-scrivenerFor production MCP server deployment:
- Run servers as system services (systemd, supervisor)
- Implement proper logging and monitoring
- Set up health checks
- Configure appropriate timeouts
- Secure inter-process communication
Scenario: "Conduct a literature review on transformer architectures in NLP, focusing on papers from 2020-2024."
The Agentic Loop:
- Planning: Planner Agent breaks down the query into subtasks
- Search: API Agent queries arXiv, Semantic Scholar, and Google Scholar
- Analysis: Analysis Agent identifies key themes and trends
- Synthesis: Drafting Agent creates a structured review
- Citation: Citation Agent formats all references in APA style
Scenario: "How are machine learning techniques being applied in climate science? Include both academic papers and recent industry developments."
The Agentic Loop:
- Discovery: Research Agent scrapes relevant blogs and news
- Academic Search: API Agent queries environmental and CS databases
- Cross-Reference: Analysis Agent identifies connections between sources
- Integration: Drafting Agent synthesizes insights from both domains
- Validation: Citation Agent ensures all claims are properly sourced
Scenario: "Monitor new papers on quantum computing and notify me of significant developments."
The Agentic Loop:
- Monitoring: API Agent sets up periodic queries to academic databases
- Filtering: Analysis Agent identifies papers matching significance criteria
- Summarization: Drafting Agent creates concise summaries
- Notification: System sends updates via WebSocket or email
| Issue | Solution |
|---|---|
| "MCP server not connecting" | Ensure the server path is correct and Python environment is activated. Check logs in the MCP server output. |
| "API rate limit exceeded" | Academic APIs have rate limits. The system automatically throttles requests. Wait a few minutes and retry. |
| "Citation format incorrect" | Verify the citation style parameter (apa, mla, chicago, harvard) is correctly specified. |
| "WebSocket connection failed" | Check that the FastAPI server is running and the port (8000) is not blocked by firewall. |
Contributions are welcome! Whether you're fixing bugs, adding new agents, improving MCP tools, or enhancing documentation, your help is appreciated.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Add tests for new functionality
- Run the test suite (
pytest) - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow PEP 8 style guidelines
- Write comprehensive tests for new features
- Update type hints and docstrings
- Run the validation suite before submitting PRs
- Keep commits atomic and well-described
Agent Scrivener is a production-ready research platform built for autonomous knowledge work.
This project is licensed under the MIT License. See the LICENSE file for details.
- Built with AWS Bedrock AgentCore
- MCP integration follows the Model Context Protocol specification
- Academic search powered by multiple open-access databases
- Special thanks to the open-source community
Built for researchers and developers