agentos-project / agentos

The Python Component System (PCS) is an API and CLI for building, running, and sharing Python code. AgentOS is a set of libraries built on top of PCS that make it easy to build, run, and share agents that use Reinforcement Learning.
https://agentos.org
Apache License 2.0
13 stars 4 forks source link

`Component.type` field should support `string` (for builtin types) or reference to an `Instance Component` for user defined types #408

Open andyk opened 2 years ago

andyk commented 2 years ago

In this world, providing a string as a type will match that string against the components in PCS. E.g,, using type: LocalRepo would be equivalent to using spec:LocalRepo as in the following:

specs:
    LocalRepo:
        type: Instance
        instance_of:
            type: Class
            name: LocalRepo
            module:
               type:
               path: ./pcs/local_repo.py
               version: v0.3.0 # most recent release of PCS
               repo:
                 type: GitHubRepo
                 url: https://github.com/agentos-project/agentos

    my_local_repo:
        type: spec:LocalRepo
        path: .

    my_file:
        type: spec:File
        relative_path: ./foo/bar.txt
        repo: spec:local_repo
andyk commented 2 years ago

@nickjalbert I made this after our discussion today!