Pharmaclaw Ip Expansion Agent

Intellectual Property Expansion Agent for pharma drug discovery/development teams. Proactively manages/expands IP portfolios by analyzing SMILES/molecules fr...

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 122 · 1 current installs · 1 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
Name/description align with the code: RDKit fingerprinting, USPTO/ PubChem queries, portfolio tracking in SQLite, report generation and visualizations are all present. Some referenced components in the SKILL.md (patent_fetch.py, nlp_extract.py, references/nlp_patterns.md) are mentioned but not present in the bundle; agent.py implements API calls itself, but the missing files are a discrepancy to verify.
Instruction Scope
SKILL.md instructs the agent to parse SMILES, run infringement/ FTO/novelty analyses, write reports, and log to a local DB/log file. The runtime instructions do cause network calls to public patent/compound APIs and write files (ip_portfolio.db, logs/ip_expansion.log, PNG/MD reports) in the current directory. The skill does not instruct reading unrelated system files or exporting arbitrary system state.
Install Mechanism
There is no formal install spec (instruction-only), so nothing is auto-downloaded by the registry. However SKILL.md and the code assume heavy Python deps (rdkit-pypi, scispacy, spacy, pandas, requests) and the agent prints guidance to fetch a scispacy model from an S3 URL. If you install dependencies manually, be aware that large models (and an S3-hosted model) may be downloaded.
Credentials
The skill requests no environment variables or credentials in metadata, and uses public APIs (USPTO PatentsView and PubChem) that generally require no secret. A few references (EPO OPS) note keys in docs but are not used in code. The code uses scispacy UmlsEntityLinker which in some deployments requires access to external UMLS resources or model files — the skill does not declare any UMLS credentials, so verify whether additional credentials are needed for full NLP linking.
Persistence & Privilege
always is false and the skill does not request elevated/always-on privileges. It writes its own DB/logs/reports under the working directory but does not attempt to modify other skills or system-wide settings.
Assessment
This skill appears to do what it claims: chemistry fingerprinting, patent/compound API queries, NLP-based extraction, and local portfolio tracking. Before installing or running it: 1) Review agent.py fully (you have it) and confirm the network endpoints it calls (USPTO/ PubChem) are acceptable for your environment. 2) Run it in an isolated environment (container/VM) because it will install heavy Python packages and download language/chemistry models (scispacy), and it writes a local SQLite DB and log files. 3) Note that some files referenced in SKILL.md are missing — verify you have any additional scripts or models the maintainer expects. 4) Don’t pass sensitive or production-only secrets/SMILES into the agent without reviewing how/where results are stored or transmitted. 5) If you need the NLP linking features, confirm whether UMLS credentials or additional model downloads are required. If any of the above are unexpected or you need higher assurance, ask the publisher for missing files and a reproducible install spec before use.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
latestvk9728kb3ycwbw2gh7yhwwmkfb582p1dt

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

Pharma IP Expansion Agent

Specialized agent extending pharma team agents (Drug Discovery, Synthesis via chemistry-query, Patent/Literature/Tox/Safety). Analyzes inputs (SMILES, keywords, profiles) for actionable IP insights: portfolio mgmt, infringement/FTO, prior art novelty, strategic expansion. Outputs JSON/MD reports + RDKit viz (PNG/SVG).

Core Capabilities

Follow workflow: Parse input → Analyze → Generate report → Log to portfolio DB.

  1. Portfolio Management: Track assets (patents/apps), monitor expirations. Use scripts/agent.py track.
  2. Infringement Analysis: RDKit Morgan FP Tanimoto (>0.8 flag risk) vs patent compounds.
  3. FTO Assessments: USPTO/PubChem searches for blocking patents in area.
  4. Prior Art Mining/Novelty: NLP extract claims/chemicals → suggest RDKit bioisosteres evading art.
  5. Strategic Expansion: Recommend continuations/repurposing based on trends.

Quick Start

Exec main agent:

python3 scripts/agent.py --mode analysis --input '{"smiles": ["CCO"], "from_agent": "synthesis", "therapeutic": "pain"}'

Output: JSON report w/ risks, suggestions, viz saved to assets/.

For multi-agent chaining (OpenClaw): Spawn sub-session w/ this skill active, pass JSON from chemistry-query.

Workflow Decision Tree

  • Input JSON/SMILES? → RDKit parse → Fingerprint → Compare patents (scripts/rdkit_utils.py)
  • Portfolio query? → SQLite query (self.db)
  • FTO/Prior art? → API fetch → NLP parse (references/nlp_patterns.md) → Similarity
  • Strategic? → Market trends via PubChem stats + derivatives
  • Edge: Intl/PCT/AI-inv? → Note variations, flag enablement risks.

Always output structured JSON: {"risks": [...], "suggestions": [...], "viz_path": "report.png", "recommendations": {...}} + MD report.

Multi-Agent Integration (OpenClaw)

  • Input from Synthesis/chemistry-query: {"smiles": [...], "reactions": [...]} → Auto infringement check.
  • Chain w/ Tox/Safety: Incorporate ADMET/safety to prioritize claims.
  • Spawn: sessions_spawn task="IP expand this SMILES from synth: ..."
  • Autonomous: Cron portfolio checks.

Resources

scripts/

  • agent.py: Main class IPExpansionAgent w/ all methods. Exec directly or import.
  • rdkit_utils.py: FP/similarity/bioisosteres.
  • patent_fetch.py: USPTO/PubChem APIs.
  • nlp_extract.py: Claims/chem names (spaCy).

Test: python3 scripts/agent.py --help

references/

  • apis.md: USPTO/EPO/PubChem endpoints.
  • rdkit_guide.md: FP radii, Tanimoto thresholds.
  • ip_strategies.md: Claims types, FTO best practices.
  • pharma_trends.md: AI-IP, PCT notes.

Load via read references/apis.md for API details.

assets/

  • report_template.md: MD report format.
  • portfolio_schema.sql: DB init.
  • risk_matrix_template.svg: Editable viz.

Copy to outputs.

Implementation Notes

  • DB: SQLite ip_portfolio.db (assets/portfolio_schema.sql).
  • Thresholds: Tanimoto>0.85 high risk; configurable.
  • Viz: RDKit PNG/SVG to current dir.
  • Deps: pip install rdkit-pypi requests pandas sqlite3 spacy scispacy (assume chemistry env).
  • Logging: To logs/ip_expansion.log.
  • OpenClaw: Use exec on scripts/ for analysis; write reports.

For updates, edit class methods.

Files

6 total
Select a file
Select a file to preview.

Comments

Loading comments…