research-link-ai / docs /agent-design.md
MHamdan's picture
Deploy Research-Link-AI (Docker Space, offline demo)
a753e74 verified
|
Raw
History Blame Contribute Delete
2.05 kB
# Agent Design: ResearchLink AI
## Agent Responsibilities
| Agent | Input | Output | Uses LLM? |
|-------|-------|--------|-----------|
| IntakeAgent | raw dict | IngestionInput | No |
| SourceResolverAgent | IngestionInput | ResolvedSources | No |
| PDFExtractionAgent | ResolvedSources | PaperExtraction | No |
| MetadataAgent | IngestionInput + PaperExtraction | PaperMetadata | Yes |
| CitationVerificationAgent | PaperExtraction + bibtex | CitationReport | No |
| GitHubRepoAnalyzerAgent | github_url | RepoAnalysis | No |
| PaperDigestAgent | PaperMetadata + PaperExtraction | dict[str, str] | Yes |
| LiteratureReviewAgent | PaperMetadata + PaperExtraction | dict[str, str] | Yes |
| ConceptMapAgent | PaperMetadata + PaperExtraction | dict[str, str] | Yes |
| ImplementationLinkAgent | PaperMetadata + RepoAnalysis | dict[str, str] | Yes |
| ReproducibilityAgent | PaperMetadata + RepoAnalysis + Extraction | dict[str, str] | Yes |
| LimitationsAgent | PaperMetadata + PaperExtraction | dict[str, str] | Yes |
| TeachingPathAgent | PaperMetadata + PaperExtraction | dict[str, str] | Yes |
| LabsGeneratorAgent | PaperMetadata + PaperExtraction | dict[str, str] | Yes |
| ReviewerAgent | PaperMetadata + CitationReport + content | dict[str, str] | Yes |
| ExportAgent | All above | GenerationReport | No |
## Base Agent
All agents inherit from `BaseAgent` which provides:
- `_call_llm(system, user)` β€” standardised Anthropic API call
- `log(message)` β€” verbose-gated console logging
- `warn(message)` β€” always-visible warnings
- Settings injection via `get_settings()`
## Failure Handling
Every agent catches exceptions internally and returns partial results with notes.
The pipeline continues even if individual agents fail.
All failures are collected in the `GenerationReport`.
## LLM System Prompts
Each content-generating agent has a focused system prompt that:
1. States the agent's role
2. Mandates the label system (`[paper-claim]`, `[needs-verification]`, etc.)
3. Forbids inventing citations
4. Specifies output format