Skip to content

dylsteck/cortex

Repository files navigation

An assistant for Farcaster/onchain data

Cortex 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

Architecture

The core foundation of Cortex is built on top of:

Tools

Cortex leverages LLM tool calling to power the core of its functionality. The following tools are currently supported:

For a further understanding of how the assistant tools are defined / to learn how to add your own tool, check out 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 or tag me in a GitHub discussion

Thanks for your support in making Cortex better!

Running locally

You will need to use the environment variables defined in .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.

pnpm install
pnpm dev

Cortex should now be running on localhost:3000.


Originally foked from this Next.js AI Chatbot Starter Template

About

An assistant for Farcaster/onchain data

Resources

License

Stars

Watchers

Forks

Languages