Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fridonai-core

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fridonai-core

Core functionality for FridonAI

  • 0.0.14
  • PyPI
  • Socket score

Maintainers
1

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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc