# Use your existing agent

Give your agent a tool it can use, while keeping your workflow and authority explicit.

Canonical page: /docs/agents

## A tool, not a new agent environment

An agent that can execute commands can use the installed CLI directly. No agent registration, provider migration or skill installation is required. MCP is an optional alternative for compatible clients.

Provider independence means the records and public capabilities do not depend on a model vendor. Your agent still needs a supported way to invoke the tools, and appropriate access to the ledgers.


## Start with a clear instruction

Make the executable available to your agent's shell, then ask it to inspect the existing context before recording.

```agent instruction
Use op-sys to record this project's decisions and work.
Inspect the existing ledgers and their rules first.
Keep everything local for now.
```


## Let the agent discover what it can do

Use this approach throughout Record: creating ledgers, establishing contracts, recording and retrieving work, managing authorized access and recovering interrupted operations. Your agent uses the same public capabilities as other interfaces.

The readable list provides operation purposes and starting points. Structured lists return concise summaries in pages of 25 by default (maximum 100). Narrow by name prefix and follow next using after with the same prefix. Inspect the relevant operation with capabilities.get for full schemas, limits and errors. Ledger inspection provides its rules and effective permissions; discovery grants no access.

```shell
op-sys capabilities list
op-sys --output json capabilities list --prefix ledgers.
op-sys --output json capabilities get --name records.append
op-sys ledgers inspect
```


## Check proposed rules without writing records

Your agent can discover the supported schema vocabulary through capabilities.list schema_profile and check a proposed schema and examples using contracts.validate. Descriptions explain consumer meaning; the supported validator enforces the rules.

Validation neither publishes a contract nor admits a contribution. If examples are omitted, it checks the schema's root examples; an explicit examples list replaces those checks. Human sign-in and genuine decisions remain resumable handoffs when needed.

```shell
op-sys --output json contracts validate --payload-schema @schema.json
```

- [Establish and evolve contracts](/docs/contracts)

## Check a contribution before writing

records.limits reports protocol ceilings and current service size choices using contribution permission. A contribution must fit both payload and indexed-input dimensions of one choice. Indexed input means canonical UTF-8 payload bytes plus attached file bytes; account prices remain private.

records.validate checks the current contract, payload, available attachments and these bounds without accepting, indexing, reserving spend or consuming an operation ID. Inspect valid: true passes these checks, false reports issues, and null means current service bounds are unavailable. Append rechecks access, payment/spend, state rules and capacity. Permission identifiers describe authority; invocation bindings identify commands.

```shell
op-sys --output json records limits
op-sys --output json records validate --payload @contribution.json
```


## Keep human direction practical

Record objectives, constraints and revised instructions in a ledger your agent is allowed to read. Your agent or execution system must retrieve and enforce them; writing a stop instruction does not itself stop an external process.

Records capture what consumers submit. They do not automatically import private conversations, reveal a model's internal reasoning or prove that an agent's explanation is correct.


## Related guides

- [CLI](/docs/raw/cli.md)
- [MCP](/docs/raw/mcp.md)
- [Contracts & rules](/docs/raw/contracts.md)
- [People, agents & access](/docs/raw/access.md)
