agent-core-sdk

    Shared MoonBit process foundation for agent CLIs

    agent
    cli
    jsonl
    sdk
    moonbit
    Download zip
    Author
    Version
    0.1.3
    License
    MIT
    Last updated
    7 hours ago
    Downloads
    450

    #Agent Core SDK

    totto2727/agent-core-sdk is a MoonBit module that provides shared process infrastructure for SDKs invoking agent runtimes through JSONL.

    #Usage

    Run a JSONL-emitting command, observe the decoded event, and inspect its completion status:

    ///|
    async fn run_once() -> @cli.RunResult {
    let result = @cli.run(
    @cli.Invocation::new(
    command="/usr/bin/printf",
    arguments=["\"Hello\"\\n"],
    input="",
    ),
    fn(message : String) raise {
    assert_eq(message, "Hello")
    true
    },
    )
    debug_inspect(result, content="Completed")
    result
    }

    See the CLI package guide for its owned invocation contract, generated API, and direct checked-flow link.

    #Key features

    • Provides one target-neutral cli package for invoking JSONL-emitting agent CLIs.
    • Supports the wasm preferred target and the native target declared by the module.
    • Keeps provider-specific command construction, event models, and turn aggregation in provider SDKs.
    • Publishes a generated Mooncakes API reference for the public package API.

    #Prerequisites

    • MoonBit: Install the MoonBit toolchain and moon command.
    • Agent CLI: Make the executable used by cli.Invocation available to the consumer process.

    #Setup

    1. Add the module to a MoonBit project.

    moon add totto2727/agent-core-sdk@0.1.3

    1. Import totto2727/agent-core-sdk/cli from the package that invokes the agent CLI.

    import { "totto2727/agent-core-sdk/cli" @cli, }

    #API

    #Development

    See AGENTS.md for repository structure, package ownership, and development commands.

    #License

    This README was generated from the share-artifact skill and README template.