Archivist Aigent
This example demonstrates a specialized archivist agent built with the Aigency framework. The Archivist Aigent acts as an investigation case librarian: it queries a RAG (Retrieval-Augmented Generation) database with historical cases to provide relevant information, patterns, and precedents that can help in current investigations.
Use Cases
The Archivist Aigent is ideal for precedent search, pattern analysis, and historical case consultation.
Similar Case Search
Finds historical cases with characteristics similar to the current case. Example Query:
"Search for previous cases of corporate document theft involving internal employees."Agent’s Likely Response: “I found 3 similar cases in the archives: Case #2019-045 (internal theft at tech company), Case #2021-112 (document leak by disgruntled employee), and Case #2020-089 (confidential information theft). Common patterns include: after-hours access, USB device usage, and economic motivation or personal revenge.”
Pattern Analysis
Identifies trends and recurring methods in historical cases. Example Query:
"What behavioral patterns do missing person cases in urban areas show?"Agent’s Likely Response: “Based on 15 archived urban disappearance cases, the most frequent patterns are: 72% occur between 6:00 PM-2:00 AM, 45% involve public transportation as the last known point, and 60% are resolved within the first 48 hours when there are witnesses. I recommend prioritizing security cameras at transportation stations.”
Precedent Consultation
Provides detailed information about specific cases and their resolutions. Example Query:
"I need details on how financial fraud case #2018-234 was resolved."Agent’s Likely Response: “Case #2018-234: Financial fraud resolved through bank transaction analysis and collaboration with financial institutions. Key methods: electronic transfer tracking, spending pattern analysis, and bank employee testimonies. Resolution time: 6 weeks. Crucial evidence: IP records and transaction geolocation.”
System Architecture
A central agent with MCP services for accessing the RAG database of historical cases.
Archivist Aigent
This agent serves as the specialized librarian, providing intelligent access to historical cases and pattern analysis.
Key Responsibilities:
- Query the RAG database with historical investigation cases
- Identify patterns and trends in similar cases
- Provide relevant historical context for current investigations
- Suggest investigation methods based on previous successful cases
- Maintain confidentiality and privacy of sensitive information
RAG Search, Pattern Analysis, Precedent Consultation, Historical Recommendations.System Diagram
Prerequisites
Install Docker and Docker Compose
Follow the instructions for your operating system to install Docker and Docker Compose.
Download the Repository
git clone https://github.com/aigency-project/demo-archivist-agentConfigure your environment variables in a .env file in the project root
Visit Google AI Studio to generate your Gemini API key, since this agent uses the gemini-2.0-flash model.
GEMINI_API_KEY=your_gemini_api_key
GOOGLE_GENAI_USE_VERTEXAI=FALSEExecution
Run the following command from the archivist_agent directory:
docker-compose up --buildAccess Ports
Once running, the services are available at these ports:
Archivist Agent: http://localhost:8083 (Main entry point)A2A Inspector: http://localhost:6008
Monitoring and Observability
- A2A Inspector: Agent inspection tools at http://localhost:6008.
- Logs: The agent generates logs for tracking and debugging.
Extensibility
The system is designed to be easily expanded:
- New Data Sources: Integration with police files, forensic databases, judicial records
- New Skills: Temporal case analysis, pattern prediction, automatic report generation
- New Integrations: Connection with current case management systems, forensic analysis tools