{"id":19118626,"url":"https://github.com/outposthq/outpostkit","last_synced_at":"2025-05-05T04:17:58.588Z","repository":{"id":186729060,"uuid":"674293738","full_name":"outpostHQ/outpostkit","owner":"outpostHQ","description":"The Outpost API Node.js SDK with TypeScript support.","archived":false,"fork":false,"pushed_at":"2023-11-28T09:00:06.000Z","size":280,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-05T04:17:51.709Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://outpost.run","language":"TypeScript","has_issues":true,"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/outpostHQ.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null}},"created_at":"2023-08-03T15:31:40.000Z","updated_at":"2024-02-22T19:10:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"50a5da46-0151-4505-b6c0-ffeda074be8f","html_url":"https://github.com/outpostHQ/outpostkit","commit_stats":null,"previous_names":["outposthq/outpostkit"],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/outpostHQ%2Foutpostkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/outpostHQ%2Foutpostkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/outpostHQ%2Foutpostkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/outpostHQ%2Foutpostkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/outpostHQ","download_url":"https://codeload.github.com/outpostHQ/outpostkit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252436591,"owners_count":21747473,"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-09T05:07:15.385Z","updated_at":"2025-05-05T04:17:58.567Z","avatar_url":"https://github.com/outpostHQ.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Outpost Kit\n\nThe Outpost API Node.js SDK with TypeScript support.\n\n[![NPM Version](https://img.shields.io/npm/v/outpostkit.svg?style=flat)](https://www.npmjs.com/package/outpostkit)\n[![Discord](https://img.shields.io/discord/793832892781690891?color=7389D8\u0026label=chat%20on%20Discord\u0026logo=Discord\u0026logoColor=ffffff)](https://discord.gg/sHnHPnAPZj)\n\n## Installation\n\n```sh\n# with npm\nnpm install outpostkit\n\n# with yarn\nyarn add outpostkit\n\n# with pnpm\npnpm add outpostkit\n```\n\n## Usage\n\nTo start using the Comet API, create a Comet object with your API key and the ID of the comet service.\n\n```ts\nimport { Comet } from 'outpostkit' \nconst comet= new Comet('api-key','cometId');\n```\n\n### Now you can start prompting the comet service\n\n```ts\nconst response = comet.prompt({input:\"what is useCallback?\",stream:false}); //returns sessionId along with the response\n```\nThis will create a new `Session` which can then be used in subsequent prompts to maintain messaging history, which can be particularly useful when using chat models. \nTo continue the prompting in the same session:\n\n```ts\nconst response = comet.prompt({input:\"what is useCallback?\",stream:false,sessionId:'prevSession'});\n```\n\n### Prompt Sessions\n#### List Prompt Sessions\n```ts\nconst sessions = comet.listSessions({});\n```\n\n#### Get details of a particular Session\n\n```ts\nconst session = comet.getSession({sessionId:'someSessionId'});\n```\n\nA `Session` consists of one or more `Conversations` which in turn are usally just a single prompt and its response (for example: pair of one human and one agent `Message`).\nThe `Conversation` model is created to better handle human feedback.\n\nA conversation can also contain messages from functions, system too.\n### Conversations\n\n#### List Conversations of a Session\n```ts\nconst conversations = comet.listConversations({sessionId:'sessionId',stats:false,messages:true}); //defaults: stats:false messages:false\n```\nThis lists all the conversations of a session along with its messages but omits the conversation stats\n\n\n\n#### Get messages and details of a particular Conversation\n\n```ts\nconst conversation = comet.getConversation({conversationId:'convoId'});\n```\n\n### Messages\n\n#### Get Message\n```ts\nconst message = comet.getMessage({messageId:'mId'});\n```\n\n\n\n### Available Routes\n| Route                   | Route Description                       |\n| ----------------------- | --------------------------------------- |\n| `GET /api/v1/project`   | Endpoint to receive Project lists.      |\n| `GET /api/v1/comet`     | Endpoint to receive Comet lists.        |\n| `GET /api/v1/conflux`   | Endpoint to receive Conflux lists.      |\n\n## License\n\nOutpost Kit is a project by [Outpost](https://outpost.run).\n\nReleased under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutposthq%2Foutpostkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foutposthq%2Foutpostkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutposthq%2Foutpostkit/lists"}