A small foundational library and set of conventions for building, extending, and integrating custom crawler agents within the KamiYomu ecosystem. It provides lifecycle abstractions, utilities, and optional integrations for scraping HTML and controlling headless browsers.
- Agent lifecycle hooks for crawling and metadata extraction.
- Integration-ready with the KamiYomu runtime.
- Built-in examples and helpers for
HtmlAgilityPackandPuppeteerSharp. - Compatible with
.net-8.0to maximize host compatibility (works from modern .NET SDKs, including .NET 8).
-
Create a class library project (target
net-8.0for widest compatibility):Create project:
dotnet new classlib -n MyKamiYomuAgent -f net-8.0 -
Add NuGet.Config in the solution folder to ensure standard feeds:
NuGet.Config content (place next to your
.sln):<?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <clear /> <add key="nuget.org" value="https://api.nuget.org/v3/index.json" /> </packageSources> </configuration> -
Install the core package:
dotnet add package KamiYomu.CrawlerAgents.Core -
Make your package discoverable by KamiYomu (add
PackageTagsto your.csproj):Add inside your
.csproj:<PropertyGroup> <PackageTags>crawler-agents;manga-download</PackageTags> </PropertyGroup> -
Implement your agent
- Create a class that implements
ICrawlerAgentfrom theKamiYomu.CrawlerAgents.Corenamespace. - Implement required lifecycle methods (crawl, extract metadata, etc.). The interface defines how KamiYomu will call your agent.
- Create a class that implements
-
Use the validator repository to confirm your implementation meets KamiYomu requirements:
-
Local testing: you do not need to publish to a remote feed. You can build a
.nupkgand upload it into KamiYomu.Web for testing.
-
Build a distributable package:
dotnet pack -c Release -
To automatically generate a NuGet package for Debug builds, add to your
.csproj:<PropertyGroup Condition="'$(Configuration)' == 'Debug'"> <GeneratePackageOnBuild>True</GeneratePackageOnBuild> </PropertyGroup> -
Publish to a feed accessible by KamiYomu.Web (Nuget.org, GitHub Packages, Azure Artifacts, private feed, or local folder).
-
To test without a feed, upload the generated
.nupkgdirectly into KamiYomu.Web.
- Place the
.pdbalongside the agent DLL inside the agent folder (e.g./AppData/agents/{your.package}/lib/net8.0/) to enable source-level debugging when running inside KamiYomu.Web.
- Ensure your package includes necessary runtime assets and dependencies.
- Keep the public API surface minimal and document required configuration and permissions.
-
Create project:
dotnet new classlib -n MyKamiYomuAgent -f net8.0 -
Add package:
dotnet add package KamiYomu.CrawlerAgents.Core -
Build Release package:
dotnet pack -c Release -
Enable package on Debug build:
Add `<GeneratePackageOnBuild>True</GeneratePackageOnBuild>` under Debug condition in `.csproj`
| Package | Version |
|---|---|
| HtmlAgilityPack | 1.12.4 |
| PuppeteerSharp | 20.2.4 |
- Follow repository coding conventions and include unit tests for new behavior.
- Use the validator repo above to confirm compliance before publishing.
- Open issues or pull requests against the core repository with clear descriptions and reproducible examples.
This project is licensed under the GNU General Public License v3.0 (GPL-3.0). See the LICENSE file for full terms.
- Repo: https://github.com/KamiYomu/KamiYomu.CrawlerAgents.Core
- For integration or runtime questions, open an issue on the repository.
- See repository Releases for version-specific notes.
© KamiYomu. Licensed under GPL-3.0.