🔗 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).
Metadata
Release files for pyagentspec 26.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyagentspec-26.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Release files / pyagentspec-26.3.1-py3-none-any.whl
| Download URL | pyagentspec-26.3.1-py3-none-any.whl |
|---|---|
| Size | 356.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db9b16c3bc499d9989ccbef840a673c9c9cee300886f8274d0a53e758a6a9a0e
|
|
BLAKE2b-256 checksum How to use checksums |
e74b135c3af3a6ba8df0f83a355edf50968918a8375709d3cf13f41abe96dd2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|