Credentials. The README says API keys live in the app bundle, so keep the config.ts file local and never ship it in a build meant for other people.
Who it is forA mobile developer who wants a working ChatGPT-style chat app on their own machine before changing anything, usually after finding the repo.
The problemGetting a streaming LLM chat with a retrieval tool running in React Native involves native builds, API keys, and a vector index, and it is hard to know where to start.
The outcomeThe app runs on an iOS simulator or Android emulator, answers general questions, and answers Margelo questions from the Pinecone knowledge base.
What you need first
- Xcode and CocoaPods for iOS, or the Android setup from the React Native environment guide
- Node 22.11 or newer
- An OpenAI API key
- A Pinecone API key, a populated Pinecone index, and its index host
Steps
- Run
cd appand thennpm install. - Run
cp src/config.example.ts src/config.tsand fill in your OpenAI key, Pinecone key, and index host in that file. - Run
cd ios && pod install && cd ..to install the iOS pods. - Run
npm startin one terminal to start Metro. - Run
npm run iosornpm run androidto build and launch the app, then ask a general question and a question about Margelo.
Prompt for your agent
Clone margelo/ai-chat-demo, go into the app folder, and set up the project following the README setup and run steps for <target platform: ios or android>. Confirm the app launches and that a Margelo question triggers the search_margelo_kb tool and returns an answer based on retrieved context.
Caveat. The README calls this a demo, and it requires both an OpenAI key and a populated Pinecone index before the knowledge base tool returns useful results.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for margelo/ai-chat-demo and "Run the Margelo chat app on a simulator with your keys"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer