{"id":21407136,"url":"https://github.com/daveshap/nexus","last_synced_at":"2025-07-14T00:33:12.763Z","repository":{"id":50362983,"uuid":"303379671","full_name":"daveshap/Nexus","owner":"daveshap","description":"Stream of consciousness nexus REST microservice","archived":false,"fork":false,"pushed_at":"2022-09-04T10:00:25.000Z","size":747,"stargazers_count":19,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T20:44:05.926Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daveshap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-12T12:07:13.000Z","updated_at":"2025-03-11T13:25:49.000Z","dependencies_parsed_at":"2022-08-16T08:30:32.018Z","dependency_job_id":null,"html_url":"https://github.com/daveshap/Nexus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/daveshap/Nexus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daveshap%2FNexus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daveshap%2FNexus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daveshap%2FNexus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daveshap%2FNexus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daveshap","download_url":"https://codeload.github.com/daveshap/Nexus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daveshap%2FNexus/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265227900,"owners_count":23731060,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T16:44:46.302Z","updated_at":"2025-07-14T00:33:10.959Z","avatar_url":"https://github.com/daveshap.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nexus REST Microservice\n\nStream of Consciousness REST microservice. Nexus of thought for artificial cognition.\n\n- Rapid prototyping. Not for full-scale operations (yet)\n- Biomimetic. Models human recall (associative and temporal memory)\n\nStill a work in progress. Will be optimized for scale in the future. New endpoints will be added for different types of recall.\n\n![Nexus Conceptual Art](https://raw.githubusercontent.com/daveshap/Nexus/main/nexus.jpg)\n\n## TODO List\n\n1. Firm up required endpoints (I think we're closing in on this)\n2. Integrate blockchain for security\n3. Integrate semantic search for speed\n4. Integrate knowledge graph for speed\n\n# Add message\n\n- URL: `/add`\n- Method: `POST`\n\n### What it does:\n\n- Add a memory to the nexus\n- Save JSON payload to `/logs` directory for indexing/storage\n- Timestamp and UUID added by Nexus service\n- Content and vector are required, others are optional\n\n### Example payload:\n\n```json\n{\n \"content\": \"I see a man sitting on a bench\",\n \"vector\": [0,0,0,1,1,1],\n \"microservice\": \"vision\",\n \"model\": \"YOLO_v5\",\n}\n```\n\n### Response\n\n- Returns `200` if successful\n- Return `500` and error message if unsuccessful\n\n# Semantic search\n\n- URL: `/search`\n- Method: `POST`\n\n### What it does:\n\n- Accepts semantic vector and count\n- Uses `np.dot` product to find similar vectors\n- Returns *n* number of top results\n\n### Example payload:\n\n```json\n{\n \"vector\": [0,0,0,1,1,1],\n \"count\": 6,\n}\n```\n\n### Example response:\n\n\n- Response is a list of dictionaries. \n\n```json\n[\n {\"content\": \"I see a man on a bench\"},\n {\"content\": \"I hear a police siren\"},\n]\n```\n\n# Match results\n\n- URL: `/match`\n- Method: `/post`\n\n### What it does:\n\n- Accepts a field and value\n- Returns all logs with `field` that matches `value`\n- Can be used to fetch all records with specific values, such as all messages created by certain model, or specific UUID\n\n### Example payload:\n\n```json\n{\n \"field\": \"UUID\",\n \"value\": \"b1be5ea3-5ec4-489b-9bb8-24f005a35a7d\",\n}\n```\n\n### Example response:\n\n- Response is a list of dictionaries. \n\n```json\n[\n {\"content\": \"I see a man on a bench\"},\n]\n```\n\n# Bounded search\n\n- URL: `/bound`\n- Method: `/post`\n\n### What it does:\n\n- Accepts a `lower_bound` and `upper_bound`\n- Returns all logs with timestamp between lower and upper bound\n- Fetch all memories in a given time window\n\n### Example payload:\n\n```json\n{\n \"lower_bound\": 123.456,\n \"upper_bound\": 456.789,\n}\n```\n\n### Example response:\n\n- Response is a list of dictionaries. \n\n```json\n[\n {\"content\": \"I see a man on a bench\"},\n]\n```\n\n# Recent messages\n\n- URL: `/recent`\n- Method: `/post`\n\n### What it does:\n\n- Returns all most recent memories\n- Limited to *n* seconds\n\n### Example payload:\n\n```json\n{\n \"seconds\": 30,\n}\n```\n\n### Example response:\n\n- Response is a list of dictionaries. \n\n```json\n[\n {\"content\": \"I see a man on a bench\"},\n {\"content\": \"I hear a police siren\"},\n]\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaveshap%2Fnexus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaveshap%2Fnexus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaveshap%2Fnexus/lists"}