Skip to main content

🐼 PandaAGI SDK - An SDK for AGI (Agentic General Intelligence)

Release Discord Downloads License: MIT Open In Colab

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.

UI Demo

📓 Try it Online

Want to experiment with PandaAGI SDK without any setup? Try our interactive notebook:

Open In Colab

🛠️ 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

  1. Clone the repository
  2. Install dependencies:
uv pip install -e ".[dev]"

Testing

Run tests with pytest:

uv run pytest

📝 License

MIT License

Metadata

Release files for panda-agi 0.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for panda-agi 0.6.2
File Size Uploaded
panda_agi-0.6.2.tar.gz 178.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for panda-agi 0.6.2
File Interpreter ABI Platform
panda_agi-0.6.2-py3-none-any.whl Python 3 none any Details

Total release size: 286.2 kB

Release files / panda_agi-0.6.2.tar.gz

Download URL panda_agi-0.6.2.tar.gz
Size 178.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2555e9f5ed4d2b585abf6c72a2e61a0a566f7fc8733ecafe61fe9b602329d18f
BLAKE2b-256 checksum
How to use checksums
48bad1b585b6dbb7d5cf2137588783f74f9ccf1def98e70e7d4e530df635d8f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.14

Release files / panda_agi-0.6.2-py3-none-any.whl

Download URL panda_agi-0.6.2-py3-none-any.whl
Size 108.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
70e342b04bb7741c6c8e13cdc2707f4d7fbb21075b357783610796769c4cc0d2
BLAKE2b-256 checksum
How to use checksums
ca0842a6d5a094eddb20d602bfb573941c8a2b320c41befcb221187907592217
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.14
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page