Skip to main content

A lightweight, zero-dependency alternative to LangChain for Agentic AI

Project description

PlugAI

A lightweight, zero-dependency alternative to LangChain for Agentic AI.

Features

  • Zero Dependencies: Core logic relies purely on standard Python. Bring your own LLM client.
  • Instant Tools: Wrap any Python function with @tool to automatically generate JSON schemas.
  • Built-in Memory Safety: Automatic memory pruning prevents token limit crashes.
  • Provider Agnostic: Swap seamlessly between OpenAI, Groq, Anthropic, or local models.

Quick Start

import os
from groq import Groq
from plugai import PlugAgent, tool, GroqProvider

@tool
def get_weather(location: str) -> str:
    """Gets the current weather for a specific location."""
    return f"The weather in {location} is 72°F and sunny."

client = Groq(api_key=os.getenv("GROQ_API_KEY"))
provider = GroqProvider(client)

agent = PlugAgent(
    provider=provider,
    model="llama-3.3-70b-versatile",
    tools=[get_weather]
)

response = agent.run("What is the weather in Tokyo?")
print(response)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plugai-0.1.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plugai-0.1.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file plugai-0.1.0.tar.gz.

File metadata

  • Download URL: plugai-0.1.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for plugai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e2cbe305f0c7a882dcfe8578036691171fc328b7b9951df3a9001d3fa4c0cfad
MD5 6541fbba278de58bbdec5baaf8dc9526
BLAKE2b-256 b99691b3b91daa7bdf84bccb2458407813d770ee7c2b5c59cbeda37faab78adb

See more details on using hashes here.

File details

Details for the file plugai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: plugai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for plugai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a4ff7dcc96201640d4010620048b082da80a050deadb8e1ce6085ba0724b7fe
MD5 a89be3814215e01c9ba0dbc897e2e8dd
BLAKE2b-256 0acff6f619f5517c40681c4a7f8fed0153d347bdf57b14e359683e9f6f014c58

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page