Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dylsteck/cortex
https://github.com/dylsteck/cortex
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dylsteck/cortex
- Owner: dylsteck
- License: other
- Created: 2024-10-27T20:04:07.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-12-13T16:48:51.000Z (18 days ago)
- Last Synced: 2024-12-13T17:44:38.908Z (18 days ago)
- Language: TypeScript
- Homepage: https://withcortex.com
- Size: 3.07 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
An assistant for Farcaster/onchain dataCortex is an AI assistant built around Farcaster and onchain data to make it easier to find information and take actions. Outputs are optimized to show widgets that the user can use to learn more or take an action directly from the chat(eg. RSVP to an event, take an onchain action, send a message etc).
Built by [Dylan Steck](https://dylansteck.com)
## Architecture
The core foundation of Cortex is built on top of:
- [Next.js](https://nextjs.org)
- [shadcn UI](https://ui.shadcn.com)
- [Drizzle ORM](https://orm.drizzle.team)
- [Postgres](https://www.postgresql.org)
- [Vercel AI SDK](https://sdk.vercel.ai)
- [OpenAI models(currently GPT-4o and 4o mini)](https://platform.openai.com/docs/concepts)
- [Upstash Redis](https://upstash.com)
- [NextAuth](https://next-auth.js.org)## Tools
Cortex leverages LLM tool calling to power the core of its functionality. The following tools are currently supported:
- [Farcaster](https://farcaster.xyz) (using [Neynar APIs](https://neynar.com))
- [ENS Data](https://ensdata.net)
- [Events.xyz](https://events.xyz)
- [Bountycaster](https://bountycaster.com)
- [Icebreaker](https://icebreaker.xyz)
- [Nouns Builder](https://nouns.build)
- [Clanker](https://clanker.world)
- [Wow](https://wow.xyz)
- [Tavily](https://tavily.com)
- [Open-Meteo](https://open-meteo.com)
- [Zapper](https://zapper.xyz)For a further understanding of how the assistant tools are defined / to learn how to add your own tool, check out [tools.ts](/lib/tools.ts)
## Contributing
We welcome contributions of all kinds, especially those that introduce new tools/widgets! Here are the main guidelines for contributing:
1. Follow the traditional conventions of the repo(eg: add a new environment variable to `.env.example` if you need to add one, follow the schema for adding other tools, don't add excessive comments, etc)
2. Check out `tools.ts` for how tools are defined and search the name of a tool to follow its lifecycle(eg. a tool definition, the corresponding API call for it, and the component that handles the UI rendering for that tool)
3. Open a pull request that succintly describes your changes
4. If you need help or have questions, feel free to [reach out to me on Farcaster](https://warpcast.com/dylsteck.eth) or tag me in a GitHub discussionThanks for your support in making Cortex better!
## Running locally
You will need to use the environment variables [defined in `.env.example`](.env.example) to run Cortex.
> Note: You should not commit your `.env` file or it will expose secrets that will allow others to control access to your various OpenAI and authentication provider accounts.
```bash
pnpm install
pnpm dev
```Cortex should now be running on [localhost:3000](http://localhost:3000/).
---
Originally foked from this Next.js AI Chatbot Starter Template