Skip to main content

A passive agent for prompt engineering experiments with instruction-based context building

Project description

passive-agent

A passive agent for prompt engineering experiments with instruction-based context building.

Overview

Passive Agent is a flexible tool for building complex contexts by processing instructions that combine file content with AI completions. It's designed for prompt engineering experiments where you need to iteratively build context from multiple sources.

Features

  • 📄 Load content from files and directories
  • 🤖 Integrate AI completions into context (supports OpenAI and OpenRouter)
  • 🔄 Sequential processing with context accumulation
  • 📊 Token usage tracking and reporting
  • 🎯 Simple instruction-based workflow

Installation

pip install passive-agent

Or install from source:

git clone https://github.com/yourusername/passive-agent
cd passive-agent
pip install -e .

Quick Start

  1. Create an INSTRUCT.md file with your instructions:

    @header.md
    @data/
    /completion
    @footer.md
    
  2. Run passive-agent:

    passive-agent
    
  3. Check the generated files:

    • CONTEXT.md - Complete context with all content
    • COMPLETION.json - Raw API response
    • COMPLETION.md - Completion text

Example

See the example/ directory for a complete working example:

cd example
passive-agent

Configuration

OpenAI

export OPENAI_API_KEY="your-key"
passive-agent

OpenRouter

export OPENROUTER_API_KEY="your-key"
export OPENROUTER_MODEL="anthropic/claude-3-opus"
passive-agent

Documentation

For detailed usage instructions, see USAGE.md.

License

MIT License - see 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

passive_agent_kahiroka-0.1.1.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

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

passive_agent_kahiroka-0.1.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file passive_agent_kahiroka-0.1.1.tar.gz.

File metadata

File hashes

Hashes for passive_agent_kahiroka-0.1.1.tar.gz
Algorithm Hash digest
SHA256 778f6716e911fac1f6b6b15f325c9a0ed9ca4b22ba05f3fbe23445f7f8330abd
MD5 e25f8953419d1e45c21b1aa8d6265ba3
BLAKE2b-256 e7ccb80d7528879fec83bfd6da4ca2da5653462d45e4560683dc19580faed102

See more details on using hashes here.

File details

Details for the file passive_agent_kahiroka-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for passive_agent_kahiroka-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3b937e94ca68405bd4a644cc64ea6226f3870b608c1b503f381b18cbf40612ef
MD5 b2096787780daf03f4f1021a3484e183
BLAKE2b-256 731200447a3d8cfd88aa8342209d313cfb9e6a0f5081810210c0db541ea0d5e0

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