Skip to main content

Pixelagent: An Agent Engineering Blueprint

We see agents as the intersection of an LLM, storage, and orchestration. Pixeltable unifies this interface into a single declarative framework, making it the de-facto choice for engineers to build custom agentic applications with build-your-own functionality for memory, tool-calling, and more.

Build your own agent framework:

  • Data Orchestration and Storage: Built on Pixeltable's data infrastructure
  • Native Multimodal: chat() takes text and an image
  • Declarative Model: A type-safe python framework
  • Model agnostic: Extensible to multiple providers
  • Observability: Messages and tool calls are stored in tables
  • Agentic Extensions: Examples for reasoning, reflection, and memory

Use with Cursor, Windsurf, Cline

Install the package and point your editor at it:

pip install pixelagent

All four providers ship in the package:

from pixelagent.openai import Agent   # or .anthropic, .bedrock, .gemini

agent = Agent(name="my_agent", system_prompt="You are a helpful assistant.")
print(agent.chat("Hello"))

Plug-and-Play Extensions

Usage

Transform your agent blueprint into a distributable package on PyPI, extending the build-your-own philosophy to deployment and sharing.

Installation

pip install "pixeltable>=0.7.15,<0.8" "pixelagent[openai]"
# or pixelagent[anthropic], pixelagent[gemini], pixelagent[bedrock]

Quick Start

from pixelagent.anthropic import Agent  # Or from pixelagent.openai import Agent

# Create a simple agent
agent = Agent(
    name="my_assistant",
    system_prompt="You are a helpful assistant."
)

# Chat with your agent
response = agent.chat("Hello, who are you?")
print(response)

Adding Tools

# tools.py — Pixeltable stores a UDF by its import path, so it lives in a module.
import pixeltable as pxt
import yfinance as yf


@pxt.udf
def stock_price(ticker: str) -> dict:
    """Get stock information for a ticker symbol"""
    stock = yf.Ticker(ticker)
    return stock.info
import pixeltable as pxt
from pixelagent.anthropic import Agent

from tools import stock_price

agent = Agent(
    name="financial_assistant",
    system_prompt="You are a financial analyst assistant.",
    tools=pxt.tools(stock_price),
)

# Use tool calling
result = agent.tool_call("What's the current price of NVDA?")
print(result)

State management

import pixeltable as pxt

# Agent memory is automatically persisted in tables
memory = pxt.get_table("my_assistant.memory")
conversations = memory.collect()

# Access tool call history
tools_log = pxt.get_table("financial_assistant.tools")
tool_history = tools_log.collect()

# cusomatizable memory database
conversational_agent = Agent(
    name="conversation_agent",
    system_prompt="Focus on remebering the conversation",
    n_latest_messages=14
)

Custom Agentic Strategies

# ReAct pattern for step-by-step reasoning and planning
import re
from datetime import datetime

import pixeltable as pxt

# Tools live in a module, not beside the agent: pixeltable needs a UDF to be
# importable by name so a stored computed column can find it again.
from react_tools import stock_info

from pixelagent.openai import Agent

REACT_PROMPT = """
Today is {date}

IMPORTANT: You have {max_steps} maximum steps. You are on step {step}.

1. THOUGHT: Think about what information you need to answer the question.
2. ACTION: Either use a tool OR write "FINAL" if you are ready to answer.

Available tools:
{tools}

THOUGHT: [your reasoning]
ACTION: [tool_name] OR simply write "FINAL"
"""


def extract_section(text, section_name):
    pattern = rf'{section_name}:?\s*(.*?)(?=\n\s*(?:THOUGHT|ACTION):|$)'
    match = re.search(pattern, text, re.DOTALL | re.IGNORECASE)
    return match.group(1).strip() if match else ""


# One agent, built once. The system prompt is per-turn data, so a step that
# needs a different prompt passes it to chat().
agent = Agent(
    name="financial_planner",
    system_prompt="You are a financial analyst.",
    tools=pxt.tools(stock_info),
    reset=True,
)


def run_react_loop(question, max_steps=5):
    for step in range(1, max_steps + 1):
        response = agent.chat(
            question,
            system_prompt=REACT_PROMPT.format(
                date=datetime.now().strftime("%Y-%m-%d"),
                tools=["stock_info"],
                step=step,
                max_steps=max_steps,
            ),
        )
        action = extract_section(response, "ACTION")
        if "FINAL" in action.upper():
            break
        if "stock_info" in action.lower():
            agent.tool_call(question)

    return agent.chat(question)


recommendation = run_react_loop("Create an investment recommendation for AAPL")

Check out our tutorials for more examples including reflection loops, planning patterns, and multi-provider implementations.

Migrating from 0.1.x

0.2.0 requires Pixeltable >= 0.7.15, < 0.8 and Python 3.11+. Upgrade with pip install -U "pixeltable>=0.7.15,<0.8" pixelagent.

What changed for callers:

  • A different model updates the chat pipeline. Existing rows keep their previous responses. reset=True drops the directory and rebuilds it. SchemaConflict is raised when Pixeltable refuses the edit, for example a toolset or column type it cannot reconcile.
  • chat() takes system_prompt, model_kwargs, max_tokens, and conversation_id. n_latest_messages is a constructor argument. The history window is fixed when the agent is built.
  • Memory rows carry conversation_id (default "default"), so one agent can hold several threads. The agent table also stores system_prompt, model_kwargs, max_tokens, n_latest, and image.

A failed turn leaves memory empty. chat() reads the reply from the insert.

Tutorials and Examples

  • Basics: Check out Getting Started for a step-by-step introduction to core concepts
  • Advanced Patterns: Explore Reflection and Planning for more complex agent architectures
  • Specialized Directories: Browse our example directories for deeper implementations of specific techniques

Ready to start building? pip install pixelagent, work through the examples, and let Pixeltable handle the AI data infrastructure while you focus on your agent.

Metadata

Release files for pixelagent 0.2.0

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

Source distribution (sdist)

Source distribution for pixelagent 0.2.0
File Size Uploaded
pixelagent-0.2.0.tar.gz 21.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pixelagent 0.2.0
File Interpreter ABI Platform
pixelagent-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 47.0 kB

Release files / pixelagent-0.2.0.tar.gz

Download URL pixelagent-0.2.0.tar.gz
Size 21.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7298e801fccc023aee84ac802fdc5c6efb08ddb39f6904f23654ecb327bdad19
BLAKE2b-256 checksum
How to use checksums
c2d1c09dff8afdad610e7cd2c951cd8768d0ac1cd146a31a032419453dc3a516
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release files / pixelagent-0.2.0-py3-none-any.whl

Download URL pixelagent-0.2.0-py3-none-any.whl
Size 25.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c1c650dc0abe09b79b2cd72afa73fee5cc4d1600bbed4020af95dce38669968
BLAKE2b-256 checksum
How to use checksums
60236330632ab7047464138b09154baaeca992ba18dcdeec7a21b6607cb91963
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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