Install
openclaw skills install people-strategyManage and query a persistent SQLite-based graph of people and their relationships for personal CRM, org charts, mentorship, and collaboration mapping.
openclaw skills install people-strategyA people relationship management agent skill that provides persistent graph-based storage using SQLite database. This skill enables AI agents to create, manage, and query a network of people and their relationships, making it ideal for building personal CRMs, organizational charts, mentorship networks, and collaboration mapping.
people
id: INTEGER PRIMARY KEYname: TEXT NOT NULLrole: TEXTrelation_to_me: TEXTorganization: TEXTcharacter: TEXTnotes: TEXTcreated_at: TIMESTAMPupdated_at: TIMESTAMPedges
id: INTEGER PRIMARY KEYfrom_person_id: INTEGER (FK to people.id)to_person_id: INTEGER (FK to people.id)relationship_type: TEXT NOT NULLdescription: TEXTcreated_at: TIMESTAMPupdated_at: TIMESTAMPidx_people_name: Index on people.nameidx_edges_from: Index on edges.from_person_ididx_edges_to: Index on edges.to_person_id# Person operations
python people_skill.py add-person "Jane Doe" --role "CTO" --org "StartupXYZ" --relation "Mentor"
python people_skill.py get-person 1
python people_skill.py search "engineer"
python people_skill.py list-people --org "StartupXYZ"
python people_skill.py update-person 1 --notes "Coffee meeting scheduled"
python people_skill.py delete-person 1
# Relationship operations
python people_skill.py add-relationship 1 2 "mentors" --description "Tech career guidance"
python people_skill.py get-relationships 1
python people_skill.py list-relationships
python people_skill.py update-relationship 1 --type "coaches"
python people_skill.py delete-relationship 1
# Graph operations
python people_skill.py get-graph
python people_skill.py get-network 1
from database import PeopleDatabase
from people_skill import PeopleAgent
# Initialize
agent = PeopleAgent("people.db")
# Add people
result = agent.add_person(
name="Alice Johnson",
role="VP Engineering",
relation_to_me="Former colleague",
organization="TechCorp",
character="Strategic thinker, empathetic leader",
notes="Worked together 2020-2022"
)
person_id = result["person_id"]
# Add relationship
agent.add_relationship(
from_person_id=1,
to_person_id=2,
relationship_type="manages",
description="Direct manager relationship"
)
# Query network
network = agent.get_person_network(person_id)
print(f"Found {network['connections_count']} connections")
# Export graph
graph = agent.get_graph()
print(f"Graph: {graph['nodes_count']} nodes, {graph['edges_count']} edges")
reports_to: Hierarchical reporting (subordinate → manager)manages: Hierarchical management (manager → subordinate)works_with: Peer collaborationmentors: Mentorship (mentor → mentee)mentored_by: Inverse mentorship (mentee → mentor)friends_with: Personal friendshipknows: Acquaintancecollaborates_with: Project collaborationintroduced_by: Connection sourceTrack professional contacts, their roles, organizations, and how you know them. Add notes about conversations, meetings, or follow-ups.
python people_skill.py add-person "Sarah Chen" \
--role "Product Director" \
--org "InnovateCo" \
--relation "Met at conference" \
--notes "Interested in API collaboration, follow up Q2"
Build and maintain organizational charts with reporting relationships.
# Add team members
python people_skill.py add-person "Mike Lead" --role "Team Lead" --org "Engineering"
python people_skill.py add-person "Dev One" --role "Engineer" --org "Engineering"
python people_skill.py add-person "Dev Two" --role "Engineer" --org "Engineering"
# Create reporting structure
python people_skill.py add-relationship 2 1 "reports_to"
python people_skill.py add-relationship 3 1 "reports_to"
Track mentorship relationships and career guidance connections.
python people_skill.py add-relationship 5 3 "mentors" \
--description "Career guidance in ML/AI"
Map who works with whom on projects.
python people_skill.py add-relationship 1 2 "works_with" \
--description "Project Phoenix collaboration"
Analyze your professional network to identify key connections.
# View someone's complete network
python people_skill.py get-network 1
# Export for visualization
python people_skill.py get-graph > network.json
The system automatically handles both directions:
# Get all relationships for a person
edges = db.get_all_edges_for_person(person_id)
# Returns: {"outgoing": [...], "incoming": [...]}
Deleting a person automatically removes all associated relationships.
The UNIQUE constraint prevents duplicate relationships between the same two people with the same type.
Search works across multiple fields:
python people_skill.py search "engineer"
# Matches: names, roles, organizations
# Export graph for tools like D3.js, Cytoscape, Gephi
python people_skill.py get-graph > graph.json
import csv
from people_skill import PeopleAgent
agent = PeopleAgent()
with open('contacts.csv', 'r') as f:
reader = csv.DictReader(f)
for row in reader:
agent.add_person(
name=row['name'],
role=row['role'],
organization=row['org'],
relation_to_me=row['relation']
)
See people_skill.py for complete API documentation.
PeopleDatabase: Low-level database operationsPeopleAgent: High-level agent interface with result dictionariesAll agent methods return dictionaries with:
success: Boolean indicating success/failuremessage: Human-readable status message (on errors)The skill includes comprehensive error handling:
Potential extensions:
MIT