{
  "markdown": "# ResearchTwin: Federated Agentic Web of Research Knowledge\n\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![Live Platform](https://img.shields.io/badge/platform-researchtwin.net-blue)](https://researchtwin.net)\n[![S-Index Spec](https://img.shields.io/badge/metric-S--Index-green)](https://github.com/martinfrasch/s-index)\n[![Project Board](https://img.shields.io/badge/project-Ecosystem-purple)](https://github.com/users/martinfrasch/projects/8)\n\nResearchTwin is an open-source, federated platform that transforms a researcher's publications, datasets, and code repositories into a conversational **Digital Twin**. Built on a Bimodal Glial-Neural Optimization (BGNO) architecture, it enables dual-discovery where both humans and AI agents collaborate to accelerate scientific discovery.\n\n**Live at [researchtwin.net](https://researchtwin.net)** | **[Join the Network](https://researchtwin.net/join.html)**\n\n---\n\n## Project Vision\n\nThe exponential growth of scientific outputs has created a \"discovery bottleneck.\" Traditional static PDFs and siloed repositories limit knowledge synthesis and reuse. ResearchTwin addresses this by:\n\n- Integrating multi-modal research artifacts from **Semantic Scholar**, **Google Scholar**, **GitHub**, and **Figshare**\n- Computing a real-time **[S-Index](https://github.com/martinfrasch/s-index)** metric (Quality × Impact × Collaboration) across all output types\n- Providing a conversational chatbot interface for interactive research exploration\n- Exposing an **Inter-Agentic Discovery API** with Schema.org types for machine-to-machine research discovery\n- Enabling a **federated, Discord-like architecture** supporting local nodes, hubs, and hosted edges\n\n---\n\n## Architecture Overview\n\n### BGNO (Bimodal Glial-Neural Optimization)\n\n```\nData Sources          Glial Layer          Neural Layer         Interface\n┌──────────────┐    ┌─────────────┐    ┌──────────────┐    ┌────────────┐\n│Semantic Scholar│───▶│             │    │              │    │  Web Chat  │\n│Google Scholar │───▶│  SQLite     │───▶│  RAG with    │───▶│  Discord   │\n│GitHub API     │───▶│  Cache +    │    │  Claude API  │    │  Agent API │\n│Figshare API   │───▶│  Rate Limit │    │              │    │  Embed     │\n└──────────────┘    └─────────────┘    └──────────────┘    └────────────┘\n```\n\n- **Connector Layer**: Pulls papers (S2+GS with deduplication), repos (GitHub), datasets (Figshare), and ORCID metadata\n- **Glial Layer**: SQLite caching with 24h TTL, rate limiting, S2+GS title-similarity merge (0.85 threshold)\n- **Neural Layer**: RAG with Claude — context assembly, prompt engineering, conversational synthesis\n- **Interface Layer**: D3.js knowledge graph, chat widget, Discord bot, REST API\n\n### Federated Network Tiers\n\n| Tier | Name | Description | Status |\n|------|------|-------------|--------|\n| **Tier 1** | Local Nodes | Researchers run `python run_node.py` locally | Live |\n| **Tier 2** | Hubs | Lab aggregators federating multiple nodes | Planned |\n| **Tier 3** | Hosted Edges | Cloud-hosted at researchtwin.net | Live |\n\n### Inter-Agentic Discovery API\n\nMachine-readable endpoints with Schema.org `@type` annotations:\n\n| Endpoint | Schema.org Type | Purpose |\n|----------|----------------|---------|\n| `GET /api/researcher/{slug}/profile` | `Person` | Researcher profile with HATEOAS links |\n| `GET /api/researcher/{slug}/papers` | `ItemList` of `ScholarlyArticle` | Papers with citations |\n| `GET /api/researcher/{slug}/datasets` | `ItemList` of `Dataset` | Datasets with QIC scores |\n| `GET /api/researcher/{slug}/repos` | `ItemList` of `SoftwareSourceCode` | Repos with QIC scores |\n| `GET /api/discover?q=keyword&type=paper` | `SearchResultSet` | Cross-researcher search |\n\n---\n\n## Getting Started\n\n### Hosted (Tier 3) — Zero Setup\n\n1. Visit [researchtwin.net/join.html](https://researchtwin.net/join.html)\n2. Register with your name, email, and research identifiers\n3. Your Digital Twin is live immediately\n\n### Local Node (Tier 1) — Full Control\n\n```bash\ngit clone https://github.com/martinfrasch/researchtwin.git\ncd researchtwin\npip install -r backend/requirements.txt\ncp node_config.json.example node_config.json\n# Edit node_config.json with your details\npython run_node.py --config node_config.json\n```\n\n### Docker Deployment\n\n```bash\ncp .env.example .env  # Add your API keys\ndocker-compose up -d --build\n```\n\n**Required API keys**: `ANTHROPIC_API_KEY` (for Claude RAG)\n**Optional**: `S2_API_KEY`, `GITHUB_TOKEN`, `DISCORD_BOT_TOKEN`, SMTP credentials\n\n---\n\n## Repository Structure\n\n```\nresearchtwin/\n├── backend/\n│   ├── main.py              # FastAPI endpoints (REST + Discovery API)\n│   ├── researchers.py        # SQLite researcher CRUD + token management\n│   ├── database.py           # SQLite schema, WAL mode, migrations\n│   ├── models.py             # Pydantic models for all endpoints\n│   ├── rag.py                # RAG context assembly for Claude\n│   ├── qic_index.py          # S-Index / QIC computation engine\n│   ├── email_service.py      # SMTP service for profile update codes\n│   ├── connectors/           # Data source connectors\n│   │   ├── semantic_scholar.py\n│   │   ├── scholarly_lib.py  # Google Scholar via scholarly\n│   │   ├── github_connector.py\n│   │   └── figshare.py\n│   └── discord_bot/          # Discord bot with /research and /sindex\n├── frontend/\n│   ├── index.html            # Main dashboard with D3.js knowledge graph\n│   ├── join.html             # Self-registration page\n│   ├── update.html           # Email-verified profile updates\n│   ├── privacy.html          # Privacy policy\n│   └── widget-loader.js      # Embeddable chat widget\n├── run_node.py               # Tier 1 local node launcher\n├── node_config.json.example  # Local node configuration template\n├── docker-compose.yml        # Docker orchestration\n├── nginx/                    # Nginx reverse proxy + SSL\n└── whitepaper.tex            # LaTeX manuscript\n```\n\n---\n\n## Ecosystem\n\nThis repository is part of the **[ResearchTwin Ecosystem](https://github.com/users/martinfrasch/projects/8)** project:\n\n| Repository | Description |\n|------------|-------------|\n| **[researchtwin](https://github.com/martinfrasch/researchtwin)** | Federated platform (this repo) |\n| **[s-index](https://github.com/martinfrasch/s-index)** | S-Index formal specification and reference implementation |\n\n---\n\n## Embeddable S-Index Widget\n\nShow your S-Index on your lab website, Google Sites page, or personal homepage:\n\n```html\n<iframe\n  src=\"https://researchtwin.net/embed.html?slug=YOUR-SLUG\"\n  width=\"440\" height=\"180\"\n  style=\"border:none; border-radius:12px;\"\n  loading=\"lazy\">\n</iframe>\n```\n\nReplace `YOUR-SLUG` with your researcher slug (e.g. `martin-frasch`).\n\n**Google Sites**: Edit page > Insert > Embed > \"By URL\" tab > paste `https://researchtwin.net/embed.html?slug=YOUR-SLUG`\n\n**WordPress**: Add a Custom HTML block and paste the iframe code.\n\nThe widget displays the researcher's name, S-Index score, h-index, citation count, and paper count. Data updates automatically from live API sources.\n\n[See it in action](https://researchtwin.net/embed.html?slug=martin-frasch) | [Full embed instructions](https://researchtwin.net/join.html#howto)\n\n---\n\n## Documentation\n\n| Document | Description |\n|----------|-------------|\n| [API Reference](docs/API.md) | Full REST API documentation with schemas and examples |\n| [Self-Hosting Guide](docs/SELF_HOSTING.md) | Tier 1 Local Node setup and configuration |\n| [Hub Federation Guide](docs/HUB_FEDERATION.md) | Tier 2 Hub architecture and setup (planned) |\n| [Security Policy](SECURITY.md) | Vulnerability reporting and security best practices |\n\n---\n\n## Contributing\n\nContributions welcome! See the [project board](https://github.com/users/martinfrasch/projects/8) for tracked issues.\n\n- New connectors (ORCID enrichment, PubMed, OpenAlex)\n- Affiliation-based geographic mapping\n- MCP server for inter-agentic discovery\n- UI/UX improvements\n- Bug fixes and optimizations\n\n---\n\n## License\n\nMIT License. See [LICENSE](LICENSE).\n\n---\n\n## Contact\n\n- **Platform**: [researchtwin.net](https://researchtwin.net)\n- **Email**: martin@researchtwin.net\n- **Issues**: [GitHub Issues](https://github.com/martinfrasch/researchtwin/issues)\n\n---\n\n*Empowering researchers and AI agents to discover, collaborate, and innovate together.*\n",
  "bytes": 8325,
  "sha": "b36c111a3952539cf47c9827f25fd4f3b2447f68dc11c021d05322b495a688eb",
  "repo_slug": "martinfrasch/researchtwin",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_martinfrasch_researchtwin_33df795c/readme"
}