Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add endpoint to create new Collectives

Open Beginner friendly
#240 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
70/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
api, backend

Research direction

Look at the existing tools in ex_app/lib/all_tools/collectives.py to see the pattern for calling Collectives OCS endpoints. The new create_collective tool needs to make a POST request to /ocs/v2.php/apps/collectives/api/v1.0/collectives with a name and optional emoji. Check the Collectives app's appinfo/routes.php for the exact endpoint definition. Ensure the tool requests user confirmation. Test by running the agent and verifying a new collective appears in the UI.

Written by the indexing model from the issue text.

Description

enhancement
How to use GitHub
  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Feature request

Which Nextcloud Version are you currently using: 34.0.4 (Context Agent 2.8.0, Collectives 4.6.1)

Is your feature request related to a problem? Please describe.

The Context Agent can't create a new collective, it can only work with the existing ones.

#159 added page tools in ex_app/lib/all_tools/collectives.py (list collectives, and create, edit, move and trash pages), but all of them need an existing collective_id. So a request like "create a collective for project X and add a few pages" can't be done from start to finish. A person has to create the collective in the UI first.

Describe the solution you'd like

Add a create_collective tool to collectives.py that wraps the Collectives OCS endpoint POST /ocs/v2.php/apps/collectives/api/v1.0/collectives (collective#create in the Collectives appinfo/routes.php). It should take a name and an optional emoji, and return the new collective's id.

Because creating a collective also creates a team (circle), the tool should probably be marked as needing user confirmation, like other tools that create shared resources.

Optional, maybe as a follow-up:

  • a way to give the collective's team to an existing group or team (e.g. through the existing circles tools), so the result can be shared right away
  • trash_collective, wrapping DELETE /collectives/{id}, with confirmation

Describe alternatives you've considered

  • Creating the collective by hand in the Collectives UI.
  • Having the agent write Markdown files into a normal shared folder. The result isn't a collective, so pages, backlinks and the Collectives UI don't apply.
  • Creating the collective directly on the filesystem. I tested this: create_folder("/.Collectives/Test Colectivo Demo") and upload_file(".../Readme.md") both returned {"status":"success"}. But the folder never showed up in .Collectives/, a PROPFIND on it returned 404 Not Found, and no new collective appeared in search. So the files tools report success for writes that are silently dropped, and the agent can't tell that nothing was created. That's probably worth a separate bug report.

Additional context

Dominant language
Python
Stars
24
Forks
16
Avg merge
7d 15h
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nextcloud/context_agent

All issues in nextcloud/context_agent

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.