A GPT-based autonomous multi-agent AI app using Next.js, LangChain.js, and LangGraph.js to research and recommend Instagram posts based on user queries and personalities extracted from user’s historical Instagram data via Instagram Basic Display API.
gptinsta.mp4
- Data Explainer Agent: Our Sherlock Holmes agent generating information about User Historical Posts.
- Explanation Condenser Agent: Our Sherlock Holmes Agent with phd in English literature to generate final report on the user posting style.
- IG Post Generator Agent: Our researcher to generate Instagram Post Suggestions based on user personality and Viral Critique Agent feedback.
- Viral Critique Agent: Our Marketing expert to ensure that post suggestions have potential to get viral.
- Image Generator Agent: Our artist, to generate images.
- Post Improver Agent: Our Agent who talks with user to improve the posts.
-
First give this repo a ✨✨ star ✨✨ for good luck. 😉
-
Since GPT-Instagram works with your historical Instagram Posts Information to extract your style you need to follow this guide to get your Instagram Access Token to extract data via Instagram Basic Display API.
Follow these guide to setup your Facebook App to get access to Instagram Basic Display API.
You can generate Your token from facebook app dashboard at now at 'Instagram Basic Display > Basic Display'. It should look something like this.
Click on 'Generate Token' to get your IG Access Token.
- Get your OpenAI API key from https://openai.com/index/openai-api/
- Get your Tavily Search API key from https://tavily.com/#api
- Fill in your
.env
file.env.example
explains it pretty well.
KEY | DESCRIPTION |
---|---|
OPENAI_API_KEY | Your OpenAI API key from https://openai.com/index/openai-api/ |
TAVILY_API_KEY | Tavily Search API key from https://tavily.com/#api |
DATABASE_URL | Postgres DB URL |
IG_ACCESS_TOKEN | Your Instagram Access Token |
NEXT_PUBLIC_BASE_URL | Deployment URL(only https to work with Instagram API) |
-
Since GPT-Instagram uses Drizzle ORM make sure to run
yarn
thenyarn generate
&yarn migrate
before you run the project to create your DB. -
Finally run
yarn dev
to run the Application.
This app was done for Tavily AI Intern Application. This is just a toy project don't expect any further updates.