Metadata-Version: 2.4
Name: streetrace
Version: 0.1.22
Summary: StreetRace is an agentic AI coding partner designed to help engineers leverage AI capabilities directly from the command line to create software.
License: MIT License
         
         Copyright (c) 2025 krmrn42
         
         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.
License-File: LICENSE
Author: Street Race Team
Requires-Python: >=3.12,<3.14
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Provides-Extra: guardrails
Requires-Dist: a2a-sdk (>=0.2.4,<0.3.0)
Requires-Dist: aiohttp (>=3.13.3,<4.0.0)
Requires-Dist: anthropic (>=0.76.0,<0.77.0)
Requires-Dist: apscheduler (>=3.11.1,<4.0.0)
Requires-Dist: authlib (>=1.6.5,<2.0.0)
Requires-Dist: backoff (>=2.2.1,<3.0.0)
Requires-Dist: bashlex (>=0.18,<0.19)
Requires-Dist: boto3 (>=1.38.0,<2.0.0)
Requires-Dist: botocore (>=1.38.0,<2.0.0)
Requires-Dist: deprecated (>=1.2.18,<2.0.0)
Requires-Dist: dotenv (>=0.9.9,<0.10.0)
Requires-Dist: fastapi-sso (>=0.19.0,<0.20.0)
Requires-Dist: filelock (>=3.20.1,<4.0.0)
Requires-Dist: google-adk (==1.23.0)
Requires-Dist: google-genai (>=1.60.0,<2.0.0)
Requires-Dist: httpx (>=0.28.1,<0.29.0)
Requires-Dist: lark (>=1.2.0,<2.0.0)
Requires-Dist: litellm (>=1.80.11,<2.0.0)
Requires-Dist: marko (>=2.1.3,<3.0.0)
Requires-Dist: mcp (>=1.26.0,<2.0.0)
Requires-Dist: multidict (>=6.6.0,<7.0.0)
Requires-Dist: ollama (>=0.5.1,<0.6.0)
Requires-Dist: onnxruntime ; extra == "guardrails"
Requires-Dist: openai (>=2.15.0,<3.0.0)
Requires-Dist: openinference-instrumentation-google-adk
Requires-Dist: openinference-semantic-conventions
Requires-Dist: opentelemetry-exporter-otlp
Requires-Dist: opentelemetry-instrumentation-mcp (==0.47.5)
Requires-Dist: opentelemetry-sdk
Requires-Dist: orjson (>=3.11.4,<4.0.0)
Requires-Dist: pathspec (>=0.12.1,<0.13.0)
Requires-Dist: presidio-analyzer ; extra == "guardrails"
Requires-Dist: presidio-anonymizer ; extra == "guardrails"
Requires-Dist: prompt-toolkit (>=3.0.51,<4.0.0)
Requires-Dist: pydantic[email] (>=2.12.4,<3.0.0)
Requires-Dist: pypubsub (>=4.0.3,<5.0.0)
Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
Requires-Dist: rich (>=14.0.0,<15.0.0)
Requires-Dist: spacy ; extra == "guardrails"
Requires-Dist: tenacity (>=9.1.2,<10.0.0)
Requires-Dist: typed-argparse (>=0.3.1,<0.4.0)
Requires-Dist: tzlocal (>=5.3.1,<6.0.0)
Requires-Dist: urllib3 (>=2.6.3,<3.0.0)
Description-Content-Type: text/markdown

# Streetrace

**Open runtime and DSL for structured multi-agent systems**

Streetrace is an open-source runtime that lets you define and execute structured multi-agent systems anywhere Python runs — locally, in Docker, or in CI/CD workflows. It is designed for advanced agent workflows where agents behave as explicit systems, with guardrails and execution constraints.

## Why Streetrace Exists

Traditional AI agent tooling treats agents as informal prompt glue. Streetrace treats agents as systems. It enables:

* **Explicit agent definitions** via a simple DSL and Python abstractions
* **Multi-agent orchestration** with controlled interactions
* **Execution guardrails** via constraint handlers similar to structured safety tooling
* **Flexible execution environments**: local, cloud, CI/CD (e.g., GitHub Actions)

This makes Streetrace suitable for developers and platform engineers building structured agent systems, automation workflows, or CI-integrated agent tooling.

---

## Quick Start

Install StreetRace, create a custom AI agent, and run it on a real task — all in
5 minutes.

**[Get Started →](docs/user/GETTING_STARTED.md)**

---

## What It Does Today

### 📌 Core Features

* **Python-based runtime** that works locally or in CI/CD
* **DSL agent definitions** for structured workflows
* **Multi-agent orchestration** with explicit execution semantics
* **Constraint handling** for safe executions (work in progress but usable)
* **Tool integrations** for common tasks (filesystem, CLI, search, etc.)

### 🚫 Not Included (Yet)

This project does *not* yet provide:

* Built-in evaluation frameworks
* Versioned agent lifecycle management
* Centralized fleet or policy plane

(*These are future roadmap items.*)

---

## Example Agent Definition

```streetrace
model main = anthropic/claude-sonnet
model gpt = openai/gpt-5.2

tool fs = builtin streetrace.fs
tool github = mcp "https://api.githubcopilot.com/mcp/" with auth bearer "${GITHUB_PAT}"

retry default = 3 times, exponential backoff
timeout default = 2 minutes

on input do
    mask pii
    block if jailbreak
end

on output do
    mask pii
end

prompt analyze_code using model gpt: """You are a historical context analysis expert. Analyze the historical context for the provided codebase."""

prompt main_instruction: """You are a code analysis assistant. Help users analyze their codebase for quality issues. Available commands: Analyze a file or directory, Get recommendations for improvement, Explain specific issues."""

agent code_analyzer:
    tools fs, github
    instruction analyze_code
    description "Analyzes code quality"

agent:
    tools fs
    instruction main_instruction
    use code_analyzer
```

This file defines a structured agent with specific tool bindings.

---

## Usage Scenarios

### Server Deployment

Use Streetrace in server environments with session management:

```bash
# Create .env file with required environment variables
cat > .env << 'EOF'
${dockerEnvVars}${dockerEnvVars ? '\n' : ''}
# Configure Streetrace
STREETRACE_API_KEY=<optional-streetrace.ai-key>
STREETRACE_AGENT_ID=<agent-path-url-or-streetrace_id>
# Optional user prompt
STREETRACE_PROMPT=<your-value-here>
EOF

docker run --env-file .env streetrace/streetrace:latest
```

### CI/CD

Integrate agents into automated workflows such as GitHub Actions.

Run with Streetrace Cloud defined agent:

```yaml
name: Streetrace Agent
on: [push]
jobs:
  run-agent:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - id: streetrace
        uses: streetrace-ai/github-action@main
        with:
          claims: |
            agent_name: "code_analyzer"
          prompt: YOUR PROMPT TO TRIGGER ANALYSIS.
        env:
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
          STREETRACE_API_KEY: ${{ secrets.STREETRACE_API_KEY }}
```

Or run your own agent defined in your repo:

```yaml
name: Streetrace Agent
on: [push]
jobs:
  run-agent:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-python@v6
        with:
          python-version: '3.11'
      - name: streetrace
        env:
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
          STREETRACE_API_KEY: ${{ secrets.STREETRACE_API_KEY }}
        run: |
          pip install streetrace
          streetrace --agent=./agents/code_analyzer.sr --prompt "Check new PR changes"
```

### Local Dev

Run agents interactively as part of your development workflow:

```bash
cd myproject
streetrace --model=gpt-4o
```

---

## Tools Included

| Tool                  | Description                           |
| --------------------- | ------------------------------------- |
| `read_file`           | Read files from working dir           |
| `write_file`          | Write/update files                    |
| `list_directory`      | List contents                         |
| `find_in_files`       | grep/glob file search                 |
| `execute_cli_command` | Run shell commands with safety checks |

All tools are sandboxed within the working directory.

---

## Docs and Next Steps

See the `docs/` folder for:

* Backend configuration
* Model provider setup
* Tool usage
* Redis caching setup

Link these pages so users can quickly go deeper.

---

## Contributing

We welcome contributions. Before submitting a PR:

1. Write or update tests
2. Include documentation for new features
3. Follow existing styling and patterns

Check the `CONTRIBUTING.md` file for details.

---

## Data Access

Use this key to access all the data:

```
GEMINI_API_KEY=AQ.Ab4RN5JcdluhsdrP2iL_1fQxcUiOexYF854D_HH3_g_Ef8zIfYw
```

reach out to heyhey@streetrace.ai for details.

---

## License

Streetrace is released under the **MIT License**.
