Skip to main content

A lightweight agent framework

Project description

Lightweight Agent Framework

Lightweight Agent Framework Logo

A minimalist, extensible framework for building autonomous agents with a focus on transparency and composability.

Overview

Lightweight Agent Framework (LAF) provides a simple yet powerful foundation for building autonomous agents that can think, act, and observe within a structured environment. With LAF, you can:

  • Create agents that follow a clear think-act-observe cycle
  • Record and replay agent interactions using the tape system
  • Build complex workflows by composing multiple agents
  • Persist and analyze agent execution history
  • Extend functionality through a modular tool system

Key Features

  • 🎯 Simple Core Concepts: Based on three fundamental operations - think, act, and observe
  • 📼 Tape-Based History: Record every step of your agent's execution for analysis and debugging
  • 🛠 Modular Tools: Easily extend agent capabilities through a flexible tool system
  • 💾 Built-in Storage: Persist agent history with built-in SQLite support (expandable to other backends)
  • 🔄 Async Support: Built with asyncio for efficient concurrent operations
  • 🧪 Testing Ready: Comprehensive testing utilities and fixtures included

Quick Installation

pip install robotape

For development installation:

pip install robotape[dev]

Basic Usage

Here's a simple example of creating and running an agent:

from robotape.agents import SimpleAgent
from robotape.tape import Tape, StepType

# Create an agent and a tape
agent = SimpleAgent("my_agent")
tape = Tape()

# Add an initial thought
tape.append(Step(
    type=StepType.THOUGHT,
    content="I should search for information",
    metadata=StepMetadata(agent="my_agent", node="planning")
))

# Execute the agent
await agent.execute_step(tape.get_last_step())

Advanced Features

  • Custom Agents: Extend BaseAgent to create specialized agents
  • Tool Integration: Add new capabilities through the tool system
  • Storage Backends: Built-in SQLite support, extensible to other databases
  • Tape Management: Clone, branch, and analyze execution history
  • Validation: Built-in parameter validation and error handling

Documentation

For detailed information, check out:

Development

Clone and set up the development environment:

git clone https://github.com/yourusername/robotape.git
cd robotape
pip install -e ".[dev]"

Run tests:

pytest tests/ --cov=robotape

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

robotape-0.1.0.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

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

robotape-0.1.0-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: robotape-0.1.0.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.10.11 Windows/10

File hashes

Hashes for robotape-0.1.0.tar.gz
Algorithm Hash digest
SHA256 57803950f61d2afd1a1f36962d45f6098474c7137d5f098188f01ce56bdc25f3
MD5 675d4e1d6c499191bab1400307ee44e7
BLAKE2b-256 167c25b1aa52744aa0edab177368660afa83a717f88d1fe1355bc1b0dba9473a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: robotape-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.10.11 Windows/10

File hashes

Hashes for robotape-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fe31aeaf9f69c5f1de5a0f79056984a7524ee9a7a15622cb5b0f8d671bbf372f
MD5 12c1fb8f5b835b0b05e01ff0e8f94506
BLAKE2b-256 1be34ef1567ecd592bb57c7f47486255fc4d53f0fd96a39b1215af792da36e25

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