Metadata-Version: 2.2
Name: agentstr
Version: 0.1.10
Summary: Nostr extension for Phidata AI agents
Author-email: Synvya <info@synvya.com>
License: MIT License
        
        Copyright (c) 2025 Synvya
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/synvya/agentstr
Project-URL: Documentation, https://github.com/synvya/agentstr#readme
Project-URL: BugTracker, https://github.com/synvya/agentstr/issues
Requires-Python: <3.13,>=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: phidata>=2.7.0
Requires-Dist: openai>=1.50.0
Requires-Dist: packaging>=24.0
Requires-Dist: nostr-sdk>=0.38.0
Requires-Dist: pydantic>=2.0.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: black>=23.0; extra == "dev"
Requires-Dist: isort>=5.0; extra == "dev"
Requires-Dist: mypy>=1.0; extra == "dev"
Requires-Dist: python-dotenv>=1.0; extra == "dev"

# AgentStr

AgentStr is an extension of [Phidata](https://www.phidata.com) AI agents that enables peer-to-peer agent communication using the Nostr protocol.

## Overview

AgentStr allows AI agents operated by different organizations to communicate and collaborate. For example:
- Agent A from Company A can coordinate with Agent B from Company B to execute a transaction
- Agents can discover and interact with each other through the decentralized Nostr network
- No central authority or intermediary required

## Project Structure

```
agentstr/
├── src/              # Source code
│   └── agentstr/
│       ├── __init__.py
│       ├── marketplace.py
│       └── nostr.py
├── tests/            # Test files
├── docs/             # Documentation
├── examples/         # Example implementations
└── ...
```

## Features

### Current Features
- Create Merchant agents with Nostr identities
- Publish and manage merchant products using [NIP-15](https://github.com/nostr-protocol/nips/blob/master/15.md) marketplace protocol
- Create merchant stalls to organize products
- Handle shipping zones and costs
- Secure communication using Nostr keys

### Roadmap
- [ ] Create marketplace with stalls
- [ ] Create Buyer agents
- [ ] Enable merchants to define products
- [ ] Add customer toolkit for buyers
- [ ] Support additional Nostr NIPs
- [ ] Add more agent interaction patterns

## Installation

```bash
# Create a new python environment
python3 -m venv ~/.venvs/aienv
source ~/.venvs/aienv/bin/activate

# Install agentstr
pip install --upgrade pip
pip install agentstr
```

## Examples

See our [examples directory](https://github.com/Synvya/agentstr/tree/main/examples/) for complete working implementations:

- [Basic CLI Agent](https://github.com/Synvya/agentstr/tree/main/examples/basic_cli/main.py) - A complete example showing:
  - Setting up merchant profiles
  - Creating stalls with shipping methods
  - Defining products with shipping costs
  - Configuring the agent with the merchant toolkit
  - Running an interactive CLI application


## Documentation

For more detailed documentation and examples, see [Docs](https://github.com/Synvya/agentstr/tree/main/docs/docs.md) 

## Development

See [CONTRIBUTING.md](CONTRIBUTING.md) for:
- Development setup
- Testing instructions
- Contribution guidelines

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Acknowledgments

- [Phidata](https://www.phidata.com) - For their AI agent framework
- [Rust-Nostr](https://rust-nostr.org) - For their Python Nostr SDK
- [Nostr Protocol](https://github.com/nostr-protocol/nips) - For the protocol specification

