Skip to main content

Cognitive processing system for HEAVEN - Handles knowledge synthesis across any corpus size

Project description

Brain Agent

Neural-inspired knowledge retrieval system built on heaven-base.

Overview

Brain Agent provides a sophisticated system for organizing and querying knowledge from document collections. It uses a "neural" metaphor where documents become "neurons" that can be activated based on relevance to queries.

Components

  • BrainAgent: Main agent class for knowledge retrieval
  • CognizeTool: Identifies relevant neurons for a query
  • InstructTool: Generates instructions from activated neurons
  • QueryBrainTool: Simple interface for querying registered brains
  • SynthesizerReplicant: Alternative replicant-based interface

Installation

# Install heaven-base first
pip install git+https://github.com/sancovp/heaven-base.git@v1.2.0

# Install brain-agent
pip install -e .

Usage

from brain_agent import BrainAgent, register_brain

# Register a brain (document collection)
register_brain(
    directory="/path/to/documents",
    brain_name="my_knowledge_base",
    chunk_size=-1  # whole files
)

# Create and query brain agent
agent = BrainAgent()
result = await agent.query("brain=my_knowledge_base query=What is machine learning?")

Dependencies

  • heaven-base>=1.2.0 (for core agent framework)
  • langchain-core (for message types)
  • Various LLM providers (OpenAI, Google, etc.)

License

Private - All rights reserved.

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

brain_agent-0.1.0.tar.gz (36.9 kB view details)

Uploaded Source

Built Distribution

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

brain_agent-0.1.0-py3-none-any.whl (42.3 kB view details)

Uploaded Python 3

File details

Details for the file brain_agent-0.1.0.tar.gz.

File metadata

  • Download URL: brain_agent-0.1.0.tar.gz
  • Upload date:
  • Size: 36.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for brain_agent-0.1.0.tar.gz
Algorithm Hash digest
SHA256 61f4694ae4409f5029576cb9e7aa3b8abcf577042b3e8538f22b830b6ebe4611
MD5 f1387b678e9b4c16712ac71c14e98afe
BLAKE2b-256 5b58b47a8a8af7030fc3a52e4f9266fa78a144ba54188fc20cbf025c25225788

See more details on using hashes here.

File details

Details for the file brain_agent-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: brain_agent-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 42.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for brain_agent-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2202d165474927ce3bdc93da51c7e3a16dd049b2ee35d8554db4a8bc054f8d27
MD5 6808e5d80f573f3203ada4dd194d8993
BLAKE2b-256 f1618fc7ad770a0fdaa3d2d9ffac1fa012ff62fe2a209092d74b3a67e5b9601f

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