Metadata-Version: 2.1
Name: ai-enterprise-agent
Version: 0.0.6
Summary: AI Agent simplifies the implementation and use of generative AI with LangChain.
Author: Author
Author-email: autor@autor.com.br
License: Apache 2.0 License
Keywords: ai ai-agent agent assistant enterprise
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp ==3.9.3
Requires-Dist: aiosignal ==1.3.1
Requires-Dist: annotated-types ==0.6.0
Requires-Dist: anyio ==4.3.0
Requires-Dist: attrs ==23.2.0
Requires-Dist: azure-ai-documentintelligence ==1.0.0b3
Requires-Dist: azure-common ==1.1.28
Requires-Dist: azure-core ==1.30.1
Requires-Dist: azure-identity ==1.15.0
Requires-Dist: azure-search ==1.0.0b2
Requires-Dist: azure-search-documents ==11.4.0
Requires-Dist: boto3 ==1.34.70
Requires-Dist: botocore ==1.34.70
Requires-Dist: cachetools ==5.3.3
Requires-Dist: certifi ==2024.2.2
Requires-Dist: cffi ==1.16.0
Requires-Dist: charset-normalizer ==3.3.2
Requires-Dist: colorama ==0.4.6
Requires-Dist: cryptography ==42.0.5
Requires-Dist: dataclasses-json ==0.6.4
Requires-Dist: distro ==1.9.0
Requires-Dist: frozenlist ==1.4.1
Requires-Dist: google-ai-generativelanguage ==0.4.0
Requires-Dist: google-api-core ==2.17.1
Requires-Dist: google-auth ==2.28.2
Requires-Dist: google-generativeai ==0.4.1
Requires-Dist: googleapis-common-protos ==1.63.0
Requires-Dist: greenlet ==3.0.3
Requires-Dist: grpcio ==1.62.1
Requires-Dist: grpcio-status ==1.62.1
Requires-Dist: h11 ==0.14.0
Requires-Dist: httpcore ==1.0.4
Requires-Dist: httpx ==0.27.0
Requires-Dist: idna ==3.6
Requires-Dist: isodate ==0.6.1
Requires-Dist: jmespath ==1.0.1
Requires-Dist: jsonpatch ==1.33
Requires-Dist: jsonpointer ==2.4
Requires-Dist: langchain ==0.1.14
Requires-Dist: langchain-community ==0.0.31
Requires-Dist: langchain-core ==0.1.37
Requires-Dist: langchain-google-genai ==0.0.11
Requires-Dist: langchain-openai ==0.1.1
Requires-Dist: langchain-pinecone ==0.0.3
Requires-Dist: langchain-text-splitters ==0.0.1
Requires-Dist: langsmith ==0.1.27
Requires-Dist: marshmallow ==3.21.1
Requires-Dist: msal ==1.28.0
Requires-Dist: msal-extensions ==1.1.0
Requires-Dist: msrest ==0.7.1
Requires-Dist: multidict ==6.0.5
Requires-Dist: mypy-extensions ==1.0.0
Requires-Dist: nanoid ==2.0.0
Requires-Dist: numpy ==1.26.4
Requires-Dist: oauthlib ==3.2.2
Requires-Dist: openai ==1.14.3
Requires-Dist: opensearch-py ==2.5.0
Requires-Dist: orjson ==3.9.15
Requires-Dist: packaging ==23.2
Requires-Dist: pinecone-client ==3.2.2
Requires-Dist: portalocker ==2.8.2
Requires-Dist: proto-plus ==1.23.0
Requires-Dist: protobuf ==4.25.3
Requires-Dist: psycopg2 ==2.9.9
Requires-Dist: psycopg2-binary ==2.9.9
Requires-Dist: pyasn1 ==0.5.1
Requires-Dist: pyasn1-modules ==0.3.0
Requires-Dist: pycparser ==2.21
Requires-Dist: pydantic ==2.6.4
Requires-Dist: pydantic-core ==2.16.3
Requires-Dist: PyJWT ==2.8.0
Requires-Dist: pypdf ==4.2.0
Requires-Dist: python-dateutil ==2.9.0.post0
Requires-Dist: pypiwin32 ==223
Requires-Dist: PyYAML ==6.0.1
Requires-Dist: redis ==5.0.3
Requires-Dist: regex ==2023.12.25
Requires-Dist: requests ==2.31.0
Requires-Dist: requests-oauthlib ==2.0.0
Requires-Dist: rsa ==4.9
Requires-Dist: s3transfer ==0.10.1
Requires-Dist: setuptools ==69.2.0
Requires-Dist: six ==1.16.0
Requires-Dist: sniffio ==1.3.1
Requires-Dist: SQLAlchemy ==2.0.29
Requires-Dist: tenacity ==8.2.3
Requires-Dist: tiktoken ==0.5.2
Requires-Dist: tqdm ==4.66.2
Requires-Dist: typing-inspect ==0.9.0
Requires-Dist: typing-extensions ==4.10.0
Requires-Dist: urllib3 ==1.26.18
Requires-Dist: yarl ==1.9.4


[![Publish new version to NPM](https://github.com/dev-jpnobrega/ai-agent/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/dev-jpnobrega/ai-agent/actions/workflows/npm-publish.yml)

# AI Agent

AI Agent simplifies the implementation and use of generative AI with LangChain, was inspired by the project [autogen](https://github.com/microsoft/autogen)



## Installation

Use the package manager [pip](https://pypi.org/project/pip/) to install AI Agent.

```bash
pip install ai_enterprise_agent
```

## Usage

### Simple use
```python
  import asyncio

  from ai_enterprise_agent.agent import Agent
  from ai_enterprise_agent.interface.settings import (CHAIN_TYPE, DATABASE_TYPE, DIALECT_TYPE,
                                  LLM_TYPE, PROCESSING_TYPE, VECTOR_STORE_TYPE)
  agent = Agent({
    'processing_type': PROCESSING_TYPE.single,
    'chains': [CHAIN_TYPE.simple_chain],
    'model': {
      "type": LLM_TYPE.azure,
      "api_key": <api_key>,
      "model": <model>,
      "endpoint": <endpoint>,
      "api_version": <api_version>,
      "temperature": 0.0
    },
    "system": {
      "system_message": ""
    },
  })

  response = asyncio.run(
    agent._call(
      input={
        "question": "Who's Leonardo Da Vinci?.",
        "chat_thread_id": "<chat_thread_id>"
      }
    )
  )
  print(response)
```

### Using with Orchestrator Mode
When using LLM with Orchestrator Mode the Agent finds the best way to answer the question in your base knowledge.
```python

  agent = Agent({
    'processing_type': PROCESSING_TYPE.orchestrator,
    'chains': [CHAIN_TYPE.simple_chain, CHAIN_TYPE.sql_chain],
    'model': {
      "type": LLM_TYPE.azure,
      "api_key": <api_key>,
      "model": <model>,
      "endpoint": <endpoint>,
      "api_version": <api_version>,
      "temperature": 0.0
    },
     "database": {
      "type": DIALECT_TYPE.postgres,
      "host": <host>,
      "port": <port>,
      "username": <username>,
      "password": <password>,
      "database": <database>,
      "includes_tables": ['table-1', 'table-2'],
    },
    "system": {
      "system_message": ""
    },
  })

  response = asyncio.run(
    agent._call(
      input={
        "question": "How many employees there?",
        "chat_thread_id": "<chat_thread_id>"
      }
    )
  )
  print(response)
```

## Contributing

If you've ever wanted to contribute to open source, and a great cause, now is your chance!

See the [contributing docs](CONTRIBUTING.md) for more information

## Contributors ✨

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->

<table>
  <tr>
    <td align="center">
      <a href="https://github.com/dev-jpnobrega">
        <img src="https://avatars1.githubusercontent.com/u/28389807?s=400&u=2c152fc946efc96badce0cfc743ebcb2585b4b3f&v=4" width="100px;" alt=""/>
        <br />
        <sub>
          <b>JP. Nobrega</b>
        </sub>
      </a>
      <br />
      <a href="https://github.com/dev-jpnobrega/ai-agent-py/issues" title="Answering Questions">💬</a>
      <a href="https://github.com/dev-jpnobrega/ai-agent-py/master#how-do-i-use" title="Documentation">📖</a>
      <a href="https://github.com/dev-jpnobrega/ai-agent-py/pulls" title="Reviewed Pull Requests">👀</a>
      <a href="#talk-kentcdodds" title="Talks">📢</a>
    </td>
    <td align="center">
      <a href="https://github.com/tuliogaio">
        <img src="https://github.com/tuliogaio.png" width="100px;" alt=""/>
        <br />
        <sub>
          <b>Túlio César Gaio</b>
        </sub>
      </a>
      <br />
      <a href="https://github.com/dev-jpnobrega/ai-agent-py/issues" title="Answering Questions">💬</a>
      <a href="https://github.com/dev-jpnobrega/ai-agent-py/master#how-do-i-use" title="Documentation">📖</a>
      <a href="https://github.com/dev-jpnobrega/ai-agent-py/pulls" title="Reviewed Pull Requests">👀</a>
      <a href="#talk-kentcdodds" title="Talks">📢</a>
    </td>
  </tr>
</table>

<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->

## License
[Apache-2.0](LICENSE)
