Plutus AI

0.3.240 · active · verified Thu Apr 16

Plutus AI is an autonomous AI agent framework designed for local execution, featuring subprocess orchestration, dynamic tool creation, and a local-first web interface. It allows users to define and run AI agents on their own machines, leveraging external LLMs. The current version is 0.3.240, and the library is in active development with frequent (often daily) releases.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to programmatically define an Agent and a Goal object using the Plutus AI library. It highlights the primary use of these classes for defining agent behaviors and tasks. To execute agents, the Plutus CLI (`plutus run` or `plutus chat`) or the local web UI is typically used, as the `Agent` class itself is a definition rather than an executor.

from plutus import Agent, Goal
import os # Good practice for potential environment variables

# Define an agent specification as a dictionary
agent_spec = {
    "name": "SimpleGreeterBot",
    "instructions": "You are a friendly bot that greets the user and introduces yourself.",
    "goals": ["Greet the user, introduce yourself, and then finish the conversation."],
    "tools": [],
}

# Instantiate the Agent and Goal definitions from the plutus library
agent = Agent(spec=agent_spec)
goal = Goal(description="Say hello to the user and finish the task.")

print(f"Successfully defined Agent: '{agent.name}'")
print(f"Instructions: '{agent.instructions}'")
print(f"Goal: '{goal.description}'")

# Note: To *run* this agent, you typically use the Plutus CLI, for example:
# 1. Ensure the agent spec is accessible (e.g., saved via Plutus UI or a YAML file).
# 2. Run from your terminal: `plutus chat --agent SimpleGreeterBot --goal "Say hello!"`
#    Or `plutus run --agent SimpleGreeterBot --goal "Say hello!"`

view raw JSON →