Skip to main content

Toolkit for Persona, an agent AI system — provides modular, callable tools for dynamic function execution

Project description

Persona CLI

Persona CLI is a command-line tool for creating and managing projects that use the persona-toolkit — a modular function-calling framework designed for agent-based systems.

This CLI helps you scaffold projects, generate tools, test them locally, and run the FastAPI server that exposes your tools via REST API.


🚀 Installation

To use the CLI, first install the persona-toolkit library (assuming it's published or available locally):

pip install persona-toolkit

Or if you're developing locally:

cd persona-toolkit/
poetry install

The CLI is exposed as:

persona-toolkit

📆 Features

init

Create a new project scaffold with Poetry and the required structure:

persona-toolkit init my-project

This will:

  • Initialize a Poetry project
  • Install persona-toolkit as a dependency
  • Create a tools/ folder where your tools will live

add-tool

Add a new tool interactively:

persona-toolkit add-tool

You'll be prompted for a tool name. A new Python file will be created in the tools/ directory with a ready-to-edit template including:

  • Input and Output models (using Pydantic)
  • A run() function

test-tool

Test a tool locally by manually entering its input values:

persona-toolkit test-tool echo

This will:

  • Import the specified tool from the tools/ directory
  • Prompt for input fields
  • Run the run() function and show the output

You can use the cli to pass input values:

persona-toolkit test-tool echo --input '{"message": "Hello, World!"}'

run

Start the FastAPI server and expose your tools via HTTP:

persona-toolkit run --port 8000

You can now access:

  • GET /tools — list available tools
  • GET /tools/{tool}/schema — get tool schema
  • POST /invocations — run a tool

🗂 Project Structure

my-project/
├── pyproject.toml         # Poetry project config
├── tools/
│   └── echo_test.py            # Example tool

Each tool must define:

  • NAME (a str with tool name)
  • Input (a Pydantic model)
  • Output (a Pydantic model)
  • run(input: Input, **kwargs) -> Output

kwargs includes: project_id, session_id and user_id


💡 Example Tool

# tools/echo_test.py

from pydantic import BaseModel, Field

NAME = "echo"


class Input(BaseModel):
    message: str = Field(description="Message to echo")


class Output(BaseModel):
    message: str


def run(input: Input, **kwargs) -> Output:
    """Echo the message back"""
    return Output(message=f"Echo: {input.message}")

✅ Requirements

  • Python 3.10+
  • Poetry
  • Uvicorn (installed automatically)

📃 License

MIT License


Built for the Persona Agent System 🤖

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

persona_toolkit-1.0.23.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

persona_toolkit-1.0.23-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file persona_toolkit-1.0.23.tar.gz.

File metadata

  • Download URL: persona_toolkit-1.0.23.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.10.17 Linux/6.1.79

File hashes

Hashes for persona_toolkit-1.0.23.tar.gz
Algorithm Hash digest
SHA256 db62898877f0fc3ded2bf36e13b17cf4082d81399ad817bb2c662d05bc987b37
MD5 a323c4258d03d512073e4ff9d3a5c6f9
BLAKE2b-256 f5bddf3e559e206f821e19e1ee127ace59a15fa270ae62c200a154df90e7485b

See more details on using hashes here.

File details

Details for the file persona_toolkit-1.0.23-py3-none-any.whl.

File metadata

  • Download URL: persona_toolkit-1.0.23-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.10.17 Linux/6.1.79

File hashes

Hashes for persona_toolkit-1.0.23-py3-none-any.whl
Algorithm Hash digest
SHA256 f5c7f9e961a85275f967342d27cec53c6642f31a5ff0a74afc0073134a3bc6df
MD5 c6df10db523753d8c059832a29c67830
BLAKE2b-256 38e436180d22142d56015f58e2b38db5cc2b399c904df8b0a2a5bce08e71293e

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