Skip to main content

Make class instantiation easy with auto-imports

Project description

AINI

aini

Make AI class initialization easy with auto-imports.

Installation

pip install aini

Usage

Autogen

Use DeepSeek as the model for the assistant agent.

from aini import aini, aview

# Load assistant agent with DeepSeek as its model - requires DEEPSEEK_API_KEY
ds = aini('autogen/llm', 'ds')
agent = aini('autogen/assistant', name='deepseek', model=ds)

# Run the agent
ans = await agent.run('What is your name')

# Display component structure
aview(ans)
[Output]
<autogen_agentchat.base._task.TaskResult>
{
  'messages': [
    {
      'source': 'user',
      'content': 'What is your name',
      'type': 'TextMessage'
    },
    {
      'source': 'ds',
      'models_usage <autogen_core.models._types.RequestUsage>': {
        'prompt_tokens': 32,
        'completion_tokens': 17
      },
      'content': 'My name is DeepSeek Chat! 😊 How can I assist you today?',
      'type': 'TextMessage'
    }
  ]
}

Agno

# Load an agent with tools from configuration files
agent = aini('agno/agent', tools=[aini('agno/tools', 'google')])

# Run the agent
ans = agent.run('Compare MCP and A2A')

# Display component structure with filtering
aview(ans, exclude_keys=['metrics'])
[Output]
<agno.run.response.RunResponse>
{
  'content': "Here's a comparison between **MCP** and **A2A**: ...",
  'content_type': 'str',
  'event': 'RunResponse',
  'messages': [
    {
      'role': 'user',
      'content': 'Compare MCP and A2A',
      'add_to_agent_memory': True,
      'created_at': 1746758165
    },
    {
      'role': 'assistant',
      'tool_calls': [
        {
          'id': 'call_0_21871e19-3de7-4a8a-9275-9b4128fb743c',
          'function': {
            'arguments': '{"query":"MCP vs A2A comparison","max_results":5}',
            'name': 'google_search'
          },
          'type': 'function'
        }
      ]
    }
  ]
  ...
}

# Export to YAML for debugging
aview(ans, to_file='debug/output.yaml')

Mem0

memory = aini('mem0/mem0', 'mem0')

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

aini-0.1.8.tar.gz (20.0 kB view details)

Uploaded Source

Built Distribution

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

aini-0.1.8-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file aini-0.1.8.tar.gz.

File metadata

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

File hashes

Hashes for aini-0.1.8.tar.gz
Algorithm Hash digest
SHA256 ec25eb21b0ba40264346c9eba78b7a6169f8b5ae455c73db827c030f95a18d1a
MD5 1ea7ceec33129b1f68b74dabeeb19218
BLAKE2b-256 11e079b3f3146e91747b1de6e35678efe7e556a485b47bb53bd7d120399482b0

See more details on using hashes here.

File details

Details for the file aini-0.1.8-py3-none-any.whl.

File metadata

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

File hashes

Hashes for aini-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 ac8e5cebe0614e7f2e15eba00aacd20682a327f97b6b705e863c281b0e91326b
MD5 751cca03fa67e42811edb36ed3ae5f9f
BLAKE2b-256 341f51f3374f8dd45fd2ea8caaf9d9f52e81beea8f912939ee12ffd147f70a7a

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