PandaAGI SDK
Project description
🐼 PandaAGI SDK - An SDK for AGI (Agentic General Intelligence)
The PandaAGI SDK provides a simple, intuitive API for building general AI agents in just a few lines of code. It abstracts away the complexity of Agentic Loops and provides a powerful interface for you to build autonomous agents. Each agent can be configured to run in a custom environment, interacting with the web, your file system, writing code, and running shell commands.
Installation
pip install panda-agi
Or with uv:
uv add panda-agi
🔧 Getting started
First of all, make sure you have a API key. You can get one for free here. Make sure to set it as an environment variable:
export PANDA_AGI_KEY=your_api_key
or set it in the .env file:
PANDA_AGI_KEY=your_api_key
Once you have the API key, you can start using the SDK:
import asyncio
from panda_agi import Agent
from panda_agi.envs import LocalEnv
async def main():
# Create a custom environment for the agent
agent_env = LocalEnv("./my_agent_workspace")
# Create the agent
agent = Agent(environment=agent_env)
# Run the agent with a task
response = agent.run("Tell me a joke about pandas")
print(response.output)
# Other possible tasks
response = agent.run("Make a report of the real estate market in Germany")
# -> will generate a reporrt in the provided workspace folder
response = agent.run("Can you analyze our sales and create a dashboard?")
# -> will generate a dashboard in the provided workspace folder starting from a csv file in the workspace folder
response = agent.run("Can you create a website for our company?")
# -> will generate a website in the provided workspace folder
# Disconnect when done
await agent.disconnect()
if __name__ == "__main__":
asyncio.run(main())
In case you want to enable te web search, you will also need a Tavily API key. You can get one for free here. Then set it as an environment variable or set it in the .env file:
TAVILY_API_KEY=your_api_key
📱 Running with the UI
In case you don't want to build an app from scratch, we provide a UI that you can use to run your agents.
Running it is as simple as:
# Run the UI
cd examples/ui
./start.sh
This will start a docker container with the UI running. You can access it at http://localhost:3000 and start using it.
📓 Try it Online
Want to experiment with PandaAGI SDK without any setup? Try our interactive notebook:
🛠️ Features
- Simple, intuitive API for interacting with PandaAGI agents
- Support for local and Docker environments
- Asynchronous event-based communication
- Pydantic models for type safety
📚 Documentation
For complete documentation, visit our documentation site.
🛠️ Development
Prerequisites
- Python 3.8+
- uv
Setup
- Clone the repository
- Install dependencies:
uv pip install -e ".[dev]"
Testing
Run tests with pytest:
uv run pytest
📝 License
MIT License
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
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
File details
Details for the file panda_agi-0.5.2.tar.gz.
File metadata
- Download URL: panda_agi-0.5.2.tar.gz
- Upload date:
- Size: 127.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1f36c77b18335d85c3fe834afe921e3cf120176daa14fd6da3a5fcd3d80e1da
|
|
| MD5 |
a5d1189889361d9089c2865f2a774aab
|
|
| BLAKE2b-256 |
37dbd0e3c3f3a4dde5453ca9748f7b4b081109df0f004c0b2f4c48723f44e895
|
File details
Details for the file panda_agi-0.5.2-py3-none-any.whl.
File metadata
- Download URL: panda_agi-0.5.2-py3-none-any.whl
- Upload date:
- Size: 64.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3096d1333233174054c696cc5b4c65eb30a2e9896bb68713d100cd31ab233584
|
|
| MD5 |
aa122a88ce0889938e6f6a67e9570541
|
|
| BLAKE2b-256 |
0d420556e10b43de13c6634a8f766d014cf6bf02997def5cb42fb4dc4cc39660
|