From 29bd827aaadcf2c301b6b22e4b7ba589411295a1 Mon Sep 17 00:00:00 2001 From: lucaszhu-hue Date: Mon, 22 Jun 2026 12:15:33 +0800 Subject: [PATCH] docs: add Atlas Cloud provider integration guide Co-Authored-By: Claude Opus 4.8 --- README.md | 4 +- .../atlascloud/atlascloud_example.py | 56 +++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 examples/python/providers/atlascloud/atlascloud_example.py diff --git a/README.md b/README.md index 296966cca..9fa965111 100644 --- a/README.md +++ b/README.md @@ -148,10 +148,11 @@ Powered by 100+ LLMs (OpenAI, Anthropic, Gemini & local models). Databricks Replicate Cloudflare +Atlas Cloud

-View all 24 providers with examples +View all 25 providers with examples | Provider | Example | |----------|:-------:| @@ -179,6 +180,7 @@ Powered by 100+ LLMs (OpenAI, Anthropic, Gemini & local models). | SageMaker | [Example](examples/python/providers/sagemaker/sagemaker_example.py) | | Moonshot | [Example](examples/python/providers/moonshot/moonshot_example.py) | | vLLM | [Example](examples/python/providers/vllm/vllm_example.py) | +| Atlas Cloud | [Example](examples/python/providers/atlascloud/atlascloud_example.py) |
diff --git a/examples/python/providers/atlascloud/atlascloud_example.py b/examples/python/providers/atlascloud/atlascloud_example.py new file mode 100644 index 000000000..657bf9196 --- /dev/null +++ b/examples/python/providers/atlascloud/atlascloud_example.py @@ -0,0 +1,56 @@ +""" +Basic example of using Atlas Cloud with PraisonAI + +Atlas Cloud (https://atlascloud.ai) is an OpenAI-compatible API gateway that +exposes 300+ models (DeepSeek, Llama, Qwen, and more) behind a single endpoint. + +Because the endpoint is OpenAI-compatible, you can use it with PraisonAI by +passing an ``llm`` dict that points ``api_base`` at the Atlas Cloud endpoint. + +Setup: + export OPENAI_API_KEY= # e.g. apikey-xxxxxxxx + # or pass api_key="..." directly in the llm dict below + +Find available model ids at https://api.atlascloud.ai/v1/models +""" + +import os + +from praisonaiagents import Agent + +# Initialize Agent with Atlas Cloud (OpenAI-compatible endpoint) +agent = Agent( + instructions="You are a helpful assistant", + llm={ + # Prefix with "openai/" so LiteLLM routes through the OpenAI-compatible path + "model": "openai/deepseek-ai/deepseek-v4-pro", + "api_base": "https://api.atlascloud.ai/v1", + "api_key": os.environ.get("OPENAI_API_KEY"), # your Atlas Cloud key + }, +) + +# Example conversation +response = agent.start("Hello! Can you help me with a mathematical problem?") + +# Example with mathematical reasoning +math_task = """ +Solve this calculus problem step by step: +Find the derivative of f(x) = x^3 * e^(2x) using the product rule. +""" + +response = agent.start(math_task) + +# Example with code optimization +code_task = """ +Optimize this Python function for better performance: + +def find_duplicates(arr): + duplicates = [] + for i in range(len(arr)): + for j in range(i+1, len(arr)): + if arr[i] == arr[j] and arr[i] not in duplicates: + duplicates.append(arr[i]) + return duplicates +""" + +response = agent.start(code_task)