Hacker Newsnew | past | comments | ask | show | jobs | submit | osmoscraft's commentslogin

React hooks can help manage the state and tools for LLM agents. Hooks are good abstraction for dynamically composing data and behavior for both human user and LLM. It also lets human and LLM collaborate on the same UI without communication overhead.

Source code and demos: https://github.com/chuanqisun/react-agent-hooks


I thought it might be easier to piecemeal add LLM functionality if we can reuse the existing structure of the app.


React turns out to be a powerful tool to management the state of anything hierarchical and dynamic.

For the UI, we can show stuff dynamically with JSX; and the JSX would include actions that let user modify the state; the updated the state would trigger a re-rendering of UI to reflect the latest the state.

What if we can apply this paradigm to model Human + AI interacting with a shared piece of state? We can let React and LLM see the same state and use the same tools to change that change.


I built this project to help pay estimated tax. This is useful when I trade stocks that result in unplanned capital gain or income. Before this project, I got myself into tax penalty because I underpaid my estimated tax.

You can probably get the same functionality from Excel, but I think the numbers are more readable when rendered with minimum HTML + CSS.

Sharing it for other hackers who'd like to do their own tax <3


Developer here. I super appreciate the support. Some context:

- I'm a big fan of RSS and there is a thriving community behind. Just check out this list: https://github.com/AboutRSS/ALL-about-RSS

- I'm also a firm believer of web as a platform, a distributed document database, and an open library of knowledge, as opposed to a "compile target" for cryptic JavaScript apps that take control and freedom away from users. Jim Nielsen has a timely critique: https://blog.jim-nielsen.com/2021/web-languages-as-compile-t...

- The bigger picture behind the osmos project is to create an IDE for personal knowledge management. On the surface:

1. I read my rss with osmos::feed.

2. I capture reference links from the feed with osmos::memo.

3. I digest the knowledge and connect them into notes with osmos::note.

- All of them are done with plaintext (some sprinkle of markdown), remote hosted on GitHub, so they are easy to run NLP and ML against. Potentially with GitHub actions, or locally with some bot, with a cloned repo.

- In the long term, I was hoping to create a "positive feedback loop". Use ML to extract patterns from my notes, make connections for me, and recommend interesting reading in the osmos::feed. On the other end, osmos::feed can use NLP to detect how each article in the feed might connect to ideas from osmos::note and make note-taking even easier.

- The parent project (https://osmoscraft.org) is still in super early stage. Would love to let the community give it a spin while I keep iterating.

- Thanks again for the ♥


Hi, it is a very nice project. I like it! You could probably also quickly add a manifest for turning your current HTML template into a web app (benefits are that when adding a shortcut on the Home screen of some mobile device, the website will open in a dedicated window (rather than in a tab of the browser) with a dedicated title in the list of running application (rather than the name of the browser), a dedicated icon on the launch screen, etc.).

See https://developer.mozilla.org/docs/Web/Manifest


Reminds me of https://zettelkasten.de/ except they focus on note-taking while you have some emphasis on reading as well.


I'm a big fan of RSS too, and I appreciate what you are doing. Thanks.

On the other hand, it sounds like you are staking a position that the web is for docs not apps.

Not sure why we are often presented with apps vs. docs - why can't it be for both? I feel that those that don't want it to be for apps are taking away some of my freedom: I need some apps and if I can't get them on the web I'll probably have to turn to a proprietary platform.


Calling this an RSS-Reader is kinda strange. As this is static, is there any way to save states like seen/read? How is this without state different from any other news-site? Just because it happens to be feed by RSS doesn't mean it utilize the benefits of feed-culture that made RSS so great.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: