215 Commits
Author SHA1 Message Date
Lewis 2fc63e0b7a feat(plugins): enforce outbound message policy decisions 2026-10-08 09:54:37 +08:00
praisonai-triage-agent[bot]andMervin Praison 7998afb228 feat(video): support OpenRouter video generation via VideoAgent (fixes #5173)
Route OpenRouter video SKUs (Veo, Kling, Hailuo, Seedance, ...) through the
existing LiteLLM-backed VideoAgent instead of a bespoke provider subsystem.
Adds OpenRouter HTTP-Referer/X-Title attribution headers for openrouter/
models (overridable via OPENROUTER_REFERER/OPENROUTER_APP_TITLE), documents
OpenRouter as a supported provider, and adds an example.

Co-authored-by: Mervin Praison <[email protected]>
2026-09-23 09:29:50 +00:00
praisonai-triage-agent[bot]andMervin Praison de60cc9455 docs(examples): meeting-notes agent from existing primitives (#4683)
* docs(examples): add meeting-notes agent example composed from existing primitives (#4622)

Demonstrates the AI meeting-notes pipeline (transcribe -> summarize ->
index for Q&A) using existing AudioAgent, Agent, and knowledge= RAG.
No new SDK surface added; keeps core lightweight per AGENTS.md.

Co-authored-by: Mervin Praison <[email protected]>

* fix(examples): print final Q&A result in meeting-notes agent

Greptile P1: qa.start() return was discarded so non-interactive/redirected
runs omitted the advertised Q&A output. Now printed explicitly.

Co-authored-by: Mervin Praison <[email protected]>

---------

Co-authored-by: praisonai-triage-agent[bot] <272766704+praisonai-triage-agent[bot]@users.noreply.github.com>
Co-authored-by: Mervin Praison <[email protected]>
2026-09-02 21:45:39 +01:00
praisonai-triage-agent[bot]andMervinPraison 74256c4440 fix: update VideoAgent Veo IDs to 3.1 family, retire deprecated Veo 2/3.0 (fixes #4567)
- Docstrings list Veo 3.1 Standard/Fast/Lite (Gemini preview + Vertex GA IDs)
- Change examples from veo-3.0-generate-preview to veo-3.1-generate-preview
- Mark Veo 2.0 / 3.0 IDs as deprecated (not recommended)
- Document Veo 3.1 interpolation (last_frame=, reference_images=) via existing
  **kwargs passthrough instead of adding new params (keeps surface lightweight)
- Brief auth + pricing note (API USD/sec vs Flow credits)
- Update tests and example to 3.1 IDs

Co-authored-by: MervinPraison <[email protected]>
2026-08-28 16:24:02 +00:00
Mervin Praison 1f0ccefa8a Merge pull request #1985 from EvoLinkAI/feat/evolink-provider
feat: add Evolink provider example
2026-08-24 20:35:35 +01:00
praisonai-triage-agent[bot]andMervinPraison abeec246f5 fix: wire verification hooks into completion gate (fixes #4053)
Make the dormant verification primitive enforceable:
- Wire _verification_gate() into run_autonomous(_async): blocking hook
  failures block a success outcome and feed captured stdout/stderr back as
  feedback; never-passing checks end at max_iterations, not success.
- Fix lossy _run_verification_hooks re-wrap (preserve details/error/duration).
- Add declarative FileCheckHook (exists/non_empty/contains/json_field==equals),
  no shell; CommandVerificationHook now accepts a string command.
- Feed the goal judge executable evidence; a failing blocking hook
  short-circuits to continue without spending a judge call.
- add_verification()/remove_verification() for runtime registration.
- Add 'verification' run-journal event kind and YAML `verification:` config
  parity mapping command:/file: shapes onto the two hook classes.

Opt-in only: agents without verification_hooks are unchanged.

Co-authored-by: MervinPraison <[email protected]>
2026-08-19 10:02:24 +00:00
praisonai-triage-agent[bot]andMervinPraison 817942a4ab fix: MCP splits multi-word command string when args supplied (fixes #3940)
Previously MCP("npx -y pkg", args=[...]) passed the whole string as the
executable, so the subprocess spawn silently failed and 0 tools were
discovered. Now the command string is split on whitespace regardless of
whether args are supplied, using the first token as the executable and
prepending the remaining tokens to any explicit args.

Also updates examples/python/mcp/filesystem-mcp.py to use the reliable
executable + args form.

Co-authored-by: MervinPraison <[email protected]>
2026-08-14 14:33:12 +00:00
MervinPraisonandbotbikamordehai2-sketch d3b99876d6 test(gateway): cover misspelled gateway block at load time (#3050)
Adds load_gateway_config integration coverage for the #3050 validation
path and documents load-time gateway block checks in the example.

Supersedes #3060; core fix landed in #3079.

Co-authored-by: botbikamordehai2-sketch <[email protected]>
2026-08-14 03:49:11 +01:00
praisonai-triage-agent[bot]andMervin Praison df99b2b4c7 fix: validate URL in compare_extraction before newspaper/requests fetch
Close SSRF gap where compare_extraction fetched via newspaper3k and
requests.get without _validate_url, unlike the trafilatura path.

Co-authored-by: Mervin Praison <[email protected]>
2026-08-13 10:25:25 +00:00
eeshsaxena b60ce7d517 Resolve hostnames in the trafilatura SSRF check
_validate_url only inspected IP literals, so a plain domain or an encoded
form (a decimal IP, or "<internal-ip>.nip.io") passed even though it
resolves to an internal address, defeating the SSRF guard. Resolve the
hostname and reject any private, loopback, reserved or link-local address,
matching praisonaiagents/tools/file_tools.py.
2026-08-12 15:09:31 +05:30
praisonai-triage-agent[bot] cffde6682e Merge pull request #3668 from MervinPraison/claude/issue-3665-20260804-1027
docs: correct-signature human-review team example + regression test
2026-08-04 12:07:33 +00:00
praisonai-triage-agent[bot]andMervin Praison 0064f0c919 fix: use variables={{topic}} interpolation in human-review team example
The example passed topic via team.start(inputs=...), but AgentTeam.start
swallows **kwargs and never consumes `inputs`; interpolation reads only
task/team `variables` and replaces double-brace {{key}} placeholders.
Switch to AgentTeam(variables=...) with {{topic}} so the example actually
substitutes the topic instead of emitting a literal placeholder.

Co-authored-by: Mervin Praison <[email protected]>
2026-08-04 10:35:54 +00:00
praisonai-triage-agent[bot]andDhivya-Bharathy 0f384c95b2 docs: add correct-signature human-review team example + regression test (fixes #3665)
Documents that Task.on_task_complete 2-param callbacks receive
(task_output, metadata) — NOT (task, task_output) like AgentTeam's hook.
Adds a copy-pasteable sequential human-review example and a regression
guard test. No new API surface (lightweight per AGENTS.md).

Co-authored-by: Dhivya-Bharathy <[email protected]>
2026-08-04 10:29:59 +00:00
praisonai-triage-agent[bot]andDhivya-Bharathy 92c2b6dd64 fix: migrate invalid AgentTeam kwargs to output=/execution= (fixes #3654)
AgentTeam.__init__ accepts neither verbose= nor **kwargs, so passing
verbose= raised TypeError at construction. Verbosity is controlled via the
consolidated output= param (silent/minimal/verbose) and iteration limits via
execution=. Migrated all internal CLI, template generators, and examples off
the removed verbose=/max_iter=/session= kwargs, and added an AST lint guard
that scans examples + internal CLI for invalid AgentTeam kwargs to prevent
regression.

Co-authored-by: Dhivya-Bharathy <[email protected]>
2026-08-04 10:16:49 +00:00
Dhivya-Bharathy 1cfb2bc26f fix: resolve 4 remaining E2E example failures after batch-3 merge 2026-07-24 14:25:40 +05:30
praisonai-triage-agent[bot]andMervin Praison 614bd2946f chore: remove committed example run artifacts and ignore them
Remove 13 knowledge.db binaries plus managed_ids.json, blog_post.md,
tutorial.md, token_metrics_export.json, market_research_results.json that
were accidentally committed (PR notes explicitly say not to commit local
artifacts). Add .gitignore rules to prevent recurrence.

Co-authored-by: Mervin Praison <[email protected]>
2026-07-23 11:38:54 +00:00
Dhivya-Bharathy 2895163e81 fix: batch-3 E2E — skip optional-deps failures and fix remaining example bugs 2026-07-23 17:04:42 +05:30
Dhivya-BharathyandCursor bc8a39dd29 fix: batch-2 E2E example failures from full audit
- Fix AgentTeam.start() result handling across 22+ workflow/usecase examples

- Fix missing AgentFlow/AgentTeam/AutoAgents imports and registry override demo

- Fix scope_identifiers, state_redis db import, and ToolsMCPServer.run_sse API

- Mark STT and stale tool-import examples as skip until refreshed

- Remove stale db mapping that shadowed praisonaiagents.db submodule

Co-authored-by: Cursor <[email protected]>
2026-07-22 13:34:33 +05:30
MervinPraisonandCursor bca7e9aa09 fix: close C13 post-merge gaps — CLI unify, Daytona backend, live tests
Wire Typer run/shell/backends to SandboxHandler, implement daytona-sdk
DaytonaSandbox, expand live Docker/manager tests and backward-compat gates,
and refresh praisonai-sandbox and praisonai-agents lockfiles.

Co-authored-by: Cursor <[email protected]>
2026-07-17 09:33:52 +01:00
praisonai-triage-agent[bot]andpraisonai-triage-agent[bot] 8d79da273a feat: add LoopEvaluator for loop health scoring (fixes #2874)
Add LoopEvaluator + LoopHealthResult to praisonaiagents.eval to score
loop *health* (convergence, wasted iterations, doom-loop guard events)
on top of EvaluationLoop's output-quality scoring.

- eval/loop_eval.py: LoopEvaluator (BaseEvaluator subclass) + LoopHealthResult
- eval/__init__.py: lazy exports for LoopEvaluator, LoopHealthResult
- tests/unit/eval/test_loop_eval.py: convergence, waste, doom-loop coverage
- examples/python/eval/loop_health_eval.py: usage example

Co-authored-by: praisonai-triage-agent[bot] <praisonai-triage-agent[bot]@users.noreply.github.com>
2026-07-10 09:34:53 +00:00
MervinPraison cfbd5fa275 Close C9 cross-plan gaps: scheduler in bot tier, CI and docs sync.
Move gateway scheduler executor to praisonai_bot with wrapper shims, compose
[claw] from praisonai-bot[gateway,bot], restore onboard CI coverage, and
document the four-tier architecture plus config-kernel substitute for Phase 0.
2026-07-03 17:17:15 +01:00
Mervin Praison a4fe9fcc98 Merge pull request #2544 from Iyanuoluwa007/fix-agent-dispatch-async-mock
Fix async agent dispatch detection for mocked agents
2026-07-01 15:37:39 +01:00
Iyanuoluwa007 b79361e018 Fix async agent dispatch detection for mocked agents 2026-07-01 14:29:32 +01:00
MervinPraisonandCursor 36f473355b Close framework adapter validation gaps from plan review.
Add list_available_frameworks helper, dynamic CLI help, workflow warn logging,
autogen_v4 install hint, stronger entry-point tests, and installable custom adapter template.

Co-authored-by: Cursor <[email protected]>
2026-06-28 05:54:37 +01:00
MervinPraisonandCursor 83ca4f4671 Prepare multi-framework adapter extensibility in core and wrapper.
Move framework adapter protocol to praisonaiagents, add registry-driven
CLI/doctor discovery, fix workflow YAML framework handling, and clean up
AutoGen stubs ahead of praisonai-frameworks extraction.

Co-authored-by: Cursor <[email protected]>
2026-06-28 05:40:28 +01:00
Mervin Praison 688a2f2ce6 Merge pull request #1986 from Anil-matcha/feat/muapi-provider-example
feat: add MuAPI image generation provider example
2026-06-26 15:15:04 +01:00
Anil Matcha db3e8fb563 fix(muapi): allowlist models, safe dict access, guard module-level side effects
- ALLOWED_MODELS set prevents arbitrary path injection via model param
- .get() on all response dict accesses with explicit error messages
- Agent/Tool instantiation moved inside __main__ guard to avoid
  side effects on import (env var reads, network, PraisonAI init)
2026-06-26 15:41:52 +05:30
praisonai-triage-agent[bot]andMervinPraison a5770f9126 fix: remove dead private methods in core SDK (#2296)
* fix: remove dead private methods in core SDK (fixes #2293)

Remove three unreferenced private methods:
- Agent._create_subagent (agent.py)
- LLM._try_parse_tool_call_json (llm.py)
- LLM._prepare_response_logging (llm.py)

Update the two example files that called _create_subagent to build the
subagent inline via the public get_profile API, preserving behaviour.
No public symbol, signature, or runtime behaviour changes.

Co-authored-by: MervinPraison <[email protected]>

* fix: correct 'a explorer' -> 'an explorer' in example fallbacks

Addresses Greptile P2 review feedback on both autonomy example files.

Co-authored-by: Mervin Praison <[email protected]>

---------

Co-authored-by: praisonai-triage-agent[bot] <272766704+praisonai-triage-agent[bot]@users.noreply.github.com>
Co-authored-by: MervinPraison <[email protected]>
2026-06-25 22:44:21 +01:00
MORDEHAI BOTBIKA ec1ee648bc fix: add typed payload contract to handoff example to prevent silent data violations (closes #1810) (#1889) 2026-06-24 21:45:59 +01:00
EvolinkAI cfe3881c56 fix: handle missing Evolink API key in example 2026-06-23 19:12:11 +08:00
EvolinkAI 838ce5264a feat: add Evolink provider example
Document Evolink's OpenAI-compatible endpoint in the sample environment and add a provider example that uses the existing PraisonAI base_url/api_key configuration path. Cover the config wiring with an offline unit test so the integration stays regression-tested without live API calls.
2026-06-23 19:12:11 +08:00
MervinPraison fd7ff10e39 Merge branch 'main' of https://github.com/MervinPraison/PraisonAI 2026-06-23 00:04:43 +01:00
cfd7d7c8a9 fix(examples): merge validation fixes phases 2-4 into main (stacked on #1855) (#1893)
* fix(examples): resolve syntax errors and align with consolidated-params API

* fix: correct TypeError in 3 example files by using proper parameter names

- Fix MemoryConfig(memory=...) → user_id=... in agent_centric_api.py
- Fix Session(memory=...) → user_id=... in session-example.py
- Fix build_context_for_task(memory=...) → user_id=... in memory-quality-example.py

Co-authored-by: Mervin Praison <[email protected]>

* fix(examples): align AgentTeam memory and knowledge configs with v4.6.52 API

* fix(examples): phase-3 API alignment for consolidated params on v4.6.52

* fix(examples): phase-4 API alignment for 40 validation failures on v4.6.52

* fix: resolve critical RouterAgent **kwargs bug and add missing if __name__ guards

- Fixed TypeError in RouterAgent._build_system_prompt() by removing **kwargs from super() call
- Added if __name__ == '__main__' guards to 6 example files to prevent auto-execution on import
- Addresses Gemini Code Assist review feedback

Co-authored-by: Mervin Praison <[email protected]>

* fix: resolve missing AgentTeam import and RouterAgent kwargs forwarding

- Fix missing AgentTeam import in self-reflection-optimization-patterns.py
- Forward kwargs properly in RouterAgent._build_system_prompt to super()
- Addresses critical issues identified by Gemini code reviewer

Co-authored-by: Mervin Praison <[email protected]>

* fix(examples): remove merge-conflict residue for PR #1893

---------

Co-authored-by: Dhivya-Bharathy <[email protected]>
Co-authored-by: praisonai-triage-agent[bot] <272766704+praisonai-triage-agent[bot]@users.noreply.github.com>
Co-authored-by: Mervin Praison <[email protected]>
Co-authored-by: Mervin Praison <[email protected]>
2026-06-23 00:03:04 +01:00
MervinPraison f601ca0ced chore: move root examples and tests into proper package folders
Relocate LLM config example, gateway prototype, and OpenAI compatibility
tests out of the repo root; remove sys.path hack and gate integration tests
behind PRAISONAI_TEST_OPENAI_COMPAT.
2026-06-22 23:54:52 +01:00
378f5a23f1 fix: JIRA Agent watch (#2078)
* feat: add JIRA Agent watch tools for monitoring issues and projects

- Add jira_tools.py with 4 comprehensive JIRA monitoring tools
- jira_watch_issue: Monitor specific issues for real-time changes
- jira_watch_project: Watch projects for new and updated issues
- jira_get_issue_info: Get detailed issue information
- jira_search_issues: Search using JQL queries
- Support both cloud and server JIRA authentication
- Include comprehensive unit tests and usage example
- Follow protocol-driven architecture with @tool decorator
- Implement lazy imports and proper error handling

Co-authored-by: MervinPraison <[email protected]>

* fix: resolve critical JIRA tools issues - blocking sleep, data loss, injection, mocking

- Replace blocking time.sleep() polling with timestamp-based single-shot checks
- Fix silent comment data loss by tracking comments independently
- Add project key validation to prevent JQL injection attacks
- Fix test mocking to use correct patch target (jira.JIRA)
- Remove unused variables and improve code quality
- Update tests for new non-blocking API

Fixes blocking agent execution and security vulnerabilities identified by reviewers.

Co-authored-by: Mervin Praison <[email protected]>

* fix: resolve critical JIRA tools issues - string timestamp comparison, JQL injection, null safety

- Added _parse_timestamp() helper to properly parse ISO 8601 timestamps into datetime objects
- Added _validate_timestamp() to prevent JQL injection through timestamp parameters
- Fixed all timestamp comparisons to use datetime objects instead of string comparisons
- Added null safety checks for all JIRA API fields (author, creator, reporter)
- Removed unnecessary expand parameter from jira_get_issue_info
- Added comprehensive unit tests for timestamp parsing utilities

Addresses issues identified by Gemini, Greptile, and other reviewers

---------

Co-authored-by: praisonai-triage-agent[bot] <272766704+praisonai-triage-agent[bot]@users.noreply.github.com>
Co-authored-by: MervinPraison <[email protected]>
2026-06-22 20:01:21 +01:00
Anil Chandra Naidu Matcha 376214d181 feat: add MuAPI image generation provider example 2026-06-17 11:07:33 +05:30
praisonai-triage-agent[bot]andMervin Praison 86aeaa4d89 feat: add in-flight run control for channel sessions (fixes #1914) (#1920)
* feat: add in-flight run control for channel sessions (fixes #1914)

- Add SessionRunControl class with busy feedback and message queuing
- Support for queue/interrupt/steer modes and /stop command
- Integrate InterruptController from core SDK for cancellation
- Add BotSessionManager.chat_with_run_control() method
- Extend BotConfig with busy_mode and busy_ack settings
- Add /stop command handler and help text updates
- Include comprehensive example and test coverage

Resolves silent blocking issue where mid-run messages queue
invisibly with no user feedback or cancellation option.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: MervinPraison <[email protected]>

* fix: resolve critical bugs in run control implementation

- Fix interrupt controller restoration to prevent deletion (issue #1920)
- Fix memory leak in cleanup_stale_sessions with last_activity tracking
- Add config field wiring in TelegramBot for busy_mode support
- Change steer mode fallback to WARNING level for visibility

Co-authored-by: Mervin Praison <[email protected]>

---------

Co-authored-by: praisonai-triage-agent[bot] <272766704+praisonai-triage-agent[bot]@users.noreply.github.com>
Co-authored-by: MervinPraison <[email protected]>
2026-06-13 09:25:24 +01:00
MervinPraison d3c4a2afad Release v4.6.56 2026-06-13 00:42:25 +01:00
MervinPraison a4386796c9 Release v4.6.55 2026-06-12 23:39:35 +01:00
459a12a656 feat: implement real-time message steering for agents during execution (#1802)
* feat: implement real-time message steering for agents during execution

- Add MessageSteeringProtocol and AgentSteeringProtocol following protocol-driven architecture
- Implement MessageSteering class with priority-based message queuing
- Add SteeringMixin to Agent class with message_steering parameter
- Integrate steering checks into execution flow and tool execution
- Support mid-execution guidance with priority levels (normal, high, urgent, interrupt)
- Maintains backward compatibility with existing Agent API
- Zero overhead when message_steering=False (default)

Fixes #1799

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: praisonai-triage-agent[bot] <praisonai-triage-agent[bot]@users.noreply.github.com>

* fix: address critical bugs in message steering implementation

- Fix INTERRUPT detection in tool_execution.py (was using broken substring check)
- Fix rate limiter blocking urgent messages during tool execution
- Add INTERRUPT priority bypass in message queue (URGENT.value + 1)
- Add proper error handling in execution_mixin.py with graceful degradation
- Extend MessageSteeringProtocol with enabled property for contract compliance
- Move test file to proper tests/integration/ directory structure
- Add mandatory live agentic test with real LLM execution
- Improve prompt formatting with clear separators

Fixes critical bugs identified by Greptile, CodeRabbit reviewers.
All changes maintain backward compatibility.

Co-authored-by: Mervin Praison <[email protected]>

* fix: comprehensive message steering improvements

- Wire steering in ALL execution paths (run, chat, achat, streaming)
- Move protocols to agent/protocols.py per AGENTS.md convention
- Remove duplicate test file and enhance live test with actual validation
- Fix INTERRUPT marker mismatch between tool_execution and SteeringMixin
- Improve priority handling with distinct INTERRUPT formatting

Co-authored-by: Mervin Praison <[email protected]>

* feat: add CLI/YAML parity and examples for message steering

- Add --message-steering CLI flag support in wrapper package
- Add YAML agent config mapping (message_steering: true)
- Create comprehensive Python example showing all usage patterns
- Create YAML configuration example
- Implements AGENTS.md §7 requirement (Python + CLI + YAML support)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <[email protected]>

---------

Co-authored-by: praisonai-triage-agent[bot] <272766704+praisonai-triage-agent[bot]@users.noreply.github.com>
Co-authored-by: praisonai-triage-agent[bot] <praisonai-triage-agent[bot]@users.noreply.github.com>
Co-authored-by: Mervin Praison <[email protected]>
Co-authored-by: Claude <[email protected]>
2026-06-12 21:05:11 +01:00
b0a2aa35d4 feat: implement named toolset groups for PraisonAI tool registry (fixes #1841) (#1850)
* feat: implement named toolset groups for PraisonAI tool registry (fixes #1841)

This implements named toolset groups functionality to address the lack of
organized tool collections in PraisonAI's tool registry system.

Core SDK Changes (praisonaiagents):
- Add toolsets.py with ToolsetSpec dataclass and ToolsetRegistry
- Implement 8 prebuilt toolsets: web, files, code, system, scraping, research, safe, development
- Support toolset composition via includes with circular dependency detection
- Add TTL availability caching (30s) to ToolRegistry.list_available_tools()
- Update Agent.__init__ to accept toolsets parameter with automatic tool resolution
- Export toolsets functionality in main package __init__.py

Wrapper Layer Changes (praisonai):
- Extend ToolResolver with resolve_toolsets() and resolve_tools_and_toolsets()
- Add --toolset CLI flag to 'praisonai run' and 'praisonai chat' commands
- Integrate toolset resolution in CLI execution pipeline

Key Features:
- Named toolset groups for organized tool management
- Progressive disclosure (safe → research → development)
- Least-privilege tool surfaces for restricted environments
- Performance improvements via TTL caching
- Full backward compatibility with existing tools parameter
- Thread-safe operations for multi-agent scenarios

Usage:
- Python: Agent(role='researcher', toolsets=['research'])
- CLI: praisonai run 'task' --toolset research
- YAML: toolsets: [research] in agent configuration

Co-authored-by: MervinPraison <[email protected]>

* fix: address critical issues found in code review

- Fix CLI tools write-back regression in main.py (silent tool dropping)
- Improve error handling in Agent toolset resolution (fail fast on invalid toolsets)
- Fix mutable state leakage in ToolsetRegistry (defensive copying)
- Fix cache collision in ToolRegistry (use registry keys not tool.name)
- Fix NameError in CLI commands (missing toolset parameters)
- Add deduplication in tool resolution
- Improve test reliability with cleanup and assertions
- Filter empty toolset names from CLI input

Co-authored-by: Mervin Praison <[email protected]>

* fix: resolve final registry.py merge conflicts

- Fix missed conflict in list_available_tools method
- Proper TTL caching using registry keys to avoid collisions
- Clean up clear() method to remove _functions reference

Co-authored-by: Mervin Praison <[email protected]>

* feat: complete named toolsets YAML integration and testing

Wire YAML support for toolsets:
- Add 'toolsets' to known_fields in agents_generator.py
- Update validate_yaml_tools to validate toolset references
- Update praisonai_adapter to pass toolsets from YAML to Agent

Enhance testing:
- Move test_toolsets.py to tests/unit/test_toolsets.py
- Convert to pytest conventions with proper cleanup
- Add real agentic tests requiring LLM calls per AGENTS.md
- Add comprehensive test coverage including YAML validation

Fix error handling:
- Remove ImportError swallowing in Agent.__init__ for fail-fast behavior
- Add clear error messages for invalid/missing toolsets

Add documentation and examples:
- Add examples/python/toolsets_example.py with comprehensive demos
- Add examples/yaml/toolsets_workflow.yaml showing YAML usage
- Include both simple usage and complex multi-agent workflows

All changes maintain backward compatibility and follow AGENTS.md guidelines.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: praisonai-triage-agent[bot] <272766704+praisonai-triage-agent[bot]@users.noreply.github.com>
Co-authored-by: MervinPraison <[email protected]>
Co-authored-by: Claude <[email protected]>
2026-06-12 14:00:39 +01:00
DhivyaandDhivya-Bharathy ce97667156 fix(examples): resolve syntax errors and align with consolidated-params API (#1855)
Co-authored-by: Dhivya-Bharathy <[email protected]>
2026-06-08 07:48:44 +01:00
Maulanaandulsreall e0fb8e7dd1 fix: harden JWT secret handling and replace eval() in examples (#1793)
Addresses remaining attack surface from security advisories:

GHSA-3qg8-5g3r-79v5 (JWT signing key - CRITICAL):
  auth_service.py: PLATFORM_ENV no longer defaults to 'dev' when unset.
  When PLATFORM_JWT_SECRET is not set and PLATFORM_ENV is not explicitly
  'dev', an ephemeral random secret is auto-generated with a warning.
  This prevents production deployments from silently using the well-known
  'dev-secret-change-me' key.

GHSA-vg22-4gmj-prxw (unauthenticated eval - CRITICAL):
  Replaced all eval() calls in official examples and benchmarks with an
  AST-based safe math evaluator that only allows numeric literals and
  arithmetic operators. Files fixed:
  - examples/python/a2a/a2a-server.py (the primary advisory target)
  - examples/mcp/multi_server.py
  - examples/python/mcp/mcp-tools-server.py
  - examples/python/mcp/mcp-tools-server-sse.py
  - examples/mcp_server/custom_tools_server.py
  - examples/python/mcp_server_example.py
  - examples/python/custom_tools/tools_with_latency.py
  - examples/eval/reliability_example.py
  - src/praisonai-agents/benchmarks/real_benchmark.py

The character-filter approach (allowlist '0123456789+-*/.()') was
insufficient because () enables attribute access chains. AST-based
evaluation only permits numeric literals and binary/unary arithmetic.

GHSA-hvhp-v2gc-268q and GHSA-9cr9-25q5-8prj (file read/write):
  Already fixed in prior commits via _resolve_rule_path() and
  _resolve_cwd_yaml_path() containment helpers.

Co-authored-by: ulsreall <[email protected]>
2026-06-02 20:01:09 +01:00
aaed51eee8 fix: replace undefined AgentFlow with Workflow in workflow_conditional.py (closes #1750) (#1765)
* fix: replace undefined AgentFlow with Workflow in workflow_conditional.py (closes #1750)

* Update workflow_conditional.py

---------

Co-authored-by: botbikamordehai2-sketch <[email protected]>
Co-authored-by: Mervin Praison <[email protected]>
2026-06-02 14:46:31 +01:00
praison 445003042e Release v4.6.45 2026-05-21 11:42:37 +01:00
praisonandCursor 3ea8376610 refactor: harden platform scoping and deploy output sanitisation
Extend workspace resource checks to projects, labels, dependencies, and
activity; sanitise legacy deploy HTML output; harden example eval paths;
fix workspace delete membership cleanup; add security regression tests.

Co-authored-by: Cursor <[email protected]>
2026-05-19 06:56:26 +01:00
ed63d34ed7 feat: Linear integration — agentic control plane (closes #1612) (#1613)
* feat: add Linear integration — agentic control plane with tools + LinearBot + AgentSession webhooks

- Add linear_tools.py with 9 GraphQL tools (search, create, update issues, comments, cycles)
- Add LinearBot adapter with HMAC-SHA256 webhook verification and AgentSession handling
- Add Linear platform to bot registry, CLI commands, and gateway integration
- Support both LINEAR_OAUTH_TOKEN (OAuth) and LINEAR_API_KEY (personal) authentication
- Include example configurations (YAML and Python) for zero-code and programmatic usage
- Follow protocol-driven architecture: tools in core SDK, bot implementation in wrapper
- Zero import-time cost via lazy loading, full BotProtocol compliance

Closes #1612

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: MervinPraison <[email protected]>

* fix: correct four bugs in Linear integration found during review

- _handle_agent_message: replace non-existent get_session() context
  manager with correct _session_mgr.chat() call (matches Slack/Telegram
  pattern in _session.py)
- _gql_query: fix aiohttp timeout — bare int 30 → ClientTimeout(total=30)
- bot_linear CLI: fix web_provider= → web_search_provider= to match
  BotCapabilities dataclass field (same as all other bot commands)
- bot_linear CLI: add `or []` guards for tools/skills/knowledge_sources
  to prevent None being passed where list is expected (matches all other
  bot commands)

Agent-Logs-Url: https://github.com/MervinPraison/PraisonAI/sessions/645d14d2-c605-41bf-b83a-839209e7e3b9

Co-authored-by: MervinPraison <[email protected]>

* fix: resolve 3 blocking Linear integration bugs

- Fix BotMessage constructor field names (id->message_id, text->content)
- Fix OAuth Bearer token handling in both tools and bot implementations
- Fix send_message signature to match BotProtocol specification

All fixes verified against the original bug reproduction cases.

Co-authored-by: Mervin Praison <[email protected]>

* refactor: relocate Linear tools to praisonai-tools (canonical home)

Linear GraphQL wrappers don't belong in the protocol-first core SDK
(per AGENTS.md §4.1). They duplicated an already-shipped LinearTool in
MervinPraison/PraisonAI-Tools and pulled third-party SaaS HTTP plumbing
into praisonaiagents/tools/.

This commit:
- Removes praisonaiagents/tools/linear_tools.py (the new file)
- Reverts the 9 TOOL_MAPPINGS additions and the 3 lookup-list entries
- Leaves LinearBot in praisonai/bots/linear.py unchanged (correct location:
  wrapper-side webhook adapter)

The full Linear tool surface (search/get/create/update/comment/list cycles/
list states/list teams) is being landed in MervinPraison/PraisonAI-Tools#31
with OAuth Bearer support and 36 unit tests. Users get it via:

    from praisonai_tools import LinearTool

praisonai-tools is already a runtime dep of praisonai (pyproject.toml:102),
so end-user UX is unchanged.

---------

Co-authored-by: praisonai-triage-agent[bot] <272766704+praisonai-triage-agent[bot]@users.noreply.github.com>
Co-authored-by: MervinPraison <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: MervinPraison <[email protected]>
Co-authored-by: praison <[email protected]>
2026-05-05 07:48:29 +01:00
6b3a999687 fix: resolve P1 issues from local verification - update test expectations and add example skip guards (#1555)
- Fix test_managed_agent_compute_provider_errors to expect DeprecationWarning instead of ValueError
- Add 3-layer skip guards to all 4 runtime example scripts for clean exit without credentials
- Preserve backward compatibility while implementing the HostedAgent/LocalAgent architectural split

Co-authored-by: praisonai-triage-agent[bot] <272766704+praisonai-triage-agent[bot]@users.noreply.github.com>
Co-authored-by: Mervin Praison <[email protected]>
2026-04-26 07:37:57 +01:00
praisonai-triage-agent[bot]andMervin Praison d6c367f321 fix: ManagedAgent provider overload conflates hosted-runtime vs LLM-routing (#1550)
* fix: ManagedAgent(provider=) overload conflates hosted-runtime vs LLM-routing — propose HostedAgent / LocalAgent split (fixes #1549)

- Create new HostedAgent class for hosted runtimes (Anthropic managed infrastructure)
- Create new LocalAgent class for local loops with optional cloud compute
- Update ManagedAgent factory with deprecation warnings for LLM routing overload
- Add proper error handling for compute provider misuse
- Maintain full backward compatibility with all existing imports
- Update examples to demonstrate new clear semantics
- Add comprehensive tests for new backend semantics

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: MervinPraison <[email protected]>

* examples: update managed-agents provider examples to use new HostedAgent/LocalAgent classes

- Create new canonical examples demonstrating HostedAgent vs LocalAgent usage
- Update existing examples to use clear semantic distinctions
- Add runtime_hosted_anthropic.py for true managed runtime usage
- Add runtime_local_*.py examples for local execution with different LLMs
- Update all_providers.py to use LocalAgent with compute backends
- Update local_basic.py to use LocalAgent semantics
- Add comprehensive test suite for backend semantics

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: MervinPraison <[email protected]>

* fix: resolve P1 backward compatibility and routing issues

- Fix ManagedAgent compute provider routing: maintain backward compatibility
  for e2b/modal/etc by routing to LocalManagedAgent with deprecation warning
  instead of ValueError (fixes hard breaking change)
- Fix LocalAgent provider preservation: preserve provider value for LLM routing
  to maintain _resolve_model() prefix behavior (ollama/, gemini/)
- Fix spurious deprecation warnings: auto-detected provider=local no longer
  triggers warnings for users who never passed provider=
- Remove unused os import from hosted_agent.py
- Improve error messages with provider-specific guidance
- Fix test fragility with exact warning counts and identity checks

Addresses all P1 issues identified by Greptile and CodeRabbit reviewers.

Co-authored-by: Mervin Praison <[email protected]>

---------

Co-authored-by: praisonai-triage-agent[bot] <272766704+praisonai-triage-agent[bot]@users.noreply.github.com>
Co-authored-by: MervinPraison <[email protected]>
2026-04-25 07:05:06 +01:00
MervinPraison 6b7d49d001 Release v4.6.31 2026-04-24 11:29:29 +01:00