prompttp
TypeScript icon, indicating that this package has built-in type declarations

0.0.1022 • Public • Published

PROMPTTP://

The "prompttp://" (stands for "Prompt Relay of Multidirectional Plain Text Transfer Protocol") is a user-friendly approach to communicating with AI, based on a website metaphor. It personifies the AI as a "visitor" navigating a "website" interface, resulting in ability to:

  • Split work between developers and prompt-writers (who can be librarians, teachers, or anyone else)
  • Utilize the built-in "state object" as a "one-shot memory" for the AI, allowing it to not only remember, but also "forget" when necessary
  • develop each prompt easily in a complex agent, enabling:
    • A big team to work on different parts of the same huge agent in parallel
    • A single person to work on a single prompt without needing to understand the entire agent
  • Preview/Edit fragments of the agent, without the need to run the entire chain
  • Still retain the full power of JavaScript and TypeScript, including the capability to use any npm package, call APIs, async fetch, etc.

Features

The basic entity in Prompttp is an "agent", which is a folder with an .ag extension. Each agent contains a series of pages, represented by .hbs template files, which are used to present prompts or sub-prompts (known as "prompt-pages") to the AI. Pages are interconnected, allowing the AI to navigate through the website and respond to each prompt-page. Each prompt-page can have an associated .ts file with the same name. This TypeScript file is executed before the template and can modify the state as needed. The "terminal" page is where the AI provides its final response. This response includes data that can modify the state and human-like text, which is streamed to the end user.

Usage

To use the Prompttp protocol, simply create an agent folder with an .ag extension and add .hbs template files for each prompt-page. If desired, you can also include .ts files for each prompt-page to modify the state before the template is executed.

Conclusion

The Prompttp protocol provides a user-friendly and intuitive approach to communicating with AI, using a website metaphor and interconnected pages. Whether you're a developer or end user, you'll appreciate the natural and human-like interaction made possible by this innovative approach.

Examples and documentation

For examples and documentation, see the Prompttp website or see the cheatsheet.ag agent.

Readme

Keywords

none

Package Sidebar

Install

npm i prompttp

Weekly Downloads

2

Version

0.0.1022

License

none

Unpacked Size

4.47 MB

Total Files

224

Last publish

Collaborators

  • shalmu