remdb 0.3.242__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of remdb might be problematic. Click here for more details.

Files changed (235) hide show
  1. rem/__init__.py +129 -0
  2. rem/agentic/README.md +760 -0
  3. rem/agentic/__init__.py +54 -0
  4. rem/agentic/agents/README.md +155 -0
  5. rem/agentic/agents/__init__.py +38 -0
  6. rem/agentic/agents/agent_manager.py +311 -0
  7. rem/agentic/agents/sse_simulator.py +502 -0
  8. rem/agentic/context.py +425 -0
  9. rem/agentic/context_builder.py +360 -0
  10. rem/agentic/llm_provider_models.py +301 -0
  11. rem/agentic/mcp/__init__.py +0 -0
  12. rem/agentic/mcp/tool_wrapper.py +273 -0
  13. rem/agentic/otel/__init__.py +5 -0
  14. rem/agentic/otel/setup.py +240 -0
  15. rem/agentic/providers/phoenix.py +926 -0
  16. rem/agentic/providers/pydantic_ai.py +854 -0
  17. rem/agentic/query.py +117 -0
  18. rem/agentic/query_helper.py +89 -0
  19. rem/agentic/schema.py +737 -0
  20. rem/agentic/serialization.py +245 -0
  21. rem/agentic/tools/__init__.py +5 -0
  22. rem/agentic/tools/rem_tools.py +242 -0
  23. rem/api/README.md +657 -0
  24. rem/api/deps.py +253 -0
  25. rem/api/main.py +460 -0
  26. rem/api/mcp_router/prompts.py +182 -0
  27. rem/api/mcp_router/resources.py +820 -0
  28. rem/api/mcp_router/server.py +243 -0
  29. rem/api/mcp_router/tools.py +1605 -0
  30. rem/api/middleware/tracking.py +172 -0
  31. rem/api/routers/admin.py +520 -0
  32. rem/api/routers/auth.py +898 -0
  33. rem/api/routers/chat/__init__.py +5 -0
  34. rem/api/routers/chat/child_streaming.py +394 -0
  35. rem/api/routers/chat/completions.py +702 -0
  36. rem/api/routers/chat/json_utils.py +76 -0
  37. rem/api/routers/chat/models.py +202 -0
  38. rem/api/routers/chat/otel_utils.py +33 -0
  39. rem/api/routers/chat/sse_events.py +546 -0
  40. rem/api/routers/chat/streaming.py +950 -0
  41. rem/api/routers/chat/streaming_utils.py +327 -0
  42. rem/api/routers/common.py +18 -0
  43. rem/api/routers/dev.py +87 -0
  44. rem/api/routers/feedback.py +276 -0
  45. rem/api/routers/messages.py +620 -0
  46. rem/api/routers/models.py +86 -0
  47. rem/api/routers/query.py +362 -0
  48. rem/api/routers/shared_sessions.py +422 -0
  49. rem/auth/README.md +258 -0
  50. rem/auth/__init__.py +36 -0
  51. rem/auth/jwt.py +367 -0
  52. rem/auth/middleware.py +318 -0
  53. rem/auth/providers/__init__.py +16 -0
  54. rem/auth/providers/base.py +376 -0
  55. rem/auth/providers/email.py +215 -0
  56. rem/auth/providers/google.py +163 -0
  57. rem/auth/providers/microsoft.py +237 -0
  58. rem/cli/README.md +517 -0
  59. rem/cli/__init__.py +8 -0
  60. rem/cli/commands/README.md +299 -0
  61. rem/cli/commands/__init__.py +3 -0
  62. rem/cli/commands/ask.py +549 -0
  63. rem/cli/commands/cluster.py +1808 -0
  64. rem/cli/commands/configure.py +495 -0
  65. rem/cli/commands/db.py +828 -0
  66. rem/cli/commands/dreaming.py +324 -0
  67. rem/cli/commands/experiments.py +1698 -0
  68. rem/cli/commands/mcp.py +66 -0
  69. rem/cli/commands/process.py +388 -0
  70. rem/cli/commands/query.py +109 -0
  71. rem/cli/commands/scaffold.py +47 -0
  72. rem/cli/commands/schema.py +230 -0
  73. rem/cli/commands/serve.py +106 -0
  74. rem/cli/commands/session.py +453 -0
  75. rem/cli/dreaming.py +363 -0
  76. rem/cli/main.py +123 -0
  77. rem/config.py +244 -0
  78. rem/mcp_server.py +41 -0
  79. rem/models/core/__init__.py +49 -0
  80. rem/models/core/core_model.py +70 -0
  81. rem/models/core/engram.py +333 -0
  82. rem/models/core/experiment.py +672 -0
  83. rem/models/core/inline_edge.py +132 -0
  84. rem/models/core/rem_query.py +246 -0
  85. rem/models/entities/__init__.py +68 -0
  86. rem/models/entities/domain_resource.py +38 -0
  87. rem/models/entities/feedback.py +123 -0
  88. rem/models/entities/file.py +57 -0
  89. rem/models/entities/image_resource.py +88 -0
  90. rem/models/entities/message.py +64 -0
  91. rem/models/entities/moment.py +123 -0
  92. rem/models/entities/ontology.py +181 -0
  93. rem/models/entities/ontology_config.py +131 -0
  94. rem/models/entities/resource.py +95 -0
  95. rem/models/entities/schema.py +87 -0
  96. rem/models/entities/session.py +84 -0
  97. rem/models/entities/shared_session.py +180 -0
  98. rem/models/entities/subscriber.py +175 -0
  99. rem/models/entities/user.py +93 -0
  100. rem/py.typed +0 -0
  101. rem/registry.py +373 -0
  102. rem/schemas/README.md +507 -0
  103. rem/schemas/__init__.py +6 -0
  104. rem/schemas/agents/README.md +92 -0
  105. rem/schemas/agents/core/agent-builder.yaml +235 -0
  106. rem/schemas/agents/core/moment-builder.yaml +178 -0
  107. rem/schemas/agents/core/rem-query-agent.yaml +226 -0
  108. rem/schemas/agents/core/resource-affinity-assessor.yaml +99 -0
  109. rem/schemas/agents/core/simple-assistant.yaml +19 -0
  110. rem/schemas/agents/core/user-profile-builder.yaml +163 -0
  111. rem/schemas/agents/examples/contract-analyzer.yaml +317 -0
  112. rem/schemas/agents/examples/contract-extractor.yaml +134 -0
  113. rem/schemas/agents/examples/cv-parser.yaml +263 -0
  114. rem/schemas/agents/examples/hello-world.yaml +37 -0
  115. rem/schemas/agents/examples/query.yaml +54 -0
  116. rem/schemas/agents/examples/simple.yaml +21 -0
  117. rem/schemas/agents/examples/test.yaml +29 -0
  118. rem/schemas/agents/rem.yaml +132 -0
  119. rem/schemas/evaluators/hello-world/default.yaml +77 -0
  120. rem/schemas/evaluators/rem/faithfulness.yaml +219 -0
  121. rem/schemas/evaluators/rem/lookup-correctness.yaml +182 -0
  122. rem/schemas/evaluators/rem/retrieval-precision.yaml +199 -0
  123. rem/schemas/evaluators/rem/retrieval-recall.yaml +211 -0
  124. rem/schemas/evaluators/rem/search-correctness.yaml +192 -0
  125. rem/services/__init__.py +18 -0
  126. rem/services/audio/INTEGRATION.md +308 -0
  127. rem/services/audio/README.md +376 -0
  128. rem/services/audio/__init__.py +15 -0
  129. rem/services/audio/chunker.py +354 -0
  130. rem/services/audio/transcriber.py +259 -0
  131. rem/services/content/README.md +1269 -0
  132. rem/services/content/__init__.py +5 -0
  133. rem/services/content/providers.py +760 -0
  134. rem/services/content/service.py +762 -0
  135. rem/services/dreaming/README.md +230 -0
  136. rem/services/dreaming/__init__.py +53 -0
  137. rem/services/dreaming/affinity_service.py +322 -0
  138. rem/services/dreaming/moment_service.py +251 -0
  139. rem/services/dreaming/ontology_service.py +54 -0
  140. rem/services/dreaming/user_model_service.py +297 -0
  141. rem/services/dreaming/utils.py +39 -0
  142. rem/services/email/__init__.py +10 -0
  143. rem/services/email/service.py +522 -0
  144. rem/services/email/templates.py +360 -0
  145. rem/services/embeddings/__init__.py +11 -0
  146. rem/services/embeddings/api.py +127 -0
  147. rem/services/embeddings/worker.py +435 -0
  148. rem/services/fs/README.md +662 -0
  149. rem/services/fs/__init__.py +62 -0
  150. rem/services/fs/examples.py +206 -0
  151. rem/services/fs/examples_paths.py +204 -0
  152. rem/services/fs/git_provider.py +935 -0
  153. rem/services/fs/local_provider.py +760 -0
  154. rem/services/fs/parsing-hooks-examples.md +172 -0
  155. rem/services/fs/paths.py +276 -0
  156. rem/services/fs/provider.py +460 -0
  157. rem/services/fs/s3_provider.py +1042 -0
  158. rem/services/fs/service.py +186 -0
  159. rem/services/git/README.md +1075 -0
  160. rem/services/git/__init__.py +17 -0
  161. rem/services/git/service.py +469 -0
  162. rem/services/phoenix/EXPERIMENT_DESIGN.md +1146 -0
  163. rem/services/phoenix/README.md +453 -0
  164. rem/services/phoenix/__init__.py +46 -0
  165. rem/services/phoenix/client.py +960 -0
  166. rem/services/phoenix/config.py +88 -0
  167. rem/services/phoenix/prompt_labels.py +477 -0
  168. rem/services/postgres/README.md +757 -0
  169. rem/services/postgres/__init__.py +49 -0
  170. rem/services/postgres/diff_service.py +599 -0
  171. rem/services/postgres/migration_service.py +427 -0
  172. rem/services/postgres/programmable_diff_service.py +635 -0
  173. rem/services/postgres/pydantic_to_sqlalchemy.py +562 -0
  174. rem/services/postgres/register_type.py +353 -0
  175. rem/services/postgres/repository.py +481 -0
  176. rem/services/postgres/schema_generator.py +661 -0
  177. rem/services/postgres/service.py +802 -0
  178. rem/services/postgres/sql_builder.py +355 -0
  179. rem/services/rate_limit.py +113 -0
  180. rem/services/rem/README.md +318 -0
  181. rem/services/rem/__init__.py +23 -0
  182. rem/services/rem/exceptions.py +71 -0
  183. rem/services/rem/executor.py +293 -0
  184. rem/services/rem/parser.py +180 -0
  185. rem/services/rem/queries.py +196 -0
  186. rem/services/rem/query.py +371 -0
  187. rem/services/rem/service.py +608 -0
  188. rem/services/session/README.md +374 -0
  189. rem/services/session/__init__.py +13 -0
  190. rem/services/session/compression.py +488 -0
  191. rem/services/session/pydantic_messages.py +310 -0
  192. rem/services/session/reload.py +85 -0
  193. rem/services/user_service.py +130 -0
  194. rem/settings.py +1877 -0
  195. rem/sql/background_indexes.sql +52 -0
  196. rem/sql/migrations/001_install.sql +983 -0
  197. rem/sql/migrations/002_install_models.sql +3157 -0
  198. rem/sql/migrations/003_optional_extensions.sql +326 -0
  199. rem/sql/migrations/004_cache_system.sql +282 -0
  200. rem/sql/migrations/005_schema_update.sql +145 -0
  201. rem/sql/migrations/migrate_session_id_to_uuid.sql +45 -0
  202. rem/utils/AGENTIC_CHUNKING.md +597 -0
  203. rem/utils/README.md +628 -0
  204. rem/utils/__init__.py +61 -0
  205. rem/utils/agentic_chunking.py +622 -0
  206. rem/utils/batch_ops.py +343 -0
  207. rem/utils/chunking.py +108 -0
  208. rem/utils/clip_embeddings.py +276 -0
  209. rem/utils/constants.py +97 -0
  210. rem/utils/date_utils.py +228 -0
  211. rem/utils/dict_utils.py +98 -0
  212. rem/utils/embeddings.py +436 -0
  213. rem/utils/examples/embeddings_example.py +305 -0
  214. rem/utils/examples/sql_types_example.py +202 -0
  215. rem/utils/files.py +323 -0
  216. rem/utils/markdown.py +16 -0
  217. rem/utils/mime_types.py +158 -0
  218. rem/utils/model_helpers.py +492 -0
  219. rem/utils/schema_loader.py +649 -0
  220. rem/utils/sql_paths.py +146 -0
  221. rem/utils/sql_types.py +350 -0
  222. rem/utils/user_id.py +81 -0
  223. rem/utils/vision.py +325 -0
  224. rem/workers/README.md +506 -0
  225. rem/workers/__init__.py +7 -0
  226. rem/workers/db_listener.py +579 -0
  227. rem/workers/db_maintainer.py +74 -0
  228. rem/workers/dreaming.py +502 -0
  229. rem/workers/engram_processor.py +312 -0
  230. rem/workers/sqs_file_processor.py +193 -0
  231. rem/workers/unlogged_maintainer.py +463 -0
  232. remdb-0.3.242.dist-info/METADATA +1632 -0
  233. remdb-0.3.242.dist-info/RECORD +235 -0
  234. remdb-0.3.242.dist-info/WHEEL +4 -0
  235. remdb-0.3.242.dist-info/entry_points.txt +2 -0
@@ -0,0 +1,99 @@
1
+ type: object
2
+ description: "You are a ResourceAffinityAssessor agent that analyzes relationships\
3
+ \ between resources and determines semantic connections.\n\nYour task is to assess\
4
+ \ how two resources relate to each other and determine:\n1. **Relationship Type**:\
5
+ \ The nature of their connection\n2. **Relationship Strength**: How strong/important\
6
+ \ the connection is\n3. **Edge Labels**: Descriptive labels for the relationship\n\
7
+ \n## Relationship Types\n\nChoose the most accurate relationship type:\n- **similar_topic**:\
8
+ \ Resources discuss the same topic but from different angles\n- **builds_on**: One\
9
+ \ resource extends or develops ideas from another\n- **references**: One resource\
10
+ \ explicitly mentions or cites another\n- **depends_on**: One resource requires\
11
+ \ understanding of another\n- **implements**: One resource is an implementation\
12
+ \ of concepts from another\n- **contradicts**: Resources present opposing viewpoints\n\
13
+ - **complements**: Resources cover different aspects of the same system\n- **temporal_sequence**:\
14
+ \ Resources represent sequential stages in a process\n- **same_project**: Resources\
15
+ \ belong to the same project or initiative\n- **same_context**: Resources share\
16
+ \ the same organizational/team context\n\n## Relationship Strength\n\nAssess the\
17
+ \ strength of the relationship:\n- **strong** (0.8-1.0): Direct dependency, explicit\
18
+ \ reference, same project\n- **moderate** (0.5-0.7): Related topics, complementary\
19
+ \ content, shared context\n- **weak** (0.3-0.4): Tangential connection, minor overlap\n\
20
+ \n## Edge Labels\n\nProvide 1-3 descriptive labels (kebab-case) that capture the\
21
+ \ relationship:\n- Technology/tool names: \"graphql\", \"tidb\", \"kubernetes\"\n\
22
+ - Project names: \"api-migration\", \"database-upgrade\"\n- Concepts: \"scalability\"\
23
+ , \"performance\", \"incident-response\"\n- Context: \"q1-planning\", \"team-standup\"\
24
+ , \"technical-debt\"\n\n## Assessment Guidelines\n\n**DO:**\n- Consider explicit\
25
+ \ references (mentions by name)\n- Look for shared technologies, projects, or people\n\
26
+ - Identify temporal relationships (planning → implementation → review)\n- Note conceptual\
27
+ \ connections (problem → solution)\n\n**DON'T:**\n- Force connections where none\
28
+ \ exist (it's okay to say \"unrelated\")\n- Over-weight superficial keyword matches\n\
29
+ - Ignore directional relationships (A builds on B ≠ B builds on A)\n\n## Input Format\n\
30
+ \nYou receive two resources to compare:\n```json\n{\n \"resource_a\": {\n \"\
31
+ id\": \"uuid\",\n \"name\": \"Resource Title\",\n \"category\": \"documentation|meeting|reflection|...\"\
32
+ ,\n \"content\": \"Full text content...\",\n \"resource_timestamp\": \"2025-01-15T09:00:00Z\"\
33
+ \n },\n \"resource_b\": {\n \"id\": \"uuid\",\n \"name\": \"Resource Title\"\
34
+ ,\n \"category\": \"documentation|meeting|reflection|...\",\n \"content\"\
35
+ : \"Full text content...\",\n \"resource_timestamp\": \"2025-01-16T14:00:00Z\"\
36
+ \n }\n}\n```\n\n## Output Requirements\n\nFor each pair, provide:\n- **relationship_exists**:\
37
+ \ Boolean (true if resources are meaningfully related)\n- **relationship_type**:\
38
+ \ One of the types listed above (if related)\n- **relationship_strength**: \"strong\"\
39
+ |\"moderate\"|\"weak\" (if related)\n- **edge_labels**: List of 1-3 descriptive\
40
+ \ labels (if related)\n- **reasoning**: 1-2 sentence explanation of the relationship\
41
+ \ (always provide)\n\nIf resources are **unrelated**, set relationship_exists=false\
42
+ \ and explain why.\n\n## Example Assessment\n\n**Input:**\n- Resource A: \"GraphQL\
43
+ \ POC Results - Performance Analysis\"\n- Resource B: \"API Design Discussion -\
44
+ \ RESTful vs GraphQL\"\n\n**Output:**\n```json\n{\n \"relationship_exists\": true,\n\
45
+ \ \"relationship_type\": \"implements\",\n \"relationship_strength\": \"strong\"\
46
+ ,\n \"edge_labels\": [\"graphql-migration\", \"api-design\", \"performance\"],\n\
47
+ \ \"reasoning\": \"Resource A implements and validates the GraphQL approach discussed\
48
+ \ in Resource B. Direct temporal sequence from planning to implementation.\"\n}\n\
49
+ ```\n"
50
+ properties:
51
+ relationship_exists:
52
+ type: boolean
53
+ description: Whether a meaningful relationship exists between the resources
54
+ relationship_type:
55
+ type: string
56
+ enum:
57
+ - similar_topic
58
+ - builds_on
59
+ - references
60
+ - depends_on
61
+ - implements
62
+ - contradicts
63
+ - complements
64
+ - temporal_sequence
65
+ - same_project
66
+ - same_context
67
+ - unrelated
68
+ description: The type of relationship between resources (if relationship_exists=true)
69
+ relationship_strength:
70
+ type: string
71
+ enum:
72
+ - strong
73
+ - moderate
74
+ - weak
75
+ description: Strength of the relationship (if relationship_exists=true)
76
+ edge_labels:
77
+ type: array
78
+ items:
79
+ type: string
80
+ description: Descriptive labels for the relationship in kebab-case (1-3 labels,
81
+ if relationship_exists=true)
82
+ minItems: 0
83
+ maxItems: 3
84
+ reasoning:
85
+ type: string
86
+ description: 1-2 sentence explanation of the relationship or why resources are
87
+ unrelated
88
+ required:
89
+ - relationship_exists
90
+ - reasoning
91
+ json_schema_extra:
92
+ kind: agent
93
+ name: resource-affinity-assessor
94
+ version: 1.0.0
95
+ tags:
96
+ - dreaming
97
+ - resource-affinity
98
+ - graph-building
99
+ category: agent
@@ -0,0 +1,19 @@
1
+ type: object
2
+ description: |
3
+ You are a helpful assistant. Respond to user messages in a friendly and concise manner.
4
+ You do not have access to any external data or tools - just respond based on the conversation.
5
+
6
+ properties:
7
+ answer:
8
+ type: string
9
+ description: Your response to the user's message
10
+
11
+ required:
12
+ - answer
13
+
14
+ json_schema_extra:
15
+ kind: agent
16
+ name: simple-assistant
17
+ version: 1.0.0
18
+ tools: []
19
+ resources: []
@@ -0,0 +1,163 @@
1
+ type: object
2
+ description: "You are a UserProfileBuilder agent that generates comprehensive user\
3
+ \ profiles from activity data.\n\nYour task is to analyze a user's recent activity\
4
+ \ (sessions, moments, resources) and create\na holistic profile that captures:\n\
5
+ 1. **Work Context**: What the user is working on, their role, responsibilities\n\
6
+ 2. **Technical Focus**: Technologies, tools, frameworks they use\n3. **Interests\
7
+ \ and Skills**: Areas of expertise and learning\n4. **Collaboration Patterns**:\
8
+ \ Teams, projects, people they work with\n5. **Work Style**: How they approach problems,\
9
+ \ communication patterns\n\n## Analysis Guidelines\n\n### Work Context\n- Identify\
10
+ \ ongoing projects and initiatives\n- Understand user's role (engineer, lead, manager,\
11
+ \ etc.)\n- Capture organizational context (team, department)\n- Note key responsibilities\
12
+ \ and priorities\n\n### Technical Focus\n- Extract technologies actively being used\n\
13
+ - Identify architectural patterns and approaches\n- Note tools and frameworks in\
14
+ \ daily workflow\n- Capture technical challenges being addressed\n\n### Interests\
15
+ \ and Skills\n- Areas of deep expertise (demonstrated through content)\n- Learning\
16
+ \ areas (questions, research, exploration)\n- Thought leadership topics (reflections,\
17
+ \ designs)\n- Technical depth vs breadth\n\n### Collaboration Patterns\n- Frequent\
18
+ \ collaborators (present_persons in moments)\n- Projects and initiatives being coordinated\n\
19
+ - Communication patterns (meetings, async, documentation)\n- Leadership and mentorship\
20
+ \ activities\n\n### Work Style\n- Problem-solving approach (analytical, experimental,\
21
+ \ collaborative)\n- Planning style (detailed vs adaptive)\n- Communication preferences\
22
+ \ (documentation, meetings, async)\n- Reflection and learning habits\n\n## Input\
23
+ \ Format\n\nYou receive user activity data:\n```json\n{\n \"user_id\": \"user-123\"\
24
+ ,\n \"tenant_id\": \"acme-corp\",\n \"time_window_days\": 30,\n \"sessions\"\
25
+ : [\n {\n \"id\": \"uuid\",\n \"query\": \"User question\",\n \
26
+ \ \"response\": \"Assistant response\",\n \"created_at\": \"2025-01-15T14:00:00Z\"\
27
+ ,\n \"metadata\": {}\n }\n ],\n \"moments\": [\n {\n \"id\": \"\
28
+ uuid\",\n \"name\": \"Team Standup\",\n \"moment_type\": \"meeting\",\n\
29
+ \ \"emotion_tags\": [\"focused\", \"collaborative\"],\n \"topic_tags\"\
30
+ : [\"api-design\", \"graphql\", \"planning\"],\n \"present_persons\": [{\"\
31
+ id\": \"alice\", \"name\": \"Alice Chen\"}],\n \"starts_timestamp\": \"2025-01-15T09:00:00Z\"\
32
+ \n }\n ],\n \"resources\": [\n {\n \"id\": \"uuid\",\n \"name\"\
33
+ : \"API Design Document\",\n \"category\": \"documentation\",\n \"content\"\
34
+ : \"Summary of content...\",\n \"resource_timestamp\": \"2025-01-15T09:00:00Z\"\
35
+ \n }\n ]\n}\n```\n\n## Output Requirements\n\nGenerate a comprehensive profile\
36
+ \ with:\n- **summary**: 2-3 paragraph high-level profile\n- **current_projects**:\
37
+ \ List of active projects/initiatives (with descriptions)\n- **technical_stack**:\
38
+ \ Technologies and tools in active use\n- **key_collaborators**: People frequently\
39
+ \ interacting with\n- **expertise_areas**: Demonstrated areas of expertise\n- **learning_interests**:\
40
+ \ Topics being explored or learned\n- **work_style_traits**: Behavioral and approach\
41
+ \ patterns\n- **recommended_tags**: 5-10 tags summarizing the profile\n\n## Example\
42
+ \ Output\n\n```json\n{\n \"summary\": \"Senior software engineer focused on API\
43
+ \ modernization and database scaling. Leading GraphQL migration while evaluating\
44
+ \ TiDB for horizontal scaling. Strong technical leadership with emphasis on documentation\
45
+ \ and collaborative decision-making.\",\n \"current_projects\": [\n {\n \
46
+ \ \"name\": \"GraphQL API Migration\",\n \"description\": \"Leading transition\
47
+ \ from REST to GraphQL for customer-facing API\",\n \"status\": \"in_progress\"\
48
+ ,\n \"technologies\": [\"GraphQL\", \"Apollo\", \"TypeScript\"]\n },\n \
49
+ \ {\n \"name\": \"TiDB Database Migration\",\n \"description\": \"Evaluating\
50
+ \ and planning migration from PostgreSQL to TiDB\",\n \"status\": \"planning\"\
51
+ ,\n \"technologies\": [\"TiDB\", \"PostgreSQL\", \"Kubernetes\"]\n }\n \
52
+ \ ],\n \"technical_stack\": [\n \"GraphQL\", \"Apollo Server\", \"TiDB\", \"\
53
+ PostgreSQL\", \"Kubernetes\",\n \"TypeScript\", \"React Native\", \"Node.js\"\
54
+ \n ],\n \"key_collaborators\": [\n {\"id\": \"mike-rodriguez\", \"name\": \"\
55
+ Mike Rodriguez\", \"context\": \"Backend engineer, GraphQL work\"},\n {\"id\"\
56
+ : \"alice-wong\", \"name\": \"Alice Wong\", \"context\": \"Frontend engineer, mobile\
57
+ \ app\"}\n ],\n \"expertise_areas\": [\n \"API design and architecture\",\n\
58
+ \ \"Database scaling and performance\",\n \"Distributed systems\",\n \"\
59
+ Technical leadership\"\n ],\n \"learning_interests\": [\n \"GraphQL federation\
60
+ \ patterns\",\n \"TiDB distributed architecture\",\n \"Kubernetes autoscaling\"\
61
+ \n ],\n \"work_style_traits\": [\n \"Documentation-first approach\",\n \"\
62
+ Collaborative decision-making\",\n \"Strategic planning with tactical execution\"\
63
+ ,\n \"Reflective and learning-oriented\"\n ],\n \"recommended_tags\": [\n \
64
+ \ \"api-architect\", \"backend-lead\", \"distributed-systems\",\n \"graphql-expert\"\
65
+ , \"kubernetes\", \"technical-leadership\",\n \"collaborative\", \"documentation-focused\"\
66
+ \n ]\n}\n```\n"
67
+ properties:
68
+ summary:
69
+ type: string
70
+ description: 2-3 paragraph high-level profile of the user
71
+ current_projects:
72
+ type: array
73
+ items:
74
+ type: object
75
+ properties:
76
+ name:
77
+ type: string
78
+ description: Project name
79
+ description:
80
+ type: string
81
+ description: What the project is about
82
+ status:
83
+ type: string
84
+ enum:
85
+ - planning
86
+ - in_progress
87
+ - completed
88
+ - paused
89
+ description: Project status
90
+ technologies:
91
+ type: array
92
+ items:
93
+ type: string
94
+ description: Technologies used in the project
95
+ required:
96
+ - name
97
+ - description
98
+ - status
99
+ description: Active projects and initiatives
100
+ technical_stack:
101
+ type: array
102
+ items:
103
+ type: string
104
+ description: Technologies, tools, and frameworks in active use
105
+ key_collaborators:
106
+ type: array
107
+ items:
108
+ type: object
109
+ properties:
110
+ id:
111
+ type: string
112
+ description: Collaborator identifier (kebab-case)
113
+ name:
114
+ type: string
115
+ description: Collaborator full name
116
+ context:
117
+ type: string
118
+ description: Context of collaboration (role, project, relationship)
119
+ required:
120
+ - id
121
+ - name
122
+ - context
123
+ description: People frequently collaborating with
124
+ expertise_areas:
125
+ type: array
126
+ items:
127
+ type: string
128
+ description: Demonstrated areas of expertise
129
+ learning_interests:
130
+ type: array
131
+ items:
132
+ type: string
133
+ description: Topics being explored or learned
134
+ work_style_traits:
135
+ type: array
136
+ items:
137
+ type: string
138
+ description: Behavioral and approach patterns
139
+ recommended_tags:
140
+ type: array
141
+ items:
142
+ type: string
143
+ description: 5-10 tags summarizing the profile (kebab-case)
144
+ minItems: 5
145
+ maxItems: 10
146
+ required:
147
+ - summary
148
+ - current_projects
149
+ - technical_stack
150
+ - key_collaborators
151
+ - expertise_areas
152
+ - learning_interests
153
+ - work_style_traits
154
+ - recommended_tags
155
+ json_schema_extra:
156
+ kind: agent
157
+ name: user-profile-builder
158
+ version: 1.0.0
159
+ tags:
160
+ - dreaming
161
+ - user-model
162
+ - profile-generation
163
+ category: agent
@@ -0,0 +1,317 @@
1
+ type: object
2
+ description: 'You are a Contract Analyzer specialized in extracting key terms from
3
+ legal agreements.
4
+
5
+
6
+ Your task is to analyze the provided contract text and extract:
7
+
8
+ - Contract type and parties involved
9
+
10
+ - Effective and termination dates
11
+
12
+ - Financial terms (amounts, payment schedules)
13
+
14
+ - Key obligations and deliverables
15
+
16
+ - Termination clauses and conditions
17
+
18
+ - Liability and indemnity provisions
19
+
20
+ - Confidentiality requirements
21
+
22
+ - Governing law and dispute resolution
23
+
24
+
25
+ Guidelines:
26
+
27
+ - Extract exact legal terms without paraphrasing
28
+
29
+ - Preserve monetary amounts with currency symbols
30
+
31
+ - Capture all parties with their legal entity names
32
+
33
+ - Identify both explicit and implicit obligations
34
+
35
+ - Flag unusual or risky clauses
36
+
37
+ - Assign confidence score based on contract clarity
38
+
39
+ - If information is ambiguous, note it in notes field
40
+
41
+
42
+ Output Format:
43
+
44
+ - Return structured JSON matching the schema below
45
+
46
+ - Ensure all dates are in ISO 8601 format (YYYY-MM-DD)
47
+
48
+ - Use arrays for lists (parties, obligations, risks)
49
+
50
+ - Include confidence_score (0.0-1.0) for overall extraction quality
51
+
52
+ '
53
+ properties:
54
+ contract_title:
55
+ type: string
56
+ description: Official contract title or name
57
+ contract_type:
58
+ type: string
59
+ description: Type of contract
60
+ enum:
61
+ - supplier_agreement
62
+ - service_agreement
63
+ - employment_contract
64
+ - nda
65
+ - partnership_agreement
66
+ - licensing_agreement
67
+ - lease_agreement
68
+ - consulting_agreement
69
+ - purchase_order
70
+ - master_services_agreement
71
+ - other
72
+ parties:
73
+ type: array
74
+ description: All parties to the contract
75
+ items:
76
+ type: object
77
+ properties:
78
+ legal_name:
79
+ type: string
80
+ description: Full legal entity name
81
+ role:
82
+ type: string
83
+ description: Party role in contract
84
+ enum:
85
+ - buyer
86
+ - seller
87
+ - supplier
88
+ - vendor
89
+ - client
90
+ - contractor
91
+ - employer
92
+ - employee
93
+ - licensor
94
+ - licensee
95
+ - lessor
96
+ - lessee
97
+ - partner
98
+ - other
99
+ address:
100
+ type: string
101
+ description: Registered address
102
+ representative:
103
+ type: string
104
+ description: Authorized representative name
105
+ required:
106
+ - legal_name
107
+ - role
108
+ effective_date:
109
+ type: string
110
+ description: Contract effective date (YYYY-MM-DD)
111
+ format: date
112
+ termination_date:
113
+ type: string
114
+ description: Contract end date (YYYY-MM-DD or "none" if perpetual)
115
+ contract_duration:
116
+ type: string
117
+ description: Duration in human-readable format (e.g., "2 years", "36 months")
118
+ auto_renewal:
119
+ type: boolean
120
+ description: Whether contract auto-renews
121
+ financial_terms:
122
+ type: object
123
+ description: Financial obligations and payment terms
124
+ properties:
125
+ total_contract_value:
126
+ type: string
127
+ description: Total contract value with currency (e.g., "$500,000 USD")
128
+ payment_schedule:
129
+ type: string
130
+ description: Payment frequency (e.g., "quarterly", "net-60")
131
+ currency:
132
+ type: string
133
+ description: Currency code (USD, EUR, GBP, etc.)
134
+ payment_method:
135
+ type: string
136
+ description: Payment method (wire transfer, check, etc.)
137
+ late_payment_penalty:
138
+ type: string
139
+ description: Late payment penalties if specified
140
+ price_escalation:
141
+ type: string
142
+ description: Price escalation clause if any
143
+ key_obligations:
144
+ type: array
145
+ description: Major obligations for each party
146
+ items:
147
+ type: object
148
+ properties:
149
+ party:
150
+ type: string
151
+ description: Which party has this obligation
152
+ obligation:
153
+ type: string
154
+ description: Description of the obligation
155
+ deadline:
156
+ type: string
157
+ description: Deadline or timeline if specified
158
+ consequences:
159
+ type: string
160
+ description: Consequences of non-performance
161
+ required:
162
+ - party
163
+ - obligation
164
+ deliverables:
165
+ type: array
166
+ description: Specific deliverables or milestones
167
+ items:
168
+ type: object
169
+ properties:
170
+ name:
171
+ type: string
172
+ description: Deliverable name
173
+ description:
174
+ type: string
175
+ description: Detailed description
176
+ due_date:
177
+ type: string
178
+ description: Due date if specified
179
+ acceptance_criteria:
180
+ type: string
181
+ description: Acceptance criteria
182
+ required:
183
+ - name
184
+ termination_clauses:
185
+ type: array
186
+ description: Conditions allowing contract termination
187
+ items:
188
+ type: object
189
+ properties:
190
+ condition:
191
+ type: string
192
+ description: Termination condition
193
+ notice_period:
194
+ type: string
195
+ description: Required notice period (e.g., "30 days")
196
+ party:
197
+ type: string
198
+ description: Which party can terminate under this condition
199
+ required:
200
+ - condition
201
+ liability_provisions:
202
+ type: object
203
+ description: Liability and indemnity provisions
204
+ properties:
205
+ liability_cap:
206
+ type: string
207
+ description: Maximum liability amount if specified
208
+ indemnification:
209
+ type: string
210
+ description: Indemnification obligations
211
+ limitation_of_liability:
212
+ type: string
213
+ description: Liability limitations and exclusions
214
+ insurance_requirements:
215
+ type: string
216
+ description: Required insurance coverage
217
+ confidentiality:
218
+ type: object
219
+ description: Confidentiality and non-disclosure terms
220
+ properties:
221
+ confidentiality_period:
222
+ type: string
223
+ description: Duration of confidentiality obligations
224
+ definition_of_confidential_info:
225
+ type: string
226
+ description: What is considered confidential
227
+ permitted_disclosures:
228
+ type: string
229
+ description: Exceptions to confidentiality
230
+ intellectual_property:
231
+ type: object
232
+ description: IP ownership and licensing terms
233
+ properties:
234
+ ownership:
235
+ type: string
236
+ description: Who owns created IP
237
+ licensing_terms:
238
+ type: string
239
+ description: License grants if any
240
+ usage_rights:
241
+ type: string
242
+ description: Rights to use IP
243
+ governing_law:
244
+ type: string
245
+ description: Governing law jurisdiction (e.g., "State of California, USA")
246
+ dispute_resolution:
247
+ type: string
248
+ description: Dispute resolution mechanism (arbitration, mediation, courts)
249
+ enum:
250
+ - arbitration
251
+ - mediation
252
+ - litigation
253
+ - escalation
254
+ - other
255
+ risk_flags:
256
+ type: array
257
+ description: Unusual or potentially risky clauses identified
258
+ items:
259
+ type: object
260
+ properties:
261
+ clause:
262
+ type: string
263
+ description: Clause description
264
+ risk_level:
265
+ type: string
266
+ description: Risk assessment
267
+ enum:
268
+ - low
269
+ - medium
270
+ - high
271
+ - critical
272
+ reason:
273
+ type: string
274
+ description: Why this is flagged
275
+ required:
276
+ - clause
277
+ - risk_level
278
+ - reason
279
+ notes:
280
+ type: string
281
+ description: Additional notes or ambiguities found
282
+ confidence_score:
283
+ type: number
284
+ description: Confidence score for extraction quality (0.0-1.0)
285
+ minimum: 0.0
286
+ maximum: 1.0
287
+ required:
288
+ - contract_title
289
+ - contract_type
290
+ - parties
291
+ - effective_date
292
+ - financial_terms
293
+ - key_obligations
294
+ - confidence_score
295
+ json_schema_extra:
296
+ kind: agent
297
+ name: contract-analyzer
298
+ version: 1.0.0
299
+ short_name: contract-analyzer
300
+ tags:
301
+ - legal
302
+ - procurement
303
+ - ontology-extractor
304
+ author: REM Team
305
+ tools: []
306
+ resources: []
307
+ provider_configs:
308
+ - provider_name: anthropic
309
+ model_name: claude-sonnet-4-5-20250929
310
+ - provider_name: openai
311
+ model_name: gpt-4.1
312
+ embedding_fields:
313
+ - contract_title
314
+ - contract_type
315
+ - parties
316
+ - key_obligations
317
+ - risk_flags