portia-sdk-python  by portiaAI

Python SDK for building agentic workflows

Created 9 months ago
1,139 stars

Top 33.8% on SourcePulse

GitHubView on GitHub
Project Summary

Portia AI provides a Python SDK for building predictable, stateful, and authenticated agentic workflows, targeting developers who need robust multi-agent deployments with configurable oversight. It aims to simplify the creation and management of complex AI agent interactions for production environments.

How It Works

The SDK enables conversational or programmatic creation of agent "Plans" and allows for intervention during execution by modifying the PlanRunState. It supports defining structured inputs/outputs for predictability and integrates deterministic tasks via ExecutionHook. A key advantage is its extensive tool support, including connections to various MCP servers, local tools, and third-party AI providers, with over 1000 pre-built cloud tools and authentication managed by Portia.

Quick Start & Requirements

  • Install: pip install portia-sdk-python
  • Prerequisites: Python 3.11+, LLM API key (e.g., export OPENAI_API_KEY='your-api-key-here').
  • Validation: portia_cli run "add 1 + 2"
  • Docs: docs.portialabs.ai
  • Demo: app.portialabs.ai

Highlighted Details

  • Supports flexible LLM integration, including local models, with Redis caching.
  • Features an open-source browser tool for web navigation, handling captchas and logins via human clarification.
  • Enables end-user attribution for multi-agent runs and seamless credential handling for API and web agents.
  • Automatically stores/retrieves large inputs/outputs in agent memory.

Maintenance & Community

  • Active community engagement via Discord.
  • Offers a paid contribution program for issue resolution.
  • YouTube channel for examples and demonstrations.

Licensing & Compatibility

  • The README does not explicitly state the license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The README does not specify the project's license, which is a critical detail for commercial adoption. Furthermore, specific compatibility notes for various LLM providers beyond OpenAI are not detailed in the quick start, requiring users to consult external documentation.

Health Check
Last Commit

1 day ago

Responsiveness

1 day

Pull Requests (30d)
108
Issues (30d)
23
Star History
236 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.