Skip to main content

A shared Python library for an agentic tool with a modular architecture, including a RAG service and financial data models.

Project description

oak - An Agentic ToolThis is the core library for our agentic tool. It is structured to be modular and scalable, with a clear separation of concerns, and is designed to be installed and used by other services, such as our LangChain agents.Project Structureoak/ ├── src/ │ └── oak/ # Main Python package │ ├── init.py # Makes oak a Python package │ ├── celery_app.py # Celery application instance for task management │ ├── config.py # Configuration manager loaded from .env │ ├── data/ # Data models and structures │ │ ├── init.py │ │ └── modules/ # Domain-specific data modules │ │ ├── init.py │ │ ├── analytics/ │ │ ├── current_events/ │ │ ├── market_data/ │ │ └── stocks/ │ ├── prompts/ # Agent prompts and templates │ │ └── init.py │ ├── services/ # Core business logic and data fetchers │ │ ├── init.py │ │ └── data_fetcher/ │ │ ├── init.py │ │ ├── database_service.py │ │ └── exceptions.py │ ├── tasks/ # Celery task definitions │ │ ├── init.py │ │ └── task_manager.py │ └── utils/ # Utility functions and helpers │ └── init.py ├── pyproject.toml # Project and dependency management ├── docker-compose.yml # Docker services configuration └── .env.example # Example file for environment variables ConfigurationFor security, sensitive data is stored in a .env file, which is loaded by the config.py module. This setup keeps credentials out of your codebase and makes it easy to manage different environments (development, testing, production).Key Componentsoak/src/oak/config.pyThis module defines a Config class that reads environment variables and provides them to the application. It ensures that required variables are present, and it allows for type casting, such as converting a string to a boolean or integer..env and .env.exampleThe .env file holds your actual secret credentials. It should be added to your .gitignore to prevent it from being committed to version control. The .env.example file is a template that shows other developers what environment variables your application expects.oak/src/oak/services/data_fetcher/database_service.pyThis module uses the new config.py file to get its database connection string, further centralizing the application's configuration.Setup and UsagePrerequisitesDocker and Docker Compose installed.InstallationInstall Poetry:If you don't have Poetry, install it following the official instructions.Clone the Repository:git clone cd Create and Fill .env file:Create a .env file in the root directory and copy the contents from .env.example. Fill in your specific credentials.Install Dependencies:From the oak/ directory, run:poetry install Running the SystemThe docker-compose.yml file has been updated to use Redis and Celery.docker-compose up --build This will start:The PostgreSQL database.A Redis service to act as a message broker.A Celery worker that listens for and executes tasks.The main application container, which will soon house your orchestrator.Running TestsTo run the unit tests, you will need Docker and Docker Compose installed. From the oak/ directory, simply run:poetry run pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oak_agent_core-0.1.11.tar.gz (20.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oak_agent_core-0.1.11-py3-none-any.whl (31.7 kB view details)

Uploaded Python 3

File details

Details for the file oak_agent_core-0.1.11.tar.gz.

File metadata

  • Download URL: oak_agent_core-0.1.11.tar.gz
  • Upload date:
  • Size: 20.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.0 CPython/3.13.7 Darwin/24.6.0

File hashes

Hashes for oak_agent_core-0.1.11.tar.gz
Algorithm Hash digest
SHA256 fcd6fd48a6f31ffb8bb241b6f7331d4a33aa05c6931761a513e44610c4ef3a7a
MD5 f9f89abeeb2fa63cbe8843466847a302
BLAKE2b-256 638e8220ec78e1233d557850255232e8f69611b0e0c92273806a55b1f069bee7

See more details on using hashes here.

File details

Details for the file oak_agent_core-0.1.11-py3-none-any.whl.

File metadata

  • Download URL: oak_agent_core-0.1.11-py3-none-any.whl
  • Upload date:
  • Size: 31.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.0 CPython/3.13.7 Darwin/24.6.0

File hashes

Hashes for oak_agent_core-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 d7f06d428961463bf07f47c8f93486af3b72ac63686c7eb688af04d7f9876ea1
MD5 eb7b0c4a90263b737c79d1fe55ee1a69
BLAKE2b-256 e68746225e679b1ca690b20e860ecb4a260591f09d0f9f8a554bab7ecc78f048

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page