
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
An unofficial Python client for interacting with the Anakin AI API. This client allows you to easily integrate Anakin AI's powerful AI capabilities into your Python projects.
Install the Anakin AI Python Client using pip:
pip install anakin-ai
If you encounter any issues with dependencies, you can manually install the required packages:
pip install anakin-ai requests
Before using the client, you need to set up your Anakin AI API key:
Visit the Anakin AI website: https://anakin.ai and sign in to your account. You need to upgrade to a Pro account for using API feature.
Go to Account settings, and generate a new API Access Token.
Set your local environment:
# Set up a test environment:
python -m venv anakin_test_env
source anakin_test_env/bin/activate # On Windows, use: anakin_test_env\Scripts\activate
# Install Dependencies
pip install -e .
# Set up your API key:
# Export your Anakin AI API key as an environment variable:
export ANAKIN_AI_API_KEY="your_actual_api_key_here"
# On Windows, use:
set ANAKIN_AI_API_KEY=your_actual_api_key_here
Create a Quick App or Chatbot App in Anakin AI.
For example, if the URL is: https://app.anakin.ai/apps/28887, your APP_ID is 28887.
For detailed instructions on API setup, visit the Anakin AI API Integration documentation.
Here's how to use the Anakin AI Python Client for both Quick Apps and Chatbot Apps:
from anakin_ai import AnakinAI
import os
import json
# Initialize the client with your API key
api_key = os.getenv("ANAKIN_AI_API_KEY")
client = AnakinAI(api_key)
# Run a Quick App
QUICK_APP_ID = "YOUR_APP_ID" # Replace with your actual Quick App ID
inputs = {
"Input": "Generate a marketing slogan for a cloud service that emphasizes reliability, performance, and efficiency."
}
# Streaming response
print("Testing Quick App with streaming:")
for chunk in client.run_quick_app(QUICK_APP_ID, inputs, stream=True):
print(chunk, end='', flush=True)
print("\n\nStreaming completed.")
# Non-streaming response
print("\nTesting Quick App without streaming:")
result = client.run_quick_app(QUICK_APP_ID, inputs, stream=False)
print("Quick App Result:", json.dumps(result, indent=2))
from anakin_ai import AnakinAI
import os
import json
# Initialize the client with your API key
api_key = os.getenv("ANAKIN_AI_API_KEY")
client = AnakinAI(api_key)
# Use a Chatbot App
CHATBOT_APP_ID = "YOUR_APP_ID" # Replace with your actual Chatbot App ID
# Streaming response
print("Testing Chatbot with streaming:")
content = "What's your name? Are you the clever one?"
for chunk in client.chat_with_bot(CHATBOT_APP_ID, content, stream=True):
print(chunk, end='', flush=True)
print("\n\nStreaming completed.")
# Non-streaming response
print("\nTesting Chatbot without streaming:")
content = "Tell me a joke about AI."
result = client.chat_with_bot(CHATBOT_APP_ID, content, stream=False)
print("Chatbot Result:", json.dumps(result, indent=2))
# Chatbot conversation example
print("\nTesting Chatbot conversation:")
messages = [
"Hello, who are you?",
"What can you do?",
"Tell me a fun fact about AI."
]
for message in messages:
print(f"\nUser: {message}")
response = client.chat_with_bot(CHATBOT_APP_ID, message, stream=False)
print("Chatbot:", response['content'])
Replace "YOUR_APP_ID"
with your actual Anakin AI App IDs for Quick App and Chatbot App respectively.
Method names:
client.run_quick_app()
client.chat_with_bot()
Input format:
{"Input": "Your prompt here"}
"Your message here"
URL endpoints:
/quickapps/{app_id}/runs
/chatbots/{app_id}/messages
Use case:
Both types of apps support streaming and non-streaming responses.
For more detailed information about the Anakin AI API and its capabilities, please refer to the official Anakin AI documentation.
Contributions to the Anakin AI Python Client are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
This is an unofficial client library and is not affiliated with, officially maintained, or endorsed by Anakin AI.
FAQs
A Python client for interacting with the Anakin AI API
We found that anakin-ai demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.