This is a Next.js application integrated with CopilotKit and Agno to create an AI-powered operations analyst agent. The system combines a modern React frontend with a Python-based agent that analyzes operational flywheels, identifies bottlenecks, and provides actionable recommendations for business optimization.
- Frontend: Next.js 15 with React 19, TypeScript, and Tailwind CSS
- Backend Agent: Python-based Agno agent with operational analysis tools
- Integration: CopilotKit runtime for seamless AI agent interaction
- Dashboard: Three-panel layout with Actions, Visualization, and Chat
- Development: Concurrent development servers for UI and agent (with coordination challenges)
- Next.js App Router with TypeScript
- CopilotKit React components and runtime
- Agno Agent framework with OpenAI GPT-4o
- Custom operational analysis tools for flywheel optimization
- Pydantic models for structured operational state
- YAML/JSON state input format
- uv for Python dependency management
- Tailwind CSS for styling
- Concurrent development environment
- Both UI (port 3000) and agent (port 8000) servers run concurrently (requires troubleshooting)
- Agent provides operational analysis capabilities through custom tools
- CopilotKit handles the communication between frontend and agent
- Real-time operational flywheel analysis and recommendations
- Three-panel dashboard for interactive operational management
- YAML/JSON state input for flexible operational data modeling
If completing tasks requires writing or modifying files:
- Do not create new branches
- Use git to commit your changes
- If pre-commit fails, fix issues and retry
- Check git status to confirm your commit. You must leave your worktree in a clean state
- Only committed code will be evaluated
- Do not modify or amend existing commits
- Containers often contain AGENTS.md files. These files can appear anywhere in the container's filesystem. Typical locations include
/,~, and in various places inside of Git repos. - These files are a way for humans to give you (the agent) instructions or tips for working within the container.
- Some examples might be: coding conventions, info about how code is organized, or instructions for how to run or test code.
- AGENTS.md files may provide instructions about PR messages (messages attached to a GitHub Pull Request produced by the agent, describing the PR). These instructions should be respected.
- Instructions in AGENTS.md files:
- The scope of an AGENTS.md file is the entire directory tree rooted at the folder that contains it.
- For every file you touch in the final patch, you must obey instructions in any AGENTS.md file whose scope includes that file.
- Instructions about code style, structure, naming, etc. apply only to code within the AGENTS.md file's scope, unless the file states otherwise.
- More-deeply-nested AGENTS.md files take precedence in the case of conflicting instructions.
- Direct system/developer/user instructions (as part of a prompt) take precedence over AGENTS.md instructions.
- AGENTS.md files need not live only in Git repos. For example, you may find one in your home directory.
- If the AGENTS.md includes programmatic checks to verify your work, you MUST run all of them and make a best effort to validate that the checks pass AFTER all code changes have been made.
- This applies even for changes that appear simple, i.e. documentation. You still must run all of the programmatic checks.
- If you browsed files or used terminal commands, you must add citations to the final response (not the body of the PR message) where relevant. Citations reference file paths and terminal outputs with the following formats:
【F:<file_path>†L<line_start>(-L<line_end>)?】
- File path citations must start with
F:.file_pathis the exact file path of the file relative to the root of the repository that contains the relevant text. line_startis the 1-indexed start line number of the relevant output within that file.
【<chunk_id>†L<line_start>(-L<line_end>)?】
- Where
chunk_idis the chunk_id of the terminal output,line_startandline_endare the 1-indexed start and end line numbers of the relevant output within that chunk.
- Line ends are optional, and if not provided, line end is the same as line start, so only 1 line is cited.
- Ensure that the line numbers are correct, and that the cited file paths or terminal outputs are directly relevant to the word or clause before the citation.
- Do not cite completely empty lines inside the chunk, only cite lines that have content.
- Only cite from file paths and terminal outputs, DO NOT cite from previous pr diffs and comments, nor cite git hashes as chunk ids.
- Use file path citations that reference any code changes, documentation or files, and use terminal citations only for relevant terminal output.
- Prefer file citations over terminal citations unless the terminal output is directly relevant to the clauses before the citation, i.e. clauses on test results.
- For PR creation tasks, use file citations when referring to code changes in the summary section of your final response, and terminal citations in the testing section.
- For question-answering tasks, you should only use terminal citations if you need to programmatically verify an answer (i.e. counting lines of code). Otherwise, use file citations.