Metadata-Version: 2.4
Name: agent-work
Version: 0.1.1
Summary: Go-to-market automation — Google Workspace, LinkedIn (Unipile), and Attio CRM
Project-URL: Homepage, https://github.com/rebase-energy/agent-work
Project-URL: Repository, https://github.com/rebase-energy/agent-work
Project-URL: Issues, https://github.com/rebase-energy/agent-work/issues
Author-email: Sebastian Haglund <sebastian@rebase.energy>
License: MIT License
        
        Copyright (c) 2025 Sebastian Haglund / rebase-energy
        
        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
Keywords: attio,automation,crm,google-workspace,linkedin
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.11
Requires-Dist: httpx
Requires-Dist: python-dotenv
Requires-Dist: typer>=0.15
Description-Content-Type: text/markdown

# agent-work

Go-to-market automation toolkit that connects **Google Workspace**, **LinkedIn** (via Unipile), **Attio CRM**, **ClearFeed**, **GitHub**, and **Notion** into agent-driven workflows.

Built to be operated by coding agents (Claude Code, Codex, Gemini CLI, etc.) through natural-language recipes.

## How it works

```
recipes/*.md              Declarative workflow specs (what to do)
agent_work/integrations/  Python clients for each service (how to do it)
rules/*.md                Per-service usage constraints (guardrails)
scripts/                  Standalone utility scripts
```

An agent reads a recipe, calls the service clients, and writes the output to Google Sheets.

## Services

| Client | Service | Transport |
|---|---|---|
| `GWS` | Google Workspace (Gmail, Calendar, Drive, Sheets) | `gws` CLI (subprocess) |
| `UnipileClient` | LinkedIn (messaging, posts, profiles) | REST API via `httpx` |
| `AttioClient` | Attio CRM (people, companies, deals, notes, tasks) | REST API via `httpx` |
| `ClearFeedClient` | ClearFeed (tickets, collections, customers) | REST API via `httpx` |
| `GitHubClient` | GitHub (repos, issues, PRs, commits, file contents) | REST API via `httpx` |
| `NotionClient` | Notion (databases, pages, search) | REST API via `httpx` |

All clients are synchronous and return raw dicts. Unipile, Attio, ClearFeed, GitHub, and Notion are context managers.

## Rules

Per-service usage rules live in `rules/`. Each file documents constraints, required patterns, and approval requirements for its API. Agents should read the relevant rule file before calling a service.

## Recipes

| Recipe | Description |
|---|---|
| [LinkedIn Inbox Triage](recipes/linkedin-inbox-triage.md) | Categorize LinkedIn messages, cross-reference CRM, suggest follow-ups |
| [Calendar Meeting Prep](recipes/calendar-meeting-prep.md) | Prep briefs for upcoming meetings with CRM + LinkedIn context |
| [CRM Pipeline Review](recipes/crm-pipeline-review.md) | Pipeline snapshot — overdue tasks, recent notes, stale contacts |
| [Email Inbox Summary](recipes/email-inbox-summary.md) | Gmail categorization with CRM cross-reference |
| [Daily Report](recipes/daily-report.md) | Daily summary across Email, LinkedIn, ClearFeed, and Notion |

Run any recipe by telling your agent: `Run recipes/<name>.md`

## Setup

```bash
uv sync                # install dependencies
gws auth setup         # authenticate Google Workspace CLI
cp .env.example .env   # add your API keys
```

### Environment variables

| Variable | Required | Service |
|---|---|---|
| `ATTIO_KEY` | yes | Attio CRM |
| `CLEARFEED_API_KEY` | yes | ClearFeed |
| `UNIPILE_DSN` | yes | Unipile |
| `UNIPILE_ACCESS_TOKEN` | yes | Unipile |
| `GITHUB_ACCESS_TOKEN` | yes | GitHub |
| `NOTION_API_KEY` | yes | Notion |
| `SUPABASE_URL` | no | Supabase |
| `SUPABASE_PASSWORD` | no | Supabase |
| `SUPABASE_KEY` | no | Supabase |

## Quick start

```bash
# verify all services are connected
uv run python scripts/smoke.py
```

## Agent compatibility

This repo includes instruction files for multiple coding agents:

| File | Agent |
|---|---|
| `CLAUDE.md` | [Claude Code](https://docs.anthropic.com/en/docs/claude-code) |
| `AGENTS.md` | [OpenAI Codex](https://github.com/openai/codex) |
| `GEMINI.md` | [Gemini CLI](https://github.com/google-gemini/gemini-cli) |

Each file contains the same project context tailored to the agent's expected format.
