- Open-source web app for asking questions.
- Built with Next.js, CopilotKit.
- Uses a ReWoo LangGraph agent to interact with user.
- Minimal clone of discord ui for webapp
ReWOO is an agent architecture designed to improve efficiency and simplify fine-tuning for tool use in AI systems. It features three main modules:
- Generates a step-by-step plan in the following format:
Plan: <reasoning> #E1 = Tool[argument for tool] Plan: <reasoning> #E2 = Tool[argument for tool with #E1 variable substitution] ...
- Leverages variable substitution to avoid redundant calls to the Planner LLM.
- Executes the tools using the arguments provided by the Planner.
- Generates the final answer for the original task using the observations from the Worker.
Modules marked with a 🧠 emoji involve an LLM call. By consolidating tool usage planning, ReWOO reduces token consumption and execution time compared to ReACT-style architectures.
- Clone the repository to your local machine:
git clone https://github.com/pheonix-coder/cogni-flow.git
- Navigate to the agent directory:
cd agent
- Install dependencies using Poetry:
poetry install
- Create a
.env
file inside the./agent
directory with your GITHUB_PAT and TAVILY_API_KEY:OPENAI_API_KEY=YOUR_GITHUB_PAT_HERE TAVILY_API_KEY=YOUR_TAVILY_API_KEY
- Run the agent demo:
poetry run demo
- Navigate to the UI directory:
cd ./ui
- Install dependencies using pnpm:
pnpm i
- Create a
.env
file inside the./ui
directory with your GITHUB_PAT:OPENAI_API_KEY=YOUR_GITHUB_PAT_HERE
- Run the Next.js project:
pnpm dev
- Ensure no other local application is running on port 8000.
- In the file
/agent/rag_agent/demo.py
, change the address from0.0.0.0
to127.0.0.1
orlocalhost
if needed.