Make class instantiation easy with auto-imports
Project description
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=['metric'])
[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
Release history Release notifications | RSS feed
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.7.tar.gz
(19.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
aini-0.1.7-py3-none-any.whl
(20.7 kB
view details)
File details
Details for the file aini-0.1.7.tar.gz.
File metadata
- Download URL: aini-0.1.7.tar.gz
- Upload date:
- Size: 19.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cba5dfd4382c3ac724c0bdf3eb000d410944546e8c1852c546824df6b5429cb
|
|
| MD5 |
35560c61f0a431881fecc29952e0f8e5
|
|
| BLAKE2b-256 |
476b37f5d2cb49b52a89f5f4de657fab767a5c6f6cb4b1a225e5fe93ce1bd4b2
|
File details
Details for the file aini-0.1.7-py3-none-any.whl.
File metadata
- Download URL: aini-0.1.7-py3-none-any.whl
- Upload date:
- Size: 20.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82442875d31a656c2075d6503a12b8c60b06100bb058c54ab84bebe200a0c2a4
|
|
| MD5 |
9da77e98c33a1346922fda9ab8d17b58
|
|
| BLAKE2b-256 |
786ed0f3ad5a44da48bde1a5c2ee1a5765690b0dd20ec8183575fad14dbdee4d
|