Empowering Policy Insights Through Collaborative Intelligence
- Table of Contents
- Overview
- Features
- Project Structure
- Getting Started
- Project Roadmap
- Contributing
- License
- Acknowledgments
The policy-wonks-api project addresses the challenge of analyzing economic and fiscal policies by leveraging AI-driven insights. Key features include a collaborative multi-agent system for policy evaluation, user-friendly API endpoints, and robust data management. Targeted at policymakers, economists, and analysts, it enhances decision-making through informed, data-backed assessments.
Feature | Summary | |
---|---|---|
βοΈ | Architecture |
|
π© | Code Quality |
|
π | Documentation |
|
π | Integrations |
|
𧩠| Modularity |
|
π§ͺ | Testing |
|
β‘οΈ | Performance |
|
π‘οΈ | Security |
|
βββ policy-wonks-api/
βββ Dockerfile
βββ README.md
βββ db
β βββ chroma.sqlite3
β βββ e7ff8a0b-e613-4d01-814d-cd82b1795e23
βββ knowledge
β βββ user_preference.txt
βββ pyproject.toml
βββ src
β βββ policy_wonks
βββ uv.lock
**`POLICY-WONKS-API/`**
**root**
**[Dockerfile](https://github.com/jkaunert/policy-wonks-api/blob/master/Dockerfile)** | \- Facilitates the containerization of a Python application by establishing a lightweight environment using a slim Python image \- It integrates the UV tool for dependency management and ensures the application is ready for execution \- By setting the working directory and environment variables, it streamlines the deployment process, allowing the app to run efficiently on a specified host and port. |
**[pyproject.toml](https://github.com/jkaunert/policy-wonks-api/blob/master/pyproject.toml)** | \- Defines the project configuration for "policy\_wonks," a tool leveraging crewAI to facilitate policy analysis and management \- It specifies essential metadata, dependencies, and scripts for various functionalities such as running, training, and testing the application \- This foundational setup ensures compatibility with Python versions 3.10 to 3.13 and establishes the build system, enabling seamless integration and deployment within the broader codebase architecture. |
**knowledge**
**[user\_preference.txt](https://github.com/jkaunert/policy-wonks-api/blob/master/knowledge/user_preference.txt)** | \- Captures user preferences and background information, specifically tailored for an AI Engineer named John Doe \- This data serves to personalize interactions within the project, enhancing user experience by aligning features and recommendations with the user's interests in AI Agents \- It plays a crucial role in the overall architecture by facilitating targeted content and functionality based on user profiles. |
**db**
**[chroma.sqlite3](https://github.com/jkaunert/policy-wonks-api/blob/master/db/chroma.sqlite3)** | \- The code file located at \`db/chroma.sqlite3\` serves as a database for the project, specifically utilizing SQLite as its storage engine \- Its primary purpose is to manage and persist data efficiently within the overall architecture of the codebase \- This database file is integral to the project's functionality, enabling the storage, retrieval, and manipulation of data that the application relies on \- By providing a structured way to handle data, it supports the project's objectives and enhances its performance and scalability. |
**e7ff8a0b-e613-4d01-814d-cd82b1795e23**
**[link\_lists.bin](https://github.com/jkaunert/policy-wonks-api/blob/master/db/e7ff8a0b-e613-4d01-814d-cd82b1795e23/link_lists.bin)** | \- Facilitates the storage and retrieval of linked list data structures within the projectβs database \- By managing serialized binary representations, it enhances data persistence and efficiency, allowing other components of the codebase to access and manipulate linked lists seamlessly \- This functionality is crucial for maintaining the integrity and performance of the overall architecture. |
**[header.bin](https://github.com/jkaunert/policy-wonks-api/blob/master/db/e7ff8a0b-e613-4d01-814d-cd82b1795e23/header.bin)** | \- Facilitates the storage and retrieval of header information within the database architecture, ensuring efficient data management and integrity \- This component plays a crucial role in maintaining the overall structure and accessibility of data, contributing to the seamless operation of the project by enabling quick access to essential metadata associated with stored records. |
**src**
**policy_wonks**
**[models.py](https://github.com/jkaunert/policy-wonks-api/blob/master/src/policy_wonks/models.py)** | \- Defines data models for handling requests and responses related to economic policy analysis \- The PolicyWonksRequest model captures key topics and economic variables for evaluation by an economist and a financial analyst, while the PolicyWonksResponse model structures their respective outputs \- This facilitates clear communication and data management within the broader architecture of the project, enhancing the interaction between different components focused on economic policy insights. |
**[crew.py](https://github.com/jkaunert/policy-wonks-api/blob/master/src/policy_wonks/crew.py)** | \- Defines the PolicyWonks crew, orchestrating a collaborative environment for agents specializing in economics and financial analysis \- It configures agents with specific models and tools, establishes tasks for each role, and integrates them into a cohesive crew that utilizes advanced language models for planning and execution \- This structure enhances the project's capability to address complex policy-related inquiries effectively. |
**[app.py](https://github.com/jkaunert/policy-wonks-api/blob/master/src/policy_wonks/app.py)** | \- Facilitates the Policy Wonks API, an orchestrated multi-agent system designed for analyzing economic and fiscal policies using the CrewAI framework \- It enables users to submit policy topics and economic variables, triggering a collaborative analysis from both an economist and a financial analyst \- The API also includes health-check and welcome endpoints, ensuring robust interaction and user engagement with the system. |
**[main.py](https://github.com/jkaunert/policy-wonks-api/blob/master/src/policy_wonks/main.py)** | \- Facilitates the execution and management of policy simulations within the project \- It allows users to run simulations, train models with specified iterations, replay past executions, and test outcomes based on economic variables and policy topics \- This functionality is essential for analyzing the impact of different policies, thereby enhancing decision-making processes in economic contexts. |
**[llm\_config.py](https://github.com/jkaunert/policy-wonks-api/blob/master/src/policy_wonks/llm_config.py)** | \- Configuration of various language models is achieved, enabling the project to leverage advanced AI capabilities \- By integrating models such as Jamba and Llama, the architecture supports diverse natural language processing tasks \- Utilizing environment variables for API keys ensures secure access to these models, facilitating seamless interactions with the inference service and enhancing the overall functionality of the codebase. |
**config**
**[agents.yaml](https://github.com/jkaunert/policy-wonks-api/blob/master/src/policy_wonks/config/agents.yaml)** | \- Defines roles and objectives for key economic agents within the project, specifically an economist and a financial analyst \- Each agent is tasked with analyzing the impacts of specific policy topics on economic and financial metrics, providing insights to policymakers and the public \- This structure enhances the overall codebase by facilitating informed decision-making through expert analysis and clear communication of complex concepts. |
**[tasks.yaml](https://github.com/jkaunert/policy-wonks-api/blob/master/src/policy_wonks/config/tasks.yaml)** | \- Defines tasks for economic analysis within the project, specifically targeting the evaluation of government policies and their market implications \- It outlines roles for an economist and a financial analyst, detailing their responsibilities in providing comprehensive assessments based on specified economic variables \- This structure facilitates informed decision-making for policymakers by ensuring thorough and objective evaluations of economic conditions and policy impacts. |
Before getting started with policy-wonks-api, ensure your runtime environment meets the following requirements:
- Programming Language: Python 3.12
- Dependency Management: UV
- Container Runtime: Docker
Install policy-wonks-api using one of the following methods:
Build from source:
- Clone the policy-wonks-api repository:
β― git clone https://github.com/jkaunert/policy-wonks-api
- Navigate to the project directory:
β― cd policy-wonks-api
- Install the project dependencies:
β― uv sync
β― DOCKER_BUILDKIT=1 docker build -t {image_name} .
β― docker pull jkaunert/policy-wonks-api-v1:local
Run policy-wonks-api using the following command:
Using docker
locally Β
β― docker run -p 8000:8000 policy-wonks-api-v1:local
-
Task 1
:Upload to Docker Hub. -
Task 2
:Deploy API to Render. -
Task 3
: Deploy Streamlit App.
- π¬ Join the Discussions: Share your insights, provide feedback, or ask questions.
- π Report Issues: Submit bugs found or log feature requests for the
policy-wonks-api
project. - π‘ Submit Pull Requests: Review open PRs, and submit your own PRs.
Contributing Guidelines
-
Fork the Repository: Start by forking the project repository to your github account.
-
Clone Locally: Clone the forked repository to your local machine using a git client.
git clone https://github.com/jkaunert/policy-wonks-api
-
Create a New Branch: Always work on a new branch, giving it a descriptive name.
git checkout -b new-feature-x
-
Make Your Changes: Develop and test your changes locally.
-
Commit Your Changes: Commit with a clear message describing your updates.
git commit -m 'Implemented new feature x.'
-
Push to github: Push the changes to your forked repository.
git push origin new-feature-x
-
Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
-
Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
This project is protected under the GNU General Public License v3.0 - For more details, refer to the LICENSE page.