https://github.com/petercat-ai/petercat
A conversational Q&A agent configuration system, self-hosted deployment solutions, and a convenient all-in-one application SDK, allowing you to create intelligent Q&A bots for your GitHub repositories
https://github.com/petercat-ai/petercat
ai assistant assistant-chat-bots assistants github-apps llm rag react
Last synced: 7 months ago
JSON representation
A conversational Q&A agent configuration system, self-hosted deployment solutions, and a convenient all-in-one application SDK, allowing you to create intelligent Q&A bots for your GitHub repositories
- Host: GitHub
- URL: https://github.com/petercat-ai/petercat
- Owner: petercat-ai
- License: mit
- Created: 2023-11-28T06:46:41.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-11T05:27:30.000Z (12 months ago)
- Last Synced: 2025-04-11T06:28:30.773Z (12 months ago)
- Topics: ai, assistant, assistant-chat-bots, assistants, github-apps, llm, rag, react
- Language: TypeScript
- Homepage: https://petercat.ai
- Size: 25.9 MB
- Stars: 1,361
- Watchers: 14
- Forks: 78
- Open Issues: 56
-
Metadata Files:
- Readme: README.en-US.md
- License: LICENSE
Awesome Lists containing this project
- awesome_ai_agents - Petercat - A conversational Q&A agent configuration system, self-hosted deployment solutions, and a convenient all-in-one application SDK, allowing … (Building / Deployment)
- StarryDivineSky - petercat-ai/petercat
README


# PeterCat
[简体中文](./README.md) | English | [日本語](./README.ja-JP.md)
**An intelligent Q&A bot solution specifically designed for community maintainers and developers.**
[](https://www.npmjs.com/package/@petercatai/assistant)
[](https://www.npmjs.com/package/petercat-lui)
[](https://hub.docker.com/r/petercatai/petercat)
[](https://github.com/petercat-ai/petercat/actions/workflows/pr-tests.yml)
[](https://codecov.io/github/petercat-ai/petercat)
[](https://github.com/petercat-ai/petercat/blob/master/LICENSE)
## 🏠 Homepage
[🐱Nest: petercat.ai](https://petercat.ai)
## ✨ Features
We provide a conversational Q&A agent configuration system, self-hosted deployment solutions, and a convenient all-in-one application SDK, allowing you to create intelligent Q&A bots for your GitHub repositories with a single click and quickly integrate them into various official websites or projects, providing a more efficient technical support ecosystem for your community.
### Chatting means creating
You only need to provide the address or name of your repository, and PeterCat will automatically complete the entire process of creating a bot.

### Automated Knowledge Base
After the bot is created, all relevant GitHub documentation and issues will be automatically added to the knowledge base as the bot's knowledge source.

### Multi-Platform Integration
Various integration options, such as SDK integration into official websites or one-click installation of the GitHub App into GitHub repositories.
| | |
|:----------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------:|
### More than QA Robot
| project information Query | Discussion Reply
| ----------------------------------------- | --------------------------------------- |
|  |  |
| PR Summary | Code Review |
| ----------------------------------------- | --------------------------------------- |
|  | |
| Issue Search | Issue Submit | Issue Reply |
| ----------------------------------------- | --------------------------------------- | --------------------------------------- |
|  |  |  |
[Watch full video](https://www.youtube.com/watch?v=83Y0_q2Fskk)
## Agent Workflow

## 📦 Self-Hosted Deployment
Deployment solution: [AWS](https://aws.amazon.com) + [Supabase](https://supabase.com)
Here you can find the complete guides:
- [Self-Hosting - Start the Service Locally](./docs/guides/self_hosted_local.md)
- [Self-Hosting - Deploy to AWS](./docs/guides/self_hosted_aws.md)

[](https://www.youtube.com/watch?v=Al6R9Ye5mBY)
## ⚙️ Environment Variables
The project requires environment variables to be set:
### Client
`.env.local`
| Environment Variable | Type | Description | Example |
|----------------------------|---------|--------------------------------------------------|---------------------------------------------|
| `NEXT_PUBLIC_API_DOMAIN` | Required | API domain of the backend service | `https://api.petercat.ai` |
### Server
`.env`
| Environment Variable | Type | Description | Example |
|----------------------------|--------------------------------------------|-----------------------------------------------|---------------------------------------------|
| **Basic Application Environment Variables** |
| `API_URL` | Required | API domain of the backend service | `https://api.petercat.ai` |
| `WEB_URL` | Required | Domain of the frontend web service | `https://petercat.ai` |
| `STATIC_URL` | Required | Static resource domain | `https://static.petercat.ai` |
| **AWS Related Environment Variables** |
| `X_GITHUB_SECRET_NAME` | Required | AWS secret file name | `prod/githubapp/petercat/pem` |
| `STATIC_SECRET_NAME` | Optional | The name of the AWS-managed CloudFront private key. If configured, CloudFront signed URLs will be used to protect your resources. For more information, see the [AWS documentation](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-trusted-signers.html). | `prod/petercat/static` |
| `LLM_TOKEN_SECRET_NAME` | Optional | The name of the LLM signing private key managed by AWS. If configured, Petercat will use the RSA algorithm to manage the user's LLM Token. | `prod/petercat/llm` |
| `LLM_TOKEN_PUBLIC_NAME` | Optional | The name of the LLM signing public key managed by AWS. If configured, Petercat will use the RSA algorithm to manage the user's LLM Token. | `prod/petercat/llm/pub` |
| `STATIC_KEYPAIR_ID` | Optional | The Key Pair ID for AWS CloudFront. If configured, CloudFront signed URLs will be used to protect your resources. For more information, see the [AWS documentation](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-trusted-signers.html). | `APKxxxxxxxx` |
| `S3_TEMP_BUCKET_NAME` | Required | AWS S3 bucket for temporary image files | `xxx-temp` |
| **Supabase Related Environment Variables** |
| `SUPABASE_URL` | Required | Supabase service URL, found [here](https://supabase.com/dashboard/project/_/settings/database) | `https://***.supabase.co` |
| `SUPABASE_SERVICE_KEY` | Required | Supabase service key, found [here](https://supabase.com/dashboard/project/_/settings/database) | `{{SUPABASE_SERVICE_KEY}}` |
| **Auth0 Related Environment Variables** |
| `AUTH0_DOMAIN` | Required | Auth0 domain, from Auth0 / Application / Basic Information | `petercat.us.auth0.com` |
| `AUTH0_CLIENT_ID` | Required | Auth0 Client ID, from Auth0 / Application / Basic Information | `artfiUxxxx` |
| `AUTH0_CLIENT_SECRET` | Required | Auth0 Client Secret, from Auth0 / Application / Basic Information | `xxxx-xxxx-xxx` |
| `API_IDENTIFIER` | Required | Auth0 API Identifier | `https://petercat.us.auth0.com/api/v2/` |
| **LLM Related Environment Variables** |
| `OPENAI_API_KEY` | Required | OpenAI API key | `sk-xxxx` |
| `OPENAI_BASE_URL` | Optional | Base URL for API requests. Only specify if using a proxy or service emulator. | `https://api.openai.com/v1`
| `GEMINI_API_KEY` | Optional | Gemini API key | `xxxx` |
| `TAVILY_API_KEY` | Optional | Tavily API key | `tvly-xxxxx` |
| **GitHub App Registration Environment Variables** |
| `X_GITHUB_APP_ID` | Optional | GitHub App ID | `123456` |
| `X_GITHUB_APPS_CLIENT_ID` | Optional | GitHub App Client ID | `Iv1.xxxxxxx` |
| `X_GITHUB_APPS_CLIENT_SECRET` | Optional | GitHub App Client Secret | `xxxxxxxx` |
| **Rate Limiting Configuration** |
| `RATE_LIMIT_ENABLED` | Optional | Whether rate limiting is enabled | `True` |
| `RATE_LIMIT_REQUESTS` | Optional | Number of requests for rate limiting | `100` |
| `RATE_LIMIT_DURATION` | Optional | Duration for rate limiting (in minutes) | `1` |
| **RAG server config** |
| `WHISKER_API_URL` | Required | WHISKER RAG Server Path | `http://....` |
| `WHISKER_API_KEY` | Required | WHISKER RAG Server KEY | `sk-xxxx` |
## 🤝 Contributing
> PeterCat uses yarn as the package manager.
```bash
git clone https://github.com/petercat-ai/petercat.git
# Install dependencies
yarn run bootstrap
# Debug client
yarn run client
# Debug assistant
yarn run assistant
# Debug server
yarn run server
# Start website locally
yarn run client:server
# Start assistant component locally
yarn run assistant:server
# Build assistant
cd assistant
yarn run build
npm publish
# Docker build
yarn run build:docker
# PyPI build
yarn run build:pypi
yarn run publish:pypi
```
## 💼 Enterprise Integration
Please send your project address, usage scenarios, usage frequency, and other information to [petercat.assistant@gmail.com ](petercat.assistant@gmail.com )
## 📧 Reporting Issues
PeterCat is still in its growth stage, and occasional “tantrums” are to be expected. Please report issues via the following channels:
* [Submit an Issue(https://github.com/petercat-ai/petercat/issues/new/choose)
* [Discussions](https://github.com/petercat-ai/petercat/discussions)
👬 Contributors

## 💗 Sponsor
[Ant Design](https://ant.design/)
## 📄 License
MIT@[PeterCat](https://github.com/petercat-ai/petercat/blob/main/LICENSE)