Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Person/Contact Agent for LinkedIn Profile Management and Contact Querying #354

Open
7 tasks
jravenel opened this issue Feb 11, 2025 · 0 comments
Open
7 tasks
Assignees
Labels
enhancement New feature or request

Comments

@jravenel
Copy link
Contributor

Context

We need to create a dedicated Person Agent that can manage LinkedIn profiles and query contacts through the triplestore, replacing the current AIA implementation. This agent should integrate with our existing Person ontology and handle profile data management efficiently.

Current State

  • Using legacy AIA notebook-based implementation and storage is on the workspace S3 /aia of a Naas Workspace
  • No dedicated agent for person/contact management
  • LinkedIn profile data not properly integrated with Person ontology
  • No standardized way to query contacts

Example Interactions

  1. Store by URL

    User: "Store profile: https://linkedin.com/in/jeremyravenel"
    Agent: "Processing profile for Jeremy Ravenel..."
    
  2. Store by Name

    User: "Store profile for: Jeremy Ravenel"
    Agent: "Found profile at linkedin.com/in/jeremyravenel. Processing..."
    
  3. Create Contact

    User: "Create AIA for Jeremy in workspace dev-1234"
    Agent: "Creating AIA... AIA ID: aia-5678"
    

Requirements

1. Person Agent Implementation

  • Create PersonAgent class that can:
    • Accept LinkedIn URL as input
    • Store profile data in triplestore
    • Query contacts based on various criteria
    • Handle rate-limited LinkedIn API calls (1/minute)
    • Update existing profiles
    • Map LinkedIn data to Person ontology

2. Data Model Integration

  • Leverage existing ontology classes:
    • cco:ont00001262 (Person)
    • abi:ActOfPostingonLinkedIn
    • abi:ProfessionalSkills
    • abi:hasPlatformUser -> we need to consider remaning to UserProfile (not everything is platform)
    • abi:hasContact
    • abi:hasEmailAddress

3. API Endpoints

# Core endpoints needed:
POST /person/linkedin          # Store LinkedIn profile
GET /person/contacts          # Query contacts
PUT /person/linkedin/{id}     # Update profile
GET /person/linkedin/{id}     # Get profile

Technical Specifications

  1. Rate Limiting

    • Implement 1 request/minute limit for LinkedIn API
    • Queue system for batch processing
    • Track last update timestamps
  2. Data Storage

    • JSON storage in storage/person
    • RDF triples in triplestore
    • Maintain relationships between entities
  3. Query Capabilities

    • Filter by skills
    • Filter by location
    • Filter by company
    • Filter by connection degree
    • Full-text search
    • Temporal queries

Implementation Steps

  1. Create PersonAgent class
  2. Implement LinkedIn profile storage
  3. Add contact querying functionality
  4. Add rate limiting
  5. Create API endpoints
  6. Add tests
  7. Update documentation

Dependencies

  • PersonOntology.ttl
  • LinkedInOntology.ttl
  • LinkedIn API integration
  • Triplestore access

Validation Rules

  1. LinkedIn URL format validation
  2. Rate limiting compliance
  3. Required profile fields validation
  4. Data consistency checks
  5. Ontology compliance validation

Questions to Address

  1. How to handle private profiles?
  2. What is the profile update frequency?
  3. How to handle connection degree changes?
  4. What is the contact scoring mechanism?

Acceptance Criteria

  • Agent can store LinkedIn profiles with rate limiting
  • Contact querying works with all specified filters
  • Profile updates maintain data consistency
  • All tests pass
  • Documentation complete
  • Proper error handling implemented
  • Ontology relationships maintained

Related Files

  • src/core/ontologies/domain-level/PersonOntology.ttl
  • src/core/ontologies/application-level/LinkedInOntology.ttl
  • src/core/agents/PersonAgent.py (to be created)
  • src/core/integrations/LinkedInIntegration.py
@jravenel jravenel changed the title Implement Contact Agent for LinkedIn Profile Management and Contact Querying Implement Person/Contact Agent for LinkedIn Profile Management and Contact Querying Feb 11, 2025
@jravenel jravenel self-assigned this Feb 11, 2025
@jravenel jravenel added the enhancement New feature or request label Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant