Package defining the PyAgentSpec library for Agents and LLM fixed-flows abstractions.
Project description
🔗 Open Agent Specification (PyAgentSpec)
Agent Spec is a portable, platform-agnostic configuration language that allows Agents and Agentic Systems to be described with sufficient fidelity. It defines the conceptual objects and called components that compose Agents in typical Agent systems, including the properties that determine the components' configuration, and their respective semantics. Agent Spec is based on two main runnable standalone components:
- Agents (e.g., ReAct), that are conversational agents or agent components;
- Flows (e.g., business process) that are structured, workflow-based processes.
Runtimes implement the Agent Spec components for execution with Agentic frameworks or libraries. Agent Spec would be supported by SDKs in various languages (e.g. Python) to be able to serialize/deserialize Agents to JSON/YAML, or create them from object representations with the assurance of conformance to the specification.
For more information, including the motivation and specification, see the dedicated section in the Agent Spec documentation.
⚡ Quick Install
pip install pyagentspec
(Optional, faster installation using uv)
pip install uv
uv pip install pyagentspec
🧠 Quick Start
1) Configure an LLM
Initialize a Large Language Model (LLM) of your choice using PyAgentSpec configs:
| OCI Gen AI | Open AI | Ollama |
|---|---|---|
from pyagentspec.llms import OciGenAiConfig |
from pyagentspec.llms import OpenAiConfig |
from pyagentspec.llms import OllamaConfig |
See the list of supported LLMs in the PyAgentSpec documentation: https://oracle.github.io/agent-spec/development/howtoguides/howto_llm_from_different_providers.html
2) Create an Agent
from pyagentspec.agent import Agent
from pyagentspec.property import Property
expertise_property = Property(json_schema={"title": "domain_of_expertise", "type": "string"})
system_prompt = """
You are an expert in {{domain_of_expertise}}.
Please help the users with their requests.
"""
agent = Agent(
name="Adaptive expert agent",
system_prompt=system_prompt,
llm_config=llm_config, # from step 1
inputs=[expertise_property],
)
For more examples on building flexible Agents, structured Flows, and multi-agent patterns, read the Guides: https://oracle.github.io/agent-spec/development/howtoguides/index.html
🚀 Execute Agent Spec configurations
Agent Spec configurations can be executed using Agent Spec–compatible runtimes or adapters that translate the spec into the target framework representation.
- WayFlow is an Agent Spec reference runtime developed by Oracle: https://github.com/oracle/wayflow/
- PyAgentSpec includes adapters for common frameworks (install extras as needed). Examples are available in the
adapters_examplesfolder:
Refer to the installation guide for adapter-specific extras: https://oracle.github.io/agent-spec/development/installation.html
💁 Get Support
- Open a GitHub issue for bugs, questions, or enhancement requests: https://github.com/oracle/agent-spec/issues
- Report a security vulnerability: https://www.oracle.com/corporate/security-practices/assurance/vulnerability/reporting.html
🤝 Contributing
Contributions are welcome! Please refer to the contributor guide located at the root of the repository.
🔐 Security
For responsibly reporting security issues, please refer to the project's security guidelines.
📄 License
Copyright (c) 2025 Oracle and/or its affiliates.
This software is dual-licensed under the Apache License 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0) and the Universal Permissive License (UPL) 1.0 (LICENSE-UPL or https://oss.oracle.com/licenses/upl).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyagentspec-26.1.0-py3-none-any.whl.
File metadata
- Download URL: pyagentspec-26.1.0-py3-none-any.whl
- Upload date:
- Size: 404.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac425ca2628891d735159763bb7c4bcaa672b04b995191f9f85b22e168e1bd04
|
|
| MD5 |
791c11e20c6f439a4aa214106deaba76
|
|
| BLAKE2b-256 |
2c8667e9571359e291cd7c284054a4e3d7997232a2375626f475416b12b5bb6a
|