-
Notifications
You must be signed in to change notification settings - Fork 8
feat: OASF plugin #311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
kevzzsk
wants to merge
7
commits into
main
Choose a base branch
from
kevin/oasf-plugin
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat: OASF plugin #311
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2ca039b
feat: OASF plugin
kevzzsk 6c6f815
config oasf specific domain + skills
kevzzsk 65a3c19
add modules
kevzzsk ba699ca
fix erc8004 route test
kevzzsk 7c9db10
resolve comments
kevzzsk d1ed4a1
fix test
kevzzsk 329d7cc
update docs
kevzzsk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,160 @@ | ||
| --- | ||
| title: "OASF" | ||
| description: "Open Agent Service Framework for standardized agent discovery" | ||
| --- | ||
|
|
||
| ## Overview | ||
|
|
||
| [OASF (Open Agent Service Framework)](https://schema.oasf.outshift.com/1.0.0/) is a standardized format for describing AI agents, their capabilities, and integrations. It enables agent discovery across the Open Agent Service ecosystem. | ||
|
|
||
| aixyz automatically generates an OASF record from your `aixyz.config.ts` and registered plugins. The `OASFPlugin` is always included in the build pipeline — no setup required. | ||
|
|
||
| ## Endpoint | ||
|
|
||
| | Endpoint | Method | Description | | ||
| | ------------------- | ------ | ------------------------------------------------ | | ||
| | `/_aixyz/oasf.json` | GET | OASF record with metadata, modules, and locators | | ||
|
|
||
| ```bash | ||
| curl http://localhost:3000/_aixyz/oasf.json | ||
| ``` | ||
|
|
||
| Example response: | ||
|
|
||
| ```json | ||
| { | ||
| "name": "Weather Agent", | ||
| "description": "Get current weather for any location worldwide.", | ||
| "version": "0.1.0", | ||
| "schema_version": "1.0.0", | ||
| "authors": [], | ||
| "created_at": "2026-03-23T12:00:00.000Z", | ||
| "domains": [{ "name": "technology/ai", "id": 1 }], | ||
| "skills": [{ "name": "weather/forecast", "id": 101 }], | ||
| "modules": [ | ||
| { | ||
| "name": "integration/a2a", | ||
| "id": 203, | ||
| "data": { | ||
| "card_data": { "name": "Weather Agent", "...": "..." }, | ||
| "card_schema_version": "0.3.0" | ||
| } | ||
| }, | ||
| { | ||
| "name": "integration/mcp", | ||
| "id": 202, | ||
| "data": { | ||
| "name": "Weather Agent", | ||
| "connections": [{ "type": "streamable-http", "url": "https://my-agent.vercel.app/mcp" }], | ||
| "tools": [{ "name": "getWeather", "description": "Get weather for a city" }] | ||
| } | ||
| } | ||
| ], | ||
| "locators": [ | ||
| { "type": "a2a", "urls": ["https://my-agent.vercel.app/.well-known/agent-card.json"] }, | ||
| { "type": "mcp", "urls": ["https://my-agent.vercel.app/mcp"] } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| ## Auto-Detection | ||
|
|
||
| The OASF record is assembled automatically from your registered plugins and config: | ||
|
|
||
| **Modules** — detected from registered plugins: | ||
|
|
||
| | Module | ID | Detected When | Data Included | | ||
| | ----------------- | --- | --------------------------- | -------------------------------------------- | | ||
| | `integration/a2a` | 203 | A2A agent card route exists | Full agent card data, schema version `0.3.0` | | ||
| | `integration/mcp` | 202 | MCP plugin registered | Connection info, registered tools | | ||
|
|
||
| **Locators** — service endpoints for agent discovery: | ||
|
|
||
| | Source | Type | URLs | | ||
| | --------------- | --------- | ----------------------------------------- | | ||
| | A2A plugin | `a2a` | All `/.well-known/agent-card.json` routes | | ||
| | MCP plugin | `mcp` | `/mcp` endpoint | | ||
| | Config services | Per entry | From `services` array in config | | ||
|
|
||
| ## Configuration | ||
|
|
||
| OASF-specific fields in `aixyz.config.ts`: | ||
|
|
||
| ```typescript title="aixyz.config.ts" | ||
| import type { AixyzConfig } from "aixyz/config"; | ||
|
|
||
| const config: AixyzConfig = { | ||
| name: "Weather Agent", | ||
| description: "Get current weather for any location worldwide.", | ||
| version: "0.1.0", | ||
| url: "https://my-agent.vercel.app", | ||
| x402: { payTo: "0x...", network: "eip155:8453" }, | ||
| skills: [ | ||
| { | ||
| id: "get-weather", | ||
| name: "Get Weather", | ||
| description: "Get current weather conditions for any city", | ||
| tags: ["weather"], | ||
| examples: ["What's the weather in Tokyo?"], | ||
| // OASF catalog metadata — only skills with this field appear in the OASF record | ||
| oasf: { name: "weather/forecast", id: 101 }, | ||
| }, | ||
| ], | ||
| // OASF domain categories | ||
| domains: [{ name: "technology/ai", id: 1 }], | ||
| // Additional service locators (e.g. OpenAPI, GraphQL) | ||
| services: [{ type: "openapi", url: "https://my-agent.vercel.app/openapi.json" }], | ||
| }; | ||
|
|
||
| export default config; | ||
| ``` | ||
|
|
||
| ### `domains` | ||
|
|
||
| OASF domain categories describing the agent's area of expertise. Each entry has a `name` and `id` from the [OASF domain catalog](https://schema.oasf.outshift.com/1.0.0/domain_categories). Defaults to `[]`. | ||
|
|
||
| ### `services` | ||
|
|
||
| External service endpoints to advertise. Each entry becomes an OASF locator (and optionally an ERC-8004 service). Defaults to `[]`. | ||
|
|
||
| ### `skills[].oasf` | ||
|
|
||
| Optional OASF catalog metadata on each skill. Skills without this field are excluded from the OASF record. The `name` and `id` come from the [OASF skill catalog](https://schema.oasf.outshift.com/1.0.0/skill_categories). | ||
|
|
||
| ## Using the OASF Plugin | ||
|
|
||
| The `OASFPlugin` is auto-registered in all generated servers. For custom servers: | ||
|
|
||
| ```typescript title="app/server.ts" | ||
| import { OASFPlugin } from "aixyz/app/plugins/oasf"; | ||
|
|
||
| await server.withPlugin(new OASFPlugin()); | ||
| ``` | ||
|
|
||
| The plugin uses a two-phase lifecycle: | ||
|
|
||
| 1. **Register** — creates the `GET /_aixyz/oasf.json` route | ||
| 2. **Initialize** — builds and caches the OASF record after all other plugins are registered, ensuring A2A and MCP integrations are detected | ||
|
|
||
| ## Integration with ERC-8004 | ||
|
|
||
| When both OASF and ERC-8004 plugins are active, the ERC-8004 agent registration file automatically includes an OASF service entry: | ||
|
|
||
| ```json | ||
| { | ||
| "name": "OASF", | ||
| "endpoint": "https://my-agent.vercel.app/_aixyz/oasf.json", | ||
| "version": "1.0.0" | ||
| } | ||
| ``` | ||
|
|
||
| This links on-chain agent identity to the OASF discovery endpoint. | ||
|
|
||
| <CardGroup cols={2}> | ||
| <Card title="A2A Protocol" icon="diagram-project" href="/protocols/a2a"> | ||
| Agent discovery with A2A agent cards. | ||
| </Card> | ||
| <Card title="ERC-8004 Identity" icon="id-card" href="/protocols/erc-8004"> | ||
| On-chain agent identity standard. | ||
| </Card> | ||
| </CardGroup> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.