Skip to main content

FridonAI Core

FridonAI Core is the foundational package for building AI-driven chatbot platforms, specifically designed for the crypto world. It provides a modular and extensible architecture for creating powerful, domain-specific AI assistants.

Features

  • Modular Plugin Architecture: Easily extend functionality through a well-structured plugin system.
  • Dynamic Request Routing: Efficiently navigate user requests to relevant plugins.
  • Blockchain Utilities: Built-in support for blockchain-related operations.

Installation

Install the package using pip:

pip install fridonai-core

Usage

Here's a basic example of how to use FridonAI Core components:

class GreeterUtility(BaseUtility):
    async def arun(self, *args, **kwargs) -> str:
        return "Hi superman!"
    
class GoodbyeUtility(BaseUtility):
    async def arun(self, *args, **kwargs) -> str:
        return "Bye superman!"
    
class GreeterToolInput(BaseToolInput):
    pass

class GoodbyeToolInput(BaseToolInput):
    pass


GreeterTool = BaseTool(
    name="greeter-tool",
    description="Use this tool for greeting people.",
    args_schema=GreeterToolInput,
    utility=GreeterUtility(),
    examples=[{'request': 'Hi', 'response': 'Hi there, you are the Superman!'}],
)

GoodbyeTool = BaseTool(
    name="goodbye-tool",
    description="Use this tool for saying goodbye to people.",
    args_schema=GoodbyeToolInput,
    utility=GoodbyeUtility(),
    examples=[{'request': 'Bye', 'response': 'Bye superman!'}],
)



class TestPlugin(BasePlugin):
    name: str = "Test"
    description: str = "Use this plugin for several purposes."
    tools: list[BaseTool] = [GreeterTool, GoodbyeTool]


test_plugin = TestPlugin()


rs = await generate_response(
    "Hello there!", 
    [test_plugin], 
    {  
        "thread_id": "1",
        "wallet_id": "2snYEzbMckwnv85MW3s2sCaEQ1wtKZv2cj9WhbmDuuRD",
        "chat_id": "bla"
    }, 
    memory='sqlite',

    return_used_agents=False
)

Plugin Structure

FridonAI Core uses a hierarchical structure for plugins:

  1. Plugins: Extend BasePlugin
  2. Tools: Extend BaseTool
  3. Utilities: Extend BaseUtility

Specialized utilities are available for specific use cases:

  • BlockchainUtility: For blockchain operations
  • RemoteUtility: For making remote API calls
  • LLMUtility: For language model interactions

Graph-based Processing

The core includes a Graph component that manages conversation flow and agent interactions. It's responsible for:

  • Building networks of LLM Agents (Plugins)
  • Routing messages between agents
  • Managing agent states
  • Creating chains with prompts and models
  • Parsing outputs
  • Composing independently implemented plugins

Documentation

For more detailed usage instructions and API documentation, please visit our main README.

Contributing

We welcome contributions!

Stay Connected

Follow us on Twitter for the latest updates and announcements:

Twitter Follow

Metadata

Release files for fridonai-core 0.0.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fridonai-core 0.0.14
File Size Uploaded
fridonai_core-0.0.14.tar.gz 15.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fridonai-core 0.0.14
File Interpreter ABI Platform
fridonai_core-0.0.14-py3-none-any.whl Python 3 none any Details

Total release size: 37.6 kB

Release files / fridonai_core-0.0.14.tar.gz

Download URL fridonai_core-0.0.14.tar.gz
Size 15.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c737850ac56a9ca4dfd144d6d12fbc737a1ddeb3df32e2db3c18dda534c9b64a
BLAKE2b-256 checksum
How to use checksums
effda11033fa05a5b1510d3377c4223ef76340e8f2ac310da57c59d0f11cf628
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.1 CPython/3.12.2 Darwin/24.0.0

Release files / fridonai_core-0.0.14-py3-none-any.whl

Download URL fridonai_core-0.0.14-py3-none-any.whl
Size 22.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
61829ff9b77eb22fbc3883650e969d32a30396214f458559a9efd38c1d7eba8e
BLAKE2b-256 checksum
How to use checksums
7236281954b0c753878410f5ba29f692a065a6f125d0b0822b4bb6fcf72e93ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.1 CPython/3.12.2 Darwin/24.0.0

Release history Release notifications | RSS feed

This release

0.0.14 This release

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page